Nov 21, 2009

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

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Graphics and Animation > Flash and Shockwave

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

Josh_Jpn
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

 

 

 


Comment/Reply (w/o sign-up)

Ray
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.

Comment/Reply (w/o sign-up)

badmax
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

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : button, senses, mouse, flash, tutorial, mouse, rollover, effects

  1. How To Make A Scene Select Button
    Made by: Jordain joyce (2)
  2. Pre Loader Tutorial For Flash
    Made by: Jordain (7)
    Simple pre loader tutorial with play button by: Jordain Joyce First of all open up flash then
    Create 4 Layers and in order name them: Actions
    Loader outline
    Loader Bar Content Then create 3
    frames for each layer. Lets start in the actions layer, for the first frame make it blank and the
    second frame make it blank also. Press F9 to open the actions panel (make sure you ....
  3. Vaile's Flash Mx 2004 Tutorial!
    For Rollover Music Sigs (5)
    HOW TO MAKE A ROLLOVER MUSIC SIG IN FLASH MX 04 its a n00b job, but for you who cant do it...
    -------------------------------------------------------------------- 1. Firstly, we need to open a
    new document. 2. Now, bearing in mind the sig you want to use, set the size of the flash
    document like so: Note: These are the settings for my sig, you must make the size of your
    document the size of the sig you are using 3. Now, hold "ctrl" and press "r" to open the import
    window. find the sig you want to use and click open. 4. If it hasnt centered automat....
  4. Flash Webcam Room
    An easy flash application (8)
    Quick and Easy Webcam Chatroom Required: Flash Communication Server 1.5 Flash Step 1: Create a
    new folder called webchat in the c:\(Where ever you put your server files)\flash communication
    server mx\applications folder. Step 2: Open notepad file. Type: load( "components.asc" ); Save
    file as "main.asc" in the webchat folder. Step 3: Open Flash and save file as "webchat" in the
    webchat folder From the Communications Components side bar: 3.1 Drag a SimpleConnect onto your
    flash page 3.2 Drag a SetBandwidth onto your flash page, in the properties box change the c....
  5. Matching Sound To Animations In Flash
    (2)
    This is something I worked at for a while. I used to play sounds by selecting start on the
    properties tab, and the animation never lined up with the sound waves on timeline. If you switch it
    to stream, it changes the wave and allows animation to be aligned to the sound. Also, a sound can be
    cut short by not extending the frames enough, so beware. Hope I helped again Peace Aaron....
  6. Using Sprites In Flash
    Pictures in a series (2)
    Sprites, as you may or may not know, are pictures in a series used for animations. They are very
    helpful in flash as you can use pre-made/pre-sized pictures and don't have to draw the animation
    yourself. To use a sprite, first open a new window. Make sure the sprites are saved as separate
    files, and then click file->import->import to library and import all the sprites. select the first
    frame, and drag the picture from the library to the stage. Take note of where it is located on the
    stage by looking at the properties tab. click 2-6 frames later(depending on how fast ....
  7. Using Symbol Effects In Flash
    Symbol Effects (0)
    Flash Tutorial 4: Symbol Effects The last thing I will cover with this series of tutorials for
    Flash Macromedia is effects/transitions/transformations which are probably the easiest to use but
    since there are so many things that can be done with them easily - I feel it's worth covering
    and learning for any begining flash designer. 1. 1st open a blank Flash Document 2. create a
    keyframe(select and press F6) on the first frame in the timeline(top of flash window) 3. Use the
    circle tool and draw a circle of desirable size on the canvas. If you have been following ....
  8. Introduction To Mask Layers In Flash
    Mask Layers (0)
    Flash Tutorial 3: Mask Layers Mask Layers are a good way to show content underneath the top layer
    in a flash movie. To get familiar with the effect you really need to do it a few times to
    understand the potential. 1. Start with the bottom layer you have already. Paste something into it
    that takes up most of the canvas ie. jpeg or something. 2. Insert a new layer into the timeline.
    (select the layer 1 and click the button in the lower left corner of the window) 3. Lock 'Layer
    1'. (There is a lock next to the colored box for the layer on the left panel of th....
  9. Shape Tweening In Flash
    Shape Tweening (2)
    Flash Tutorial 2: Shape Tweening Shape Tweening is basicall where you have 2 shapes and you morph
    one into the shape of the 2nd shape. The procedure to do this is quite simple really : 1. 1st open
    a blank Flash Document 2. create a keyframe(select and press F6) on the first frame in the
    timeline(top of flash window) 3. Use the circle tool and draw a circle of desirable size on the
    canvas. 4. Select a subsequent frame on the timeline like frame 24 (sec @ 12frames/sec) press F6 to
    insert a keyframe. Your drawn cirlce should appear again after this step. 5. DO NOT CO....
  10. Motion Tweening In Flash
    Simple Motion Tweening (0)
    As many know - Flash Macromedia is en vogue these days and you can actually do some pretty cool
    stuff with it. I'm going to do a couple of simple tutorials to get those people started using
    flash. Once you start to use it and get some of the basic concepts, you can do some cool simple
    animation for your websites or whatever. Tutorial 1: Simple Motion Tweening Motion tweening is
    basically a quick way to animate something. 1. First you need to draw an object on the screen (you
    can also import a graphic or something too). Make sure you get the graphic or drawing ....

    1. Looking for button, senses, mouse, flash, tutorial, mouse, rollover, effects

See Also,

*SIMILAR VIDEOS*
Searching Video's for button, senses, mouse, flash, tutorial, mouse, rollover, effects
advertisement



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

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com