?
Solved

button diirect to different page on website.

Posted on 2010-11-21
8
Medium Priority
?
332 Views
Last Modified: 2012-06-21
I have a flash that works pretty good except the "read more' button should direct to  a different page depending on what is selected.

if you open the swf file you will see that if you click the read more button it works correctly, but once you select the nose,throat, etc. that the read more doesn't work anymore. It should send you to the correct page depending on what item you are reading.


Source code can be downloaded from here:            www.techprotest.com/slideshow1.fla
slideshow1.swf
0
Comment
Question by:techpr0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:gingermoleman
ID: 34185143
Hi,

Your source files zip is corrupted but the code your after is generally as shown:

//this should exist at the same point (in the timeline) as the button
var url:String = "http://www.yourpage.com";
var request:URLRequest = new URLRequest(url);
navigateToURL(request, '_blank');

//This line to be repeated whenever you change to another category
url = "http://www.yournewpage.com";

Hope this helps

GMM
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 34194069
if  you haven't come right, please save your file for CS4 and we'll have a look.
0
 

Author Comment

by:techpr0
ID: 34223549
Sorry for the delayed response. I have saved the file as cs4. I also tested the solutionby gingermoleman with no luck. If you run this file and immediately click "read more" it works right, but if you rollover any of the buttons prior it does not.

Source code can be downloaded from here:            www.techprotest.com/slideshowTest.fla
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Accepted Solution

by:
gingermoleman earned 2000 total points
ID: 34223571
Hi,
okay, this is in as2, which im not overly familiar but well give it a crack!

You say its working for Ears right?
well you need to change this function

images_mc.my11_btn.onRelease = function(){
getURL("ear.aspx", "_self");
}

to something like
var myUrl = "ears.aspx";
images_mc.my11_btn.onRelease = function(){
getURL(myUrl, "_self");
}
 then in all you onRelease code eg
images_mc.my44_btn.onRelease = function(){
getURL("neck.aspx", "_self");
}

this should be

images_mc.my44_btn.onRelease = function(){
myUrl="neck.aspx";
}


GMM
0
 

Author Comment

by:techpr0
ID: 34223590
I changed it per your response to the following with no luck. the read more button doesn't do anything.
menu_mc.my1_btn.onRollOver = function(){
images_mc.gotoAndStop(1);
}

var myUrl = "ears.aspx";
images_mc.my11_btn.onRelease = function(){
getURL(myUrl, "_self");
}

menu_mc.my2_btn.onRollOver = function(){
images_mc.gotoAndStop(2);
}

images_mc.my22_btn.onRelease = function(){
myUrl="nose.aspx";
}

menu_mc.my3_btn.onRollOver = function(){
images_mc.gotoAndStop(3);
}

images_mc.my33_btn.onRelease = function(){
myUrl="throat.aspx";
}

menu_mc.my4_btn.onRollOver = function(){
images_mc.gotoAndStop(4);
}

images_mc.my44_btn.onRelease = function(){
myUrl="neck.aspx";
}

menu_mc.my5_btn.onRollOver = function(){
images_mc.gotoAndStop(5);
}
images_mc.my55_btn.onRelease = function(){
myUrl="allergy.aspx";

}

Open in new window

0
 
LVL 5

Assisted Solution

by:gingermoleman
gingermoleman earned 2000 total points
ID: 34223635
my bad, found your issue.
You said your code worked for the 1st selection right but not the others?
this is because you do actually have 1 button per zone not one button overall.
these are my11_btn, my22_btn, my33_btn, etc

so, basically take your one working click

images_mc.my11_btn.onRelease = function(){
getURL("ear.aspx", "_self");
}

and duplicate it to
images_mc.my22_btn.onRelease = function(){
getURL("nose.aspx", "_self");
}
 etc

GMM
0
 

Author Closing Comment

by:techpr0
ID: 34223992
I tried this with no luck, but I noticed where you said you thought I had one button overall so I made it one button and used your previous solution to get it to work. Thanks.
0
 
LVL 5

Expert Comment

by:gingermoleman
ID: 34225273
excellent, glad it helped!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question