Jump to content
xisto Community
Sign in to follow this  
Josh_Jpn

A Button That Senses The Mouse FLASH TUTORIAL : MOUSE ROLLOVER EFFECTS

Recommended Posts

Creating a button that senses the mouse and then expands.Requirement:Flash MXStep 1:Open a new document.In the actions for frame 1 of layer name layer 1 type:menutriggerdist=150;menumaxscale=300;menumultiplier=1.5;This control how and when the mouse interacts with button. Once you have completed all the steps, change them around and see how each one changes the effect.Step 2:Cntl+f8 (Insert --> New Symbol)Click on new movie click, call it Ibutton.In the frist frame create your image or whatever you want the mouse to interact with , to make it easy you can just type some text in the center of the frame.Step 3:Go back to the scene 1Press f11(Window --> library) to bring up your library and then drag Ibutton movie clip onto your pageStep 4:Click on Ibutton and then in the actions for Ibutton type the following:on (press) { // Gives your movie a button functions getUrl("http://forums.xisto.com/;);}on (rollOver) { this._alpha=100;}on (rollOut) { this._alpha=25; }//sets event to mousemove or your button won't operate properly.onClipEvent (mouseMove) {//calculates distance from mouse to movie clipdist=Math.sqrt(Math.pow(Math.abs(_xmouse),2)+Math.pow(Math.abs(_ymouse), 2));// if within a certain distance, triggerdistance, then start changing the clips scale if (dist<=_root.menutriggerdist) { currscale=(1-(dist/(_root.menumultiplier*_root.menutriggerdist)))*(_root.menumaxscale-100); this._xscale = currscale; this._yscale = currscale; // if outside of triggerdistance, then make the scale equal to 100 } else { this._xscale = 100; this._yscale = 100; }}Step 5:Test your new button

Share this post


Link to post
Share on other sites

Thanks alot for the info. Of course since it's obvious what I am trying to do here I would still like to show that your information is appreciated. It's quantity and quality that matters here... anyways, your work hasn't gone out unnoticed.

Share this post


Link to post
Share on other sites
Flash tutorialA Button That Senses The Mouse

I'm loking for Flash tutorial how to play the movie when mouse pressed down (click) please if some one can help me to write the code for thatThanl you

-question by agnie

Share this post


Link to post
Share on other sites

I need step by step on placing my whale picture on my stage as my upstage then when I hover or mouse over it enlarges, but I need it for Flash CS4.

Can you help. Need fast, have to turn in project by next week.

 

rocki

Keywords: step by step tutorial on creating pic buttons that enlarge on hover in flash

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.