Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash code stopped working - sort of

Status
Not open for further replies.

def333

MIS
Jan 18, 2006
6
US
i am a web developer/coder and was asked to come up with a flash file that will display a different logo depending on the incoming url. The url value is passed to the file and then an if/else script selects the logo display.

frame 1 has this:
stop();

var urlSource;

if (urlSource == " {
this.gotoAndStop(3);

}
else{
this.gotoAndStop(2);
}


frame 2 has the default license logo
frame 3 has the logo specifically for license-europe

if the url is entered no logo displays. however, a simple shift-refresh will cause the movie to show properly. once the logo image is cached it works properly every time. if i clear the browser cache and try again, it's back to the problem. the same acts for the default display for
this used to work back in the spring and only last week it was brought to my attention that it no longer does.

any suggestions would be greatly appreciated as i am completely baffled.

cheers,
def
 
thanks for the help, but that didn't do it either.

any other suggestions? anyone? bueller?

 
Try this, what do you get in the Output?
[tt]
trace("urlSource: "+urlSource);
if (urlSource.indexOf("license-europe")<0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
stop();
[/tt]

Kenneth Kawamoto
 
hey kenneth,

your code created errors in flash. one was the syntax of the gotoAndStop and the other was a "}".

this whole thing has to have something to do with the initial passing of the variable. i'm no action scripter, but this is baffling me.

thanks anyhow.
 
my developer is using java to identify the source url and then appends it to the flash call.

thus, ending up with

var so = new SWFObject('/licensemag/data/site/licensemag/licensemaglogoImage1155759784099.swf?urlSource= 'siteLogo', etc............

any thoughts
 
> your code created errors in flash.

Really? There isn't much to go wrong with this simple script, make sure you typed it right!

Anyway just do this:

trace("urlSource: "+urlSource);

Do you get the correct string?

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top