dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: basic button scripting

  1. #1
    Up and Comer DMB Lover 41's Avatar
    Join Date
    Apr 2002
    Location
    Chicago, IL
    Posts
    506

    basic button scripting

    I want an animation to play on a rollover, and stop if the cursor is still on the button, and then play a different animation on roll out. Based on another button I used, I got the animation to work...
    on (rollOver) {
    btnPlay = true;
    play();
    }
    on (rollOut) {
    btnPlay = false;
    play();
    }
    While the animation works, I can't get a goto to another frame or scene to work without the animation not working anymore. However, a getURL works fine with the animation? Any tips? I tried to use a tell target but that didn't work either. Thanks for your help. To get an idea of what the buttons do, check out this link...
    http://jupiter.millikin.edu/~rmconra...nts.mu/pantel/

    thanks

  2. #2
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    put that .fla into a .zip file and attach it to the post and ill get it going for you, and tell you how i did it. I just work better when I hav the file in front of me.

    cheers,

  3. #3
    Up and Comer DMB Lover 41's Avatar
    Join Date
    Apr 2002
    Location
    Chicago, IL
    Posts
    506
    thanks a lot...it's a really rough stage...just getting things worked out before organzing it and cleaning it up.
    Attached Files Attached Files

  4. #4
    Junior Member
    Join Date
    Oct 2003
    Location
    New Jersey
    Posts
    10
    The file that you attached contains the SWF file, I think bfly was looking for the original FLA file.

    I may be misunderstanding what you want to do, but could you make a new MC for the "over" state of the button? Then you could just do a hitTest on that MC to control the animation. I think that would solve any scope issues...

  5. #5
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    yes, i am looking for the .fla. But go ahead and try hitTest thing. If that dosen't work go ahead and throw the .fla up to me and i should have an answer for you soon.

    cheers,

  6. #6
    Up and Comer DMB Lover 41's Avatar
    Join Date
    Apr 2002
    Location
    Chicago, IL
    Posts
    506
    oops...sorry i thought i was zipped the fla
    thanks for all your help
    Attached Files Attached Files

  7. #7
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    DMB Lover,

    are you using MX or MX2004?

  8. #8
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    I have got to goto class now, I'll be back in about 2-3 hours.

    cheers,

  9. #9
    Up and Comer DMB Lover 41's Avatar
    Join Date
    Apr 2002
    Location
    Chicago, IL
    Posts
    506
    I'm using MX

  10. #10
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    ok I got it working. But you are going to have to do a little modifying.

    Check out the code on the button. it is commented very well, to help you understand what changes need to be made when you place this code on your buttons.

    The reason why your buttons were not working was because they were not on the main timeline, they were inside a symbol. You can get around this, but I am not sure how.

    If you have any more problems just holla.

    cheers,
    Attached Files Attached Files

  11. #11
    Up and Comer DMB Lover 41's Avatar
    Join Date
    Apr 2002
    Location
    Chicago, IL
    Posts
    506
    thanks so much for your help

  12. #12
    The Insane bfly03's Avatar
    Join Date
    May 2001
    Posts
    692
    glad to help.

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