Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

button diirect to different page on website.

Posted on 2010-11-21
8
Medium Priority
?
335 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

604 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