Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Adobe Flash CS3- ActionScript 3.0 - RollOver effects

Loading...

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

Uploaded by on Jul 16, 2008

**UPDATE TO VIDEO... READ BELOW**

In this step-by-step tutorial, I show you how to create rollover effects (in this tutorial, on movieclips.) I also show you how to navigate to URL's via ActionScript, along with a description of the scripting we are doing. Have fun with Flash!

*******************************************
Ok, it has been forever since I have uploaded another Flash video tutorial. But, don't worry. I have a few in the making. I would just like to show you a simple line of code. This line, when you rollover the movieclip, shows that button hand cursor (as if it was actually a button.)

Here it is:

btn.buttonMode=true;

Btn (the instance name for the movieclip) is in "buttonMode". buttonMode is when the hand cursor shows. So, I did not cover booleans in this video, which only have 2 values (true/false), so, the 'true' in that line of code tells Flash, "Yes, btn is now in buttonMode." if you were to replace "true" with "false", then it will tell Flash, "No, btn is not in buttonMode. Treat it as a movieclip and not a button."

So, that's a simple line of code that shows the hand cursor for the movieclip.

As I had said above, there are a few tutorials in the making and I am anxious to stick 'em on YouTube.

Have fun with Flash and see you in future tutorials! :)

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (PONGStudios)

  • Hi PONGStudios,

    In the description, I see you wrote instructions for us to write

    btn.buttonMode=true;

    Where should we write that? e.g At the screen you show on your video at 1minute, where you create the movie clip for your oval? Or when at around 1min30 you create an instance of it called btn? Or maybe on action layer keyframes?

    I havent tried writing it anywhere yet. My button doesnt work. My flash project will publish but says: Cannot access a property or method of a null object reference.

  • @TableWolfMusic Apply the "buttonMode" method on the Actions layer (where you wrote the code.)

    Also, make sure that the "button" is a MovieClip, and that it has an instance name of "btn."

    If you have any further questions/problems, do not hesitate to ask.

    Thanks for watching.

  • Good tutorial but its much better to have the AS code inside the movieclip if you want to use this several times like in a menu. instead of refer to btn just make another AS layer in the movieclip and refer to "this" like:

    this.addEventListener();

  • Yeah, that is a good point. The code should be inside of a MovieClip. I didn't think about that when I made this tutorial.

    Thanks for your feedback.

Top Comments

  • I'm having a similar problem to a lot of other people - following the tutorial exactly but the stop action doesn't seem to work, the tween just keeps looping and the symbol doesn't respond to any mouse action.. am I missing something?

    I'm using CS5 not CS3 though, and it would only let me use 'Classic Tween' as Motion Tween generated an error and wouldn't work..

    Good tutorial though, help on this would be appreciated :)

see all

All Comments (62)

Sign In or Sign Up now to post a comment!
  • u say double click oval.. but when I double click it.. I dont have a timeline anymore

  • You are the best! your tutorial is simple but stunning! I've got it working! Great ! you saved my day! ;-)

  • thx man ur the best thx again

  • cảm ơn bạn rất nhiều ^^! (VietNamse)

    Thank you very much!

  • @AcousticTim I'm getting the same problem... :S 

  • THANK YOU LITTLE MASTER. Very useful.

  • What did you say at 4:40

    It sounds wrong

  • Hi, i was trying to add another button like this to the same movie but it keeps looping the first one i made, any idea why?

    

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