-
load external swf problem
I am trying to load an external swf into a movie. When I use the loadMovieNum, it loads into the correct spot on the stage, but will not play. when I use the loadMovie, it loads and plays, but I can't get it to be placed where I want it on the stage. When I use the loader component, it loads properly, but won't play. Any suggestions?
-
Senior Member
loadMovieNum() is NOT for loading into movieClips..but rather _levels..
using loadMovie() is by far the best way...
example:
//load .swf into empty movieClip
containerClip.loadMoive("external.swf"):
//position clip
containerClip._x = 100;
containerClip._y = 100;
make sure the clip you are loading your external.swf into HAS the instance name of containerClip...
-
Hi Whispers, I have a similar problem:
So, if I wanted to have an external slideshow play in a pictureframe I would create a movieclip called PictureFrame (with instance name of PictureFrame) then insert the script:
PictureFrame.loadMovie("slideshow.swf");
Should that work?
-
Senior Member
yes.. if on your stage.. you have a movieClip, with the instance name of pictureFrame.
and you want to load something INTO that movieClip (referred to as a containerClip often)..a video, .swf or image.. you would do:
pictureFrame.loadMovie("external.swf");
pictureFrame.loadMovie("external.jpg");
etc..etc..
-
And what if I wanted to do that inside a movieClip?
So I would have the stage then a movieClip containing that code with the pictureFrame movieClip inside that?
Would that be:
containerClip.pictureFrame.loadmovie("whatever.swf/jpg/mp3/etc")
All things having the relevant instance names of course.
Probably simple for you but it always starts to boggle me!
-
Senior Member
yes.. you just follow the path..
if you have a movieClip called
containerClip
and inside containerClip you another movieClip called holderMC
you would just do:
containerClip.holderMC.loadMovie("external.swf");
-
It doesn't appear to be working!
I was testing it with just using an image for now, the exact script I have used is below:
stop ();
pictureFrame.containerClip.loadMovie("Picture3.jpg ");
The way I have organised the path in the fla is 'Stage/pictureFrame/containerClip' and that script above is within the pictureFrame movieClip.
When I run the swf nothing shows up in the frame! The swf is in the same folder on my computer as the picture.
Do I need to offset the x and y axis or anything like that?
-
Senior Member
if your putting the code IN the pictureFrame clip..then there is no need to put it in the code.
its basically looking for those names... if you put that code INSIDE the pictureFrame clip...its going to look for a clip called pictureFrame..then inside that a movieClip called containerClip.....etc..etc..
so you will just do this:
containerClip.loadMovie("Picture3.jpg");
if you were to put that code on the MAIN timeline in frame 1.. then it would have worked.
-
Ok, I've changed the code to what you have said but still nothing seems to come up in the frame?
Any other ideas? Something I may have missed?
Thanks
-
Senior Member
post your .fla
are you sure your giving the clips INSTANCE names?
non-progressive .jpg's only..
-
-
Senior Member
DOH!
Flash 5 cant load external images..import it into a .swf and it will work.
-
Well that's a step in the right direction, but it still hasn't worked when I've tried with swf!
-
Hmmm, interestingly if I change the instance and filename to all lower case it works!!
So where Picture3 didn't work picture3 does. Literally all I did was change the upper P to a lower p on both the instance name and swf, and it works!!
Strange but true.
Thanks for your help, was good discussing!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|