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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadmovie problem

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello guys!

I have a banner that reads a variable from an .asp file called "destination".

Upon this variable i want to load the appropriate picture(an .swf file) and i want to use something like this:

loadmovie(destination+".swf",1);

I know this syntax is not right ... can you point me to the right loadmovie syntax for my problem?

------------------------------------------------------------
...for example if in my asp file the destination variable is bucharest, i want to use this:
loadmovie("bucharest.swf",1);
Regards,
Dragos.


 
If you're loading on a level (1?), the correct syntax should be:

loadMovieNum(destination+".swf",1);

Now, as you know, I'm no expert in server side scripting, but seems to me, you should add a trace action when you've supposedly read that variable in asp, to see if it does actually hold "bucarest" or whatever.

trace(destination);

You might have a reading variable problem (arte you using LoadVars()?), or your path could be wrong... But if the trace comes up with "undefined", than obviously destination+".swf", will not work as it should. Regards,

oldman3.gif
 
Hello guys!
Sorry cause i haven't gave you an answer but i have posted on the forum before leaving work...now i am at home.

Oldnewbie: sorry for that "stupid" mistake...i was hurring and i have spelled wrong the loadMovieNum action...

In the same movie i am reading the "destination" variable in a dynamic text box and when i publish the movie the right text appears...so flash is reading right the variable.

The problem now is the loadMovieNum action...

Bill: i will try tomorrow to use the code that you posted...i have understood what you have done there...and i will let you know what happened.


Thanks a lot both of you for the reply!
Regards,
Dragos.


 
Did you try loadmovie instead of loadmovienum ? Load into a clip instead of a level. i suspect thats all it is.
Cant download the asp. zip it?
 
When I type VENICE in your textfield, works fine! Regards,

oldman3.gif
 
Hello François! :)

I don't think i understand you: where exactly you type VENICE ?...the movie is actually loading?
Regards,
Dragos.


 
yes but i am sure the problem is that the loadmovie action is being called before the variable has loaded.
 
But even the loadMovie action is not working properly...then why the text from the box doesn't show...it took so long to oad a simple variable from asp?

I have uploaded the files...maybe smb can fix them...

Thank you a lot both of you! Regards,
Dragos.


 
As you know, server side scripting is not my cup of tea!

But if I assign the value of "venice" to destination (on the first frame rather than loading the asp, or type "venice" (when in the .fla!) in your textfield which has "destination" as variable, and then test the .fla, the "venice" movie loads fine.

So it's not the code, it's reading the asp! And at that well... Guess Bill is better than me!

Only difference, is that I'm not frustrated by admiting it! Regards,

oldman3.gif
 
its not an asp problem. the varaiable loads correctly. send the variable to a text box and it shows up fine. the problem lies in trying to access the variable before it has loaded. it takes a finite amount of time for the server to return the value but flash doesnt wait it carries on executing code.
 
The "venice" page loaded? ... at me it's not working :-( Regards,
Dragos.


 
yes venice loads fine

now we know the asp sends venice ok so i put &destination=venice into a text file changed the load path to that text file, placed a loader clip called movie in level 1 and all went fine.

if you still dont have it i will zip the files up and post them when i get back from a meeting
 
It would be great! Regards,
Dragos.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top