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
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
...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.
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
im trying to program the image on the scroll bar to go the home page
(here's where it is on the timeline)
(if i double click the menubar here is where i end up)
I DONT KNOW HOW OR WHERE TO PUT THE CODES SO THAT WHEN I CLICK ON THE IMAGE IT NAVIGATES TO ITS LOCATION,
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
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 ?
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.
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";
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.
Copy link to clipboard
Copied
I figure it out Ned!! thanks a million buddy !!!!!
Copy link to clipboard
Copied
You're welcome