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!

using get URL to display jpg - won't work?

Status
Not open for further replies.

whoknows361

Technical User
Sep 22, 2005
228
US
I can't seem to figure this out. I simply want to use a getURL to open a .jpg in a new browser window.
I am getting the .jpg name from an array.

Here's what I got:
(part of a preload sequence)

preload.onLoadComplete = function(targetMC) {
targetMC.onPress = function() {
mypath = imagebiggest[_root.itemchoicenumber];
getURL(mypath, "_blank");
}

The press icon appears when u roll over the loaded clip so I know that the onPress function is working.
But when u click, it gives you a 404 error - page not found - and up at the address bar on top it says
I have tried to use the above code and added a trace to trace the mypath variable when u click. and the traced output is correct

What gives?

Jonathan
 
thanks for the reply kenneth - but it gets weirder

I changed the script a little so that it looks like:
(part of a preload sequence)

preload.onLoadComplete = function(targetMC) {
targetMC.onPress = function() {
mypath = imagebiggest[_root.itemchoicenumber];
level0.mainholder.itemMain.testerbox.text = mypath;
}

the weird thing is is that when I test the movies in flash - I get the correct path ie. (artshoesbiggest.jpg),
however, when I upload the same files the text box shoes
undefined.

Why this difference? Why would it work in flash and not in a browser? Any ideas?

Jonathan
 
onLoadInit doesn't work as well - I get teh same results. - and Kenneth - I am setting imagebiggest as an array which loads in xml data -. the project I am working on is 2 fla's an xml file and about 20 pics. Would it be ok to send it to you? As it would take some explaining to show you exactly how it is substantiated & what I am doing.

It seems so odd that it works in flash, but not in a browser (tried in firefox as well, same result)

Thanks for your help guys

Jonathan
 
No, all files for this project are within the same folder - and all xml data is loading perfectly/displaying fine in the flash project. - Just this one piece of data that is the problem.

Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top