A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: [RESOLVED] Some ActionScript help

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    10

    resolved [RESOLVED] Some ActionScript help

    Hi ! I have worked on this little project of mine, and now I'm really stuck.
    I need kinda help with making the animation start when you roll over it... so
    if anyone is interested in helping me.. take contact or send me a PM here if that's available..

  2. #2
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    put the animation in a movieclip. on the first frame of this movieclip, put a stop();, then with the movieclip on stage, put an on(rollover) on the movieclip to make it play(); hope this helps, need more help, just ask.
    If you don't think you're going to like the answer, then don't ask the question.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    I'm very new to flash so, is it possible that you could post the code or something ?

  4. #4
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    here is the simpliest of examples i can come up with.
    if u need more help, just ask. you could also post your animation fla
    Last edited by EQFlash; 07-26-2008 at 06:02 PM.
    If you don't think you're going to like the answer, then don't ask the question.

  5. #5
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    Thanks a lot helps a lot, but what will the code look like if there's more than one movie clip that's moving ?
    Attached Files Attached Files

  6. #6
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    i wish you had stated what version of actionscript you were using, i know how to do it in AS2, but not yet with AS3. sorry
    If you don't think you're going to like the answer, then don't ask the question.

  7. #7
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    Oh, but can I somehow get my work over to AS2 or start over again in AS2 ?
    The same effect is possible in AS2 right ?

  8. #8
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    i could fix your in as2, but when i opened it, it was created for as3, now if you like i can switch it to as2 and give it back to you, with the rollover. and you always indicate what version of flash you're using so you can get the help you need.
    If you don't think you're going to like the answer, then don't ask the question.

  9. #9
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    Would you do that for me ?
    Thanks alot man.. And I'll remember to say what Actionscript I'm using..

  10. #10
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    do you want the animation to stop when gets to the end, or return to the beginning?
    If you don't think you're going to like the answer, then don't ask the question.

  11. #11
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    Stop and you know.. make it reset and stop if the mouse is taken away from it.. if thats possible ?

  12. #12
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    do you want on mouse out for the animation to stop where's it at, or go back to the beginning?
    If you don't think you're going to like the answer, then don't ask the question.

  13. #13
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    hmm... go back I think

  14. #14
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    let me know if this is what you want
    Last edited by EQFlash; 07-26-2008 at 06:02 PM.
    If you don't think you're going to like the answer, then don't ask the question.

  15. #15
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    It's awesome, but could you adjust it to go back to the beginning when the mouse isn't on ?

  16. #16
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    you can do this. in the one i sent, go to the layer where the actionscript is, and replace
    PHP Code:
    my_mc.onRollOut = function(){
       
    this.stop();

    with this
    PHP Code:
    my_mc.onRollOut = function(){
       
    this.gotoAndStop(1);

    this will take it back to frame 1 of the animation when you mouse off of it.
    HTH
    If you don't think you're going to like the answer, then don't ask the question.

  17. #17
    Junior Member
    Join Date
    Jul 2008
    Posts
    10
    Thanks a lot..
    It's perfect and I'll learn from this

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