dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Easy navigation question

  1. #1
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768

    Easy navigation question

    OK, I want to have a transition animation that is the same for every "page". What is the best way to have on a button click for it to go to the transition scene and at the end of the scene have a getUrl on the last frame?

    The noob way would be to make 5 individual scenes for each page and just have the buttons go to the different scenes but I would rather have one scene.

    If you understand what I'm getting at any help would be greatly appreciated.

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    place your transition, and pages inside of movieclips
    send variables from your button actions to either a main timeline
    function, or to a movieclip timeline event
    use the variables to determine your transition to new page routine

    hth

  3. #3
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768
    one small note, the pages are seperate html files sorry that wasn't clear

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    Soething like this should work

    button on main timeline -
    on(press){
    animation.play();
    uUrl = "http //www.somesite.c om";
    }

    movieclip <instance name> animation on main timeline -
    frame#1 -
    stop();

    frame#2 -
    path = _parent.uUrl
    trace(path);

    end frame -
    getURL(path,"_blank");

  5. #5
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768
    ok doing well so far but it's not calling the url

    the btn is in an mc with an instance named 'btns' in mc named 'nav' then the top level that containes the animation

    so I put this on the second frame of the 'animation' mc:
    path = _parent.nav.btns.uUrl
    trace(path);
    why is this wrong? and keep in mind your talkin to a stoopid designer.
    thanks!

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    easiest fix is to go _global with the url variable,
    try -
    button -
    on(press){
    animation.play();
    _global.uUrl = "http //www.somesite.c om";
    }

    movieclip
    frame#2 -
    trace(uUrl);
    end frame -
    getURL(uUrl,"_blank");

  7. #7
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768
    hey! thanks a lot man. This works perfectly.

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

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