A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Changing Frames

  1. #1
    Senior Member 4romAshz2Flashz's Avatar
    Join Date
    Mar 2004
    Location
    Ontario, Canada
    Posts
    213

    Changing Frames

    I currently have 3 buttons on my scene which use the gotoandplay(movieclip) actionscript when the user rollsover a button. The movie clip shows only 1 frame and then stops. These 1 frames contains a description of button. If I roll over the buttons then go somewhere else, then come back it won't show the correct one right away. It will show the original frame that is shown when the page first loads. I have to roll over it awhile for it to change.

    Is there any solution to this problem? Or is there a better way of creating this?

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    if you want to continue using frames, keep in mind that the playhead moves left to right so make sure you have stops in the right places, and for something like what your describing i'd use a single timeline with 3 frames only and 2 layers - layer 1 has all 3 buttons and appears in all 3 frames; layer 2 has button 1 description in frame 1 and a stop action, button 2 description and stop in frame 2, etc for button/frame 3; then just gotoAndStop() on each of the buttons...

    buttttt another way to do it (doesnt really matter if you're only talking about 3 buttons, but if you're project gets bigger this will be much easier) is:

    make a dynamic text field
    leave it blank
    in the "var" box type "desc"
    in frame one of main timeline put desc = "";
    on the buttons put
    on(rollOver)
    {
    desc="put your description here";
    }

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