Skip navigation
Currently Being Moderated

how to make a image on a slide bar navigate to home,contact, etc-page when clicked?

Jun 28, 2012 3:35 PM

Tags: #cs4 #flash #button #actionscript #cut #alt #short

im building a website i created the home,contact,fashion etc pages already. i also made a image slide bar for the home page but i want to navigate a pic when clicked to go to the home page but i cant seem to figure it out. im using flash cs4. i want it to be a short cut to different pages on the website

  • Currently Being Moderated
    Jun 28, 2012 4:45 PM   in reply to kbakablackwater

    If you show an image of what you mean, and explain it more clearly, someone might be able to offer some help.  If you tried something and it isn't working, you should include that as well.

    Mark as:
  • Currently Being Moderated
    Jun 28, 2012 7:20 PM   in reply to kbakablackwater

    One way you can do it is make that code you showed generic and place it in the main timeline on a layer that extends for the length of the timeline where that image scroller will be. 


    Have your btnHome (renamed to be btn below) work for all of the menu options by making it an invisible button that covers the image portion of the image scoller.  Then use a variable for the gotoAndPlay argument ('selectedPage' below) that you reassign in each frame of the image scroller.


       // main timeline


       var selectedPage:String =  "home";  // whatever the starting value should be


       function goToPage(evt:Event):void {




       btn.addEventListener(MouseEvent.CLICK, goToPage);


    Then inside yor image scroller in each frame you define a new value for the selectedPage variable. 


    For instance, in frame 2 you put:


        MovieClip(parent).selectedPage = "music";


    ... in frame 3 you put:


        MovieClip(parent).selectedPage = "artist";


    and so on

    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 4:42 PM   in reply to kbakablackwater

    You probably need to go back to what I took the time to write up for you already and read it thru carefully.  It tells you where the code goes and what that code is.


    I didn't say to use such a button, so I can't show you how it would look.  I said to use an invisible button that sits over the image portion of your slider (not inside that slider object).  An invisible button can be made by creating a new button symbol and placing a rectangle (or whatever shape) in only the Hit frame.

    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 6:25 PM   in reply to kbakablackwater

    You are not following what I posted.  There will be no btnhome - it will not be an image inside your slider, just one btn for all of them to share that is not part opf the slider.  You only change the frame label to go to.

    Mark as:
  • Currently Being Moderated
    Jul 4, 2012 6:12 AM   in reply to kbakablackwater

    You're welcome

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points