View Full Version : getURL problem !!!!!!!
adham_a
June 8th, 2003, 08:48 PM
Hello all,
I want to open an HTML file from flash i placed the following code in the action menu of my button:
on (release) {
trace("SDF");
link = "C:\\test\\Flash Files\\Anim\\NICOLEanimatingRand.html";
getURL(link, "_blank");
}
when i am trying my code by ctrl + enter nothing happens i just get the trace message.
any idea what is wrong
thanks
thoriphes
June 8th, 2003, 08:58 PM
actually, the way you're doing it is incorrect. it's really odd how flash gets local paths. it doesn't follow the traditional windows way of using backslashes (\), but like this:
file:///c|/txtfileontheCdrive.txt
it's really complex like that. to show you what i'm talking about, make a new window and in frame one add this actionscript:
trace(_url);
that'll output the path of the swf that was made. it's quite sketchy if you ask me. so to fix your code...
on (release) {
trace("SDF");
//link = "C:\test\Flash Files\Anim\NICOLEanimatingRand.html";
link = "file:///c|/test/Flash%20Files/Anim/NICOLEanimatingRand.html";
getURL(link, "_blank");
}
adham_a
June 8th, 2003, 09:02 PM
thanks for your reply but i also tried the relative addressing thing and i used :
link = "..\Flash Files\Anim\blabla.html";
my flash file is in Flash Files directory (obvious)
but it didn't work again. The problem is that i am not getting even an error which is in fact making me angry :pirate: because that means the the command is not reacting or something like that
grimdeath
June 8th, 2003, 11:29 PM
just do this
ActionScript:--------------------------------------------------------------------------------
on (release) {
getURL("NICOLEanimatingRand.html", "_blank");
}
--------------------------------------------------------------------------------
if its in the same dir as the swf file maybe the trace condition or the cat that your using a variable for the link causing the problem
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.