Solved

button diirect to different page on website.

Posted on 2010-11-21
8
324 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
  • 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
 
LVL 5

Accepted Solution

by:
gingermoleman earned 500 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Could you point how to deal with this kind of PHP notation? 7 98
Make a file test.vbs using vbscript 5 63
excel file 5 67
Installing Git and chefdk via bat script 8 59
This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now