Flash Buttons and Advanced Movie Clip "buttons" AS2 part 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
20,855
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 20, 2007

Part 2 of an overview on how buttons work and how to use movie clips to create buttons with interaction using actionscript 2.0 and labels.

wow, big editing mistake on my part....ok...I apparently cut out a huge part of my actionscript....the code below belongs on Actions layer, frame 1 (which is what you see me correcting around 8:50-9:00..I had it in the wrong place)

movieclip1.onRollOver = function(){ movieclip1.gotoAndPlay("normal");
}
movieclip1.onRollOut = function(){ movieclip1.gotoAndStop("normal");
}
movieclip1.onPress = function(){ movieclip1.gotoAndPlay("over");
}


What you see above is actionscript syntax...movieclip1 is what we called our instance...and onRollOver, onRollOut, and onPress are events we are testing for...case sensitivity does matter...the best way to know if you have typed one of the events correctly is whether it turns blue...if it doesn't you either misspelled or did incorrect capitalization. Let me know if I screwed anything else up....

Here is my completed FLA file if you want to check out my code... http://www.patrickstron.com/tutorials/movieclipstylebuttons.fla

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (AModernFocus)

  • It was very helpful, but I couldn't read the important code at the end. Hope to help us learn more, thanks!

  • the code in question has since been put in the video's description in the upper left hand corner of this very webpage. I even have a link to my FLA file from my own website in the description as well.

  • hi u got me completly lost with that editing, my question is where did the word 'movieclip1' start to appear in this whole process?

  • the term 'movieclip1' was applied as an instance name of that movie clip "button". If you look at the timecode of 8:55. You will see that on the properties screen at the bottom, the term 'movieclip1' has been typed into the Instance Name textbox of the properties of that movie clip. That step too it seems must have been left out. Remember, if you get horribly lost, you can always download the FLA from my site listed in the description above. Hope this helps!

  • great so far, I lost you at 8:48 seconds where did you get that code from? we were walking along then you had a bunch of action script and i didn't, dunno how you did that but you lost me completely

  • What you see above is actionscript syntax...movieclip1 is what we called our instance...and OnRollOver, OnRollOut, and OnPress are events we are testing for...case sensitivity does matter...the best way to know if you have typed one of the events correctly is whether it turns blue...if it doesn't you either misspelled or did incorrect capitalization. Let me know if I screwed anything else up....

see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • Wow great job ... been searching for this info for awhile... helped me with my final project for school... i didnt want to be restricted to simple buttons although its only an intro class... wish you were my teacher...

  • Fantastic you helped me so much.

  • im confused, when u break it, does it still called movie clip?

  • I'm gonna do "AppleBee's", or Ctrl - B to break it down.

    4:19

  • Seriously, I was once lost, now I'm found :P Thanks for the tutorial-much respect!

  • thank you! just what i needed. :-)

  • THANK YOU DUDE! THANK YOU!

    You dont know how many days I've spent looking for this answer. From on(press) to onMouseDown.... I couldn't get my movieclip button to work. onPress was the answer. THANK YOU!

  • if you look at the title of the video you will see that it states AS2 which I would assume is Action Script 2.0. So if you read it all you will see that your time was not wasted by the creator of this video, just yourself...cheers

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more