Welcome Guest ( Log In | Register )




                Web Hosting Guide

 
Reply to this topicNew Topic
A Button That Senses The Mouse, FLASH TUTORIAL : MOUSE ROLLOVER EFFECTS
Josh_Jpn
post Mar 16 2005, 01:32 PM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 24
Joined: 21-February 05
Member No.: 2,724


Creating a button that senses the mouse and then expands.

Requirement:

Flash MX


Step 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 1
Press f11(Window --> library) to bring up your library and then drag Ibutton movie clip onto your page

Step 4:

Click on Ibutton and then in the actions for Ibutton type the following:

on (press) { // Gives your movie a button functions
getUrl("http://www.astahost.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 clip
dist=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
Go to the top of the page
 
+Quote Post
Ray
post Aug 13 2005, 11:15 PM
Post #2


Newbie [ Level 2 ]
Group Icon

Group: Banned
Posts: 13
Joined: 11-August 05
Member No.: 7,776


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.
Go to the top of the page
 
+Quote Post
badmax
post Mar 18 2008, 07:28 PM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 18-March 08
Member No.: 29,215


yo thanks long but yeh i have made it out and looks awsome haven't but it on my web though lol

check my web out plz : tcpcheats.co.nr

thanks cool.gif
Go to the top of the page
 
+Quote Post
iGuest
post Jan 26 2010, 12:00 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


Flash tutorial
A 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 that Thanl you

-question by agnie

Go to the top of the page
 
+Quote Post
iGuest
post Feb 11 2010, 03:04 PM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


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
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   4 thepinder 825 20th February 2010 - 09:42 AM
Last post by: iG-Gaming Enthusiast
No New Posts   11 shiv 2,879 19th February 2010 - 11:26 AM
Last post by: iG-ambili
No New Posts   3 jord2 1,792 18th February 2010 - 02:13 AM
Last post by: iG-Tariq Khan
No New Posts   11 WeaponX 4,525 17th February 2010 - 09:48 PM
Last post by: iG-JuanCruz
No new   21 wannabeeaweak 7,939 6th February 2010 - 06:58 AM
Last post by: FirefoxRocks
No New Posts   6 shiv 4,395 14th January 2010 - 02:47 PM
Last post by: iG-Johnathan
No New Posts   13 YudzzY 7,266 31st December 2009 - 08:06 AM
Last post by: iG-praveen
No New Posts   1 itsdan91 369 28th November 2009 - 12:13 PM
Last post by: HannahI
No New Posts   1 xboxrulz 2,868 8th October 2009 - 04:48 PM
Last post by: iG-steph
No New Posts 10 Niru 1,484 23rd August 2009 - 11:33 AM
Last post by: yordan
No New Posts   4 hfbvm 1,034 26th June 2009 - 02:38 PM
Last post by: 100janovski
No New Posts   9 FirefoxRocks 2,458 29th May 2009 - 11:57 PM
Last post by: Atomic0
No New Posts   10 Solus 5,606 5th April 2009 - 11:36 AM
Last post by: iG-MIrza
No New Posts   17 ViRuaL 7,082 26th February 2009 - 05:10 PM
Last post by: iG-ViRuaL
No New Posts   2 sparkx 1,147 24th September 2008 - 11:25 PM
Last post by: sparkx


Web Hosting Powered by ComputingHost.com.
HONESTY ROCKS! truth rules.
Creative Commons License