• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jun 28, 2012 Jun 28, 2012

Copy link to clipboard

Copied

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

TOPICS
ActionScript

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 28, 2012 Jun 28, 2012

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

  

   va

...

Votes

Translate

Translate
LEGEND ,
Jun 28, 2012 Jun 28, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2012 Jun 28, 2012

Copy link to clipboard

Copied

hey Ned..

im using this to run for my home page

function gohome(evt:Event):void {

          gotoAndStop("home");

}

btnhome.addEventListener(MouseEvent.CLICK,gohome);

''AND IT WORKS PERFECTLY''

I MADE THIS IMAGE SCROLL BAR AND IMPORTED IT TO MY TIMELINE

Screen shot 2012-06-28 at 5.02.08 PM.png

im trying to program the image on the scroll bar to go the home page

(here's where it is on the timeline)

Screen shot 2012-06-28 at 5.15.53 PM.png

(if i double click the menubar here is where i end up)

Screen shot 2012-06-28 at 5.17.42 PM.png

I DONT KNOW HOW OR WHERE TO PUT THE CODES SO THAT WHEN I CLICK ON THE IMAGE IT NAVIGATES TO ITS LOCATION,

Screen shot 2012-06-28 at 5.25.47 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 28, 2012 Jun 28, 2012

Copy link to clipboard

Copied

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 {

          gotoAndStop(selectedPage);

   }

   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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

where in my main time line would i put the first code ?

and where inside my image scroller would i put the second code?

can you show me what it would look like if i made the image into a button and named it btnnewreleasebar

and i wanted to navigate it to the newrelease page . how would it look like ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

here's where im having trouble

do i code it like this

(lets use home for ex.) ( home=homepage & btnhome=the image on the scrollbar)

ex1)  var home:String =  "home";

   function gohome(evt:Event):void {

          gotoAndStop(home);

   }

btnhome.addEventListener(MouseEvent.CLICK, gohome);

MovieClip(parent).home= "home";

or

ex2) var selectedPage:String =  "home";

   function goToPage(evt:Event):void {

          gotoAndStop(home);

   }

   btnhome.addEventListener(MouseEvent.CLICK, goToPage);

MovieClip(parent).selectedPage= "home";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

I figure it out Ned!! thanks a million buddy !!!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 04, 2012 Jul 04, 2012

Copy link to clipboard

Copied

LATEST

You're welcome

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines