Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Button script won't work!

    Hi there,
    I've got a very simple rollover button animation, and i'm trying to script the buttons in it to control navigation in the parent timeline.
    I'm new at this, and i can't seem to get it to work.
    If i can get one to work, i can get the others. Right now i just want to get the About Us button to link to the "About" fram label on the parent timeline.
    File is attached.
    Anyone have any advice?

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2

    Default

    sorry, file size limitations won't allow me to upload the file. I can email it to someone if you think you can help.
    Thanks!

  4. #3

    Default

    ok, i was able to make it much smaller. here is the file.
    thanks
    Attached Files

  5. #4
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    I dont download files, but your problem should be an easy fix. If your button has an instance name, you can use frame code to allow it to target a frame label...

    Code:
    mcInstanceName.onRelease=function(){
    _root.gotoAndStop("frameLabel");
    }
    ... if your using object code directly on the button itself...

    Code:
    on(release){
    _root.gotoAndStop("frameLabel");
    }
    ...targeting a frame label inside a movieclip instead of the main timeline..
    Code:
    on(release){
    _root.mcInstanceName.gotoAndStop("frameLabel");
    }
    hope it helps
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  6. #5

    Default

    Thanks!
    I found this code that allows the scroll down menu to scroll back up on rollOut, and i'm trying to use your code in conjunction with it to have a smooth rollover as well as links to the main timeline. It's not working. Here's my code. Please let me know if you can figure out how to make the buttons work. I also tried it with the actionscript on the button objects themselves, and no luck...

    stop(); // stop the movie clip from playing (stop button from growing, we want that when the mouse rolls over only

    this.onEnterFrame = function(){
    if(rewind == true){ //if rewind switch is set to true play backwards
    prevFrame(); // play backwards
    }
    }
    this.onRollOver = function(){
    rewind = false; //set variable (or switch) that decides wether ot not to play backwards...
    play(); // play this movie clip.. (grow the button(tween));
    }
    this.onRollOut = function(){
    rewind = true; //set or rewind switch to true so it will play backwards...
    }
    mc.about_btn.onRelease=function(){
    _root.gotoAndPlay("About");
    }
    mc.press.onRelease=function(){
    _root.gotoAndPlay("PressRelStart");
    }
    mc.photos.onRelease=function(){
    _root.gotoAndPlay("PhotosStart");
    }
    mc.green.onRelease=function(){
    _root.gotoAndPlay("GreenInitStart");
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

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
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial