pubs3
February 18, 2003, 5:04pm
1
Hi to everyone…
My problem is simple. I did it with a button but a need without button. Here it is ;
I made an asp which was displaying an output from an acces DB like ;
&news=example&news_image=example.jpg&result=ok
i’m getting the variables to my swf. When i try to load image at Frame 3 there is nothing. Here is the code.
Frame 1
var news_img
loadVariablesNum(“news.asp”, 0);
Frame 3
news_img=news_image
loadMovie(“news_img”, “news_image_mc”);
Frame 5
if (result==“ok”) {
gotoAndStop(7);
} else {
gotoAndPlay(3);
}
Frame 7
stop();
What’s the problem do you think ? By the way, as i say at the top, button solve the problem but i don’t want users must click a button. it loads the jpg file when the page opened.
Thanx For All…
system
February 18, 2003, 6:14pm
2
Try:
loadMovie(news_img, “news_image_mc”);
The quotes around it was thinking it was text instead of a variable.
system
February 18, 2003, 6:20pm
3
Hi again…
Sorry i do it like you said i know it’s a variable so anyway, it’s still not working… :(
loadMovie(news_img, “news_image_mc”);
it must be like this but where is the problem ?
system
February 18, 2003, 6:28pm
4
hard to say, do some testing on it, maybe the path to the variable is wrong. and you’ll need a _parent or something.
on frame 3:
trace(news_img)
then test your movie, if it is even getting there, it will tell you what it’s trying to load.
system
February 18, 2003, 6:34pm
5
I tried everything… the path of the image and instance name of the movie clip are true. If it’s not true, the button will not load the image, am i wrong ?
tanx for your reply ?
system
February 18, 2003, 6:44pm
6
what if you hardcode it for testing:
loadMovie(“example.jpg”, “news_image_mc”);
If it’s not loading, check that the swf and jpg are in the same file. And make sure your movieclip is definitely viewable on screen.
That’s all I can think of. You just need to find out where it’s not working.
system
February 18, 2003, 7:06pm
7
when i give this code at frame 3;
loadMovie(“example.jpg”, “news_image_mc”);
it’s working…
but when i give this code ;
loadMovie(news_image, “news_image_mc”);
it’s not working… But when i set this code to a button it’s working… (The trace result is = example.jpg)
Finally it’s working when a button calling this code but when a frame or movie call this code it’s not working… i mean this code ;
[COLOR=blue]loadMovie(news_image, “news_image_mc”);[/COLOR]