Kokisho Posted October 28, 2006 Share Posted October 28, 2006 IM trying too make a Drag 'N' Drop game, but the thing is im almost completely new too flash. Ive been trought the Flash Tut but I dont now how. I figured it was the simplest to make and it would be a good start and id be able to learn more from the code. If anyone could help, thanks. Link to comment Share on other sites More sharing options...
smiles Posted October 29, 2006 Share Posted October 29, 2006 I continue to give you a link http://w3schools.invisionzone.com/index.php?showtopic=6182 Link to comment Share on other sites More sharing options...
Kokisho Posted October 29, 2006 Author Share Posted October 29, 2006 Thanks, but to be honest I dont know what to fill in the blank spaces wit. Sorry : S Link to comment Share on other sites More sharing options...
smiles Posted October 30, 2006 Share Posted October 30, 2006 could you be more clearly :)I not sure what you means Link to comment Share on other sites More sharing options...
Kokisho Posted October 30, 2006 Author Share Posted October 30, 2006 slider.onPress = function(){startDrag("slider");}slider.onRelease = function(){stopDrag();}In the 'function()' what should I put there?And this s the error that comes up:**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler slider.onPress = function()**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: Statement must appear within on handler slider.onRelease = function()Total ActionScript Errors: 2 Reported Errors: 2 Link to comment Share on other sites More sharing options...
smiles Posted October 31, 2006 Share Posted October 31, 2006 **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handlerslider.onPress = function()**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: Statement must appear within on handlerslider.onRelease = function()Here is the code as you seein Frame1 creates something and converts it to symbol , button type , for examplein InstanceName type any name you like , I will take "slider"now press F9 to open ActionPaneland type these code ( know it Case sensitive with function )slider.onPress = function(){startDrag("slider");}slider.onRelease = function(){stopDrag();}that finishpress Ctrl + Enter to test movie ok , we have to notice one thing when write action script , that is the script is for frame ( Frame1 like above )or script for button "slider" , if the script is for slider then you will get those error messageso lets click frame 1 and open Action Panel and paste the code , you will see "alpha sign"in the frame 1 Link to comment Share on other sites More sharing options...
Sniffy Posted November 4, 2006 Share Posted November 4, 2006 Or an alternative way,Put this inside your button. on(press){startDrag("");}on(release){stopDrag();} I do prefer the way you used, smiles, though. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now