A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Need to stop a M/Clip ???

  1. #1
    Member
    Join Date
    Mar 2001
    Posts
    80

    Hi,

    I need to stop a M/Clip at a certain point on the stage.

    ( I have an animated man walking from one side of a room to the other and I need his feet to stop moving when he finally reaches the other side, at the moment he walks fine but then carrys on when he gets to the destination - he looks like Michael Jackson at this point !!! (which isn't good !!).

    Something to do with Actionscript ?????

    Thanks

  2. #2
    Buğra ÖZDEN
    Join Date
    Mar 2001
    Location
    Turkey
    Posts
    52
    moveclip = what your moveclip name

    tellTarget ("/moveclip") {
    stop();
    }

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Posts
    421
    a simpler way (in my opinion) is to use dot notation. give your movie clip an instance name...eg "movieclip" then put these action on the main timeline where you want the MC to stop:

    movieclip.stop ();

    ("movieclip" is the instance name, you could use whatever you want for it)

  4. #4
    Junior Member
    Join Date
    Jun 2001
    Posts
    24
    I had the same kinda problem, only with a graphic... is it possible to script inside instances? or does all the scripting have to be controled on the stage?

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    421
    yes, you can script inside instances. You can script just about anywhere you want, it's not limited to the root timeline. You can add actionscript to any timeline you want, (movie clips, main timeline) or you can add script to movie clips directly, or to buttons.

  6. #6
    Junior Member
    Join Date
    Jun 2001
    Posts
    24
    OK, but i can't script on(rollover) in instances.

    or am i doing it wrong, if so, how do ya script it in instances.

  7. #7
    Senior Member
    Join Date
    Apr 2001
    Posts
    421
    on(rollover) is to be used in buttons. Then the actions will be run when the mouse moves over the button. If you would like to use this action on a MC I would suggest putting an invisible button behind it and attaching the actions to the button.

  8. #8
    Junior Member
    Join Date
    Jun 2001
    Posts
    24
    Yea, i did that. Only the 'stop' command isn't working. I made a loop, so that when the button is rollover it would go to next frame. But the stop button doesn't work. I copied the frames and put them onto the main stage and it worked fine. example of button [swf width="100" height="60" background="#000000"]http://www.geocities.com/gauek0/main/basic.swf[/swf] but that is using the main stage for scripting, i want to have all of my buttons in one .swf file. I copied the frames and put them in a mc, stop command didn't work. Same thing happened when i put it in graphic. more of the buttons at LoOkAgAiN

  9. #9
    Senior Member
    Join Date
    Apr 2001
    Posts
    421
    send me your fla and i'll take a look at it for you. If you dont mind that is, send it to: cletus_is_a_hick@hotmail.com

  10. #10
    Junior Member
    Join Date
    Feb 2002
    Posts
    1
    I've been having the same problem trying to stop my movieclip. Both the button and the movieclip I'm trying to stop are on the main stage. shouldn't it be just a matter of saying

    on (release) {
    treeSpin.stop();
    }

    Why wouln't this work? Thanks in advance...

  11. #11
    Senior Member
    Join Date
    Apr 2001
    Posts
    421
    The actions you have should work. Make sure you gave the MC the instance name "treeSpin". Keep in mind that actionscript is case sensitive, so make sure you don't have the instance name "treespin" or something like that.

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