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

Load .jpg into .swf, then load .swf into another .swf

Status
Not open for further replies.

orangejuice

Technical User
Nov 18, 2002
33
0
0
CA
This is a bit complicated but here goes...

I have a jpg file, named "laser.jpg". I am loading this into my movie by creating an empty movie clip on the stage (instance name "empty"). Then in my timeline, I have the actionscript: loadMovie("laser.jpg", "empty");. This works fine. The image loads correctly when I test the .swf file (named one.swf). However, I then need to load this .swf file into my main movie. Because this project is very large, I have my files set up in folders. Therefore, in my main movie, I have an empty movie clip on the stage, (instance name "containerMC"). In the main timeline, I have the actionscript: loadMovie "Movie1/one.swf", "_root.containerMC"). (Movie1 is the folder containing the file one.swf and the laser.jpg) When I test this main movie, the .swf file loads - I can see all the text & everything else in the movie - but the .jpg file does not load!!! I have tried using various combinations of "GET" and "POST". These do not work. I've also tried loading the .jpg into a level of the .swf file - this does not work. Could it be screwing up because its in a separate folder???? PLEASE HELP!

Thanks in advance!
 
i suspect its a path problem with the jpg

aint tried it myself but this may solve it

change loadMovie("laser.jpg", "empty");

to loadmovie("laser.jpg", _root.containermc.empty);


let me know that dont work and ill take another look
 
I tried your suggestion but it doesnt work. Now the first .swf file (one.swf) just shows the .jpg - it takes over the entire movie. And nothing loads into the main movie. Any other suggestions? (Remember that "empty" is the movieclip in "one.swf" and "containerMC" is the movie clip in the main movie!)

Thanks!
 
For the sake of testing, don't load your laser picture in the first movie. Use a movie clip with the picture already included in the mc. Then load this movie in tour other main movie. If it works, then it's probably that the picture has to be fully downloaded in the first empty mc before you can load this empty mc in the second movie... You might just be loading an empty mc and thus not seeing the picture that hasn't had enough time to download. Regards,

oldman3.gif
 
Actually I just figured it out - all the files must be in the same folder, not split up into subfolders. Rather difficult to keep them organized this way, however.... Thanks for your help!
 
external jpg problem.

I am having problems loading an extenal jpg in the same folder as my site file into flash 5 into a draggable mc called 'draggable'.

I can create a draggable mc called 'draggable'.
Within that I have another mc called 'slide' (what I will want the external jpg to load into) on a seperate layer from the graphics that make up the draggable window.
Everything works up to this point.

Do I give the mc 'slide' an action to load the external jpg? or the layer 'slide' is in?
I have been puzzling over the right code to write to get the external jpeg 'CH1_1.jpg' to load into the mc 'slide'

Anybody
 
just a matter of finding the correct path

sounds like the path is (from the main timeline frame actions)

loadMovie("CH1_1.jpg",_root.draggable.slide);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top