dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Button

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    122

    Button

    When I paste a button inside a movie clip .. how come it doesn't work ?? did I miss out on something ?? one more thing is that ... When a user roll over my button .. the button would be animate to open and it's around 15 frames ... so when the user roll out the button would animate to its first position .. but wat I worry is wat happens if while halfway the button aimate ..and the user roll out .. how do I go about his ? do I use labels ??
    Last edited by doran_lum; 11-15-2002 at 08:33 PM.

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    1,017
    u can use action script that will tell the movie to continue playing untill it finish, and then if the user already roolout, go to rollout position
    mey the swartz be with you

    http://www.amirlotan.com

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    If the button is in a movie clip, I expect it is not working because the paths the actions on the button uses are now wrong. Eg

    on (release) {
    gotoAndPlay(2);
    }

    will do the gotoAndPlay(2) on the timeline the button is currently contained in. To get it to target the main timeline from within a movie clip you can use

    on (release) {
    _root.gotoAndPlay(2);
    }

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    122
    thanks .. but then about the roll over and roll out ... is it best to use labels ?? I dun think going from scene to scene would be good ...

  5. #5
    Senior Member
    Join Date
    May 2002
    Posts
    122
    Sorry .. I just try out the button.. it did work for frame to fram .. but wat about scene to another scene ?? it doesn't seem to work ...

  6. #6
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    To change scenes you need to put a frame label on the first frame of the scene you want to goto and then use

    _root.gotoAndPlay("frameLabelName");

    as the action tiggered by your mouse event.

  7. #7
    Senior Member
    Join Date
    May 2002
    Posts
    122
    I wanna ask for example my flash is full screen ... and if the user wans to quit I wan to let the user press a button to quit .. is it using the key.escape ??

  8. #8
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Alt + F4 will close the window, you can also make a button to do it though, if you are making a projector file

    on (release) { // or on some key press, whatever
    fscommand("quit");
    }

    or in an html page

    on (release) {
    getURL("javascript:parent.close();");
    }

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