Results 1 to 2 of 2

Thread: _visibility and gotoAndPlay

  1. #1
    Join Date
    Nov 2005
    Location
    Austin TX,US
    Posts
    71
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default _visibility and gotoAndPlay

    I have:
    frame1[key frame]--->frame4 : intro_btn._visible = true;
    frame5[key frame]---> fram30: intro_btn._visible = false;

    My simple question is: why when the timeline runs by itself, my button visibility changes ok, but if I use gotoAndPlay(6), my button visibility is still "true," instead of "false."

    I know f6 is not a key frame, but on the timeline, the actionscript goes from 1-4, and 5-30, so the actions should be effective for all those frames? Am I right?

    What else should I do in order to use gotoAndPlay(6) as above besides turning 6 into a keyframe?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    The simple answer is because of the way Flash reads the timeline.

    Think of it as hop-scotch. You start on 1, and jump to 3, completley by-passing 2.

    Same thing, any rules you make on frame 5 will only be in effect if the time line lands on 5, if you by-pass it Flash will remember only the last rules it landed on.

    The best way to do something like that is to add:

    Code:
    on(release){
        intro_btn._visible = false;
    }
    To the button you have the gotoAndPlay96); on.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •