A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: FLASH MovieClip

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    17
    Hi,

    I am new to Flash and was messing around with it a little bit.

    I created a movieclip, which is static on the Level0, but what I want to do know is when the user moves over with the mouse, it should go to a particular Frame in the MovieClip,

    how can I work this out,...

    I don't want to use a button this this, cause I want an animation,...

    thanks

    GzArIa

  2. #2
    Junior Member
    Join Date
    Jan 2001
    Posts
    6

    Here ya go

    I know you dont want to use a button but you can and still get the effect you want. In the movie clip on the first frame should be whatever you want. Make a sqaure about the size of whatever is on the first frame. Make it a button then alpha it to zero. so now its an invisible button. Give it the actions:
    on (rollOver) {
    gotoAndPlay (whatever frame you want);
    }
    If it doesnt work for you Ill E-mail you an fla.


  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    467
    hi,

    you right-click on the movieclip, in the menu click on actions and in the action dialog box you place this code:

    Code:
    onClipEvent (mouseMove) {
        frame = this._currentframe;
        if ((hitTest(_root._xmouse,_root._ymouse, true)) and (frame eq something)) {
            gotoAndPlay (1);
        } else {
            gotoAndStop (1);
        }
    }
    I will explain this code. every time you move the mouse this code will run. first it looks at the current frame of the movie clip. (to see if it hasn't already started the animation). then if the mouse if over the mc (hittest) and the current frame is equal to the first frame of your movie clip (where the animation has not yet begun, the animation will start. if this is not true, the movieclip will go to the first frame.


    ^1letser


  4. #4
    Junior Member
    Join Date
    Jun 2001
    Posts
    17

    Problem

    The last solution is quite good, but the problem is when I move into the MovieClip it animates but if I continue to move the mouse, the MovieClip always starts from the beginning again,... without even doing the whole animation,...


  5. #5
    Senior Member
    Join Date
    Sep 2000
    Posts
    467
    mmmmmmmmmm, don't really know what could be the problem.
    did you change this code to yours ??
    you should replace 'something' with the frame number where the movieclip will be when you don't go over it.

    ah maybe this, you see the line under the if statement, it says 'gotoAndPlay(1);' replace the 1 with the first frame of the animation.


    and why the hell isn't the email notification working ???
    ^1letser

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center