Groups | Blog | Home
all groups > flash (macromedia) > june 2005 >

flash (macromedia) : Loading swf's into fla's?


gold987987987
6/20/2005 10:11:56 PM
I have a website built in Flash. I also have a image viewer built in Flash
that I downloaded from a tutorial site that works great.
I want to put this image viewer in my Flash website but I'm having problems.
I tried re-creating the image viewer in my website fla file but it is proving
to hard as it has a lot of action script and tricky stuff.
So, I'm left with the idea of importing this image viewer as a swf into my
website fla file. Can this be done? Will the image viewer still be
operational? Can the user still click and operate the image viewer?
I haven't been able to find much on how to import swf's into fla's, could
someone point me in the right direction?
Thanks for your help.
Scott

gold987987987
6/20/2005 11:10:26 PM
That?s what the problem must be, because I've imported it directly in and it's
not working at all. Could you provide any more detail on dynamically loading
swf's?
I'm assuming you use the loadmovie command but from there I'm lost.
Thanks!

gold987987987
6/20/2005 11:44:36 PM
Awsome! I got it to load with the loadmovie action.
Everything looks ok but when I go to operate(click the buttons) the image
viewer does nothing and gives me this error:
Target not found: Target="_root.control2"
Base="_level0.page2.rePlace.instance34"
Target not found: Target="_root.control"
Base="_level0.page2.rePlace.instance34"
Target not found: Target="_root.buttons"
Base="_level0.page2.rePlace.instance34"
Do you know what this error is about? Whats all this target business?
Thanks for your help!
gold987987987
6/21/2005 12:29:27 AM
Ok, I think I'm following you. If I load it with loadMovieNum then what level
should I place it in? Does that matter? Does the error I have give a clue to
which level to load into? How do I tell if I have levels in my master fla?

gold987987987
6/21/2005 12:36:59 AM
Nevermind, I got it to load and it works great! Thank you for all your
help!!!!
I do have one last question though, how do I control its position on the page.
Right now its in the wrong place and I cant find anything that lets me change
its location on the stage.
Thanks!
Jeckyl
6/21/2005 8:28:51 AM
really depends on whether the image viewer was written with importing in
mind. You can write a movie that will still work when imported, or you can
use different techniques, and it will not. So there is no general answer to
'will if work' other than 'try it and see'.

But certainly, if you IMPORT the movie it will NOT work, because of flash's
poor SWF importing .. it will strip out all the actions, and you will loose
the guts of any clips or buttons and any sounds etc.

If you dynamically load the SWF into your movie when it plays (either into a
clip, or into a level), then that may work for you.
--
Jeckyl

Jeckyl
6/21/2005 9:15:38 AM
I'd pretty much be regurgitating what the help files and examples therein
explain .. look at loadMovie and understand what is said there .. then if
you've got any particular questions about it that you don't understand,
please ask. But not much point me just saying the same things you could
read for yourself.
--
All the best
Jeckyl

Jeckyl
6/21/2005 9:56:20 AM
The viewer has not been written in a way that will allow it to play within a
clip .. it has to be at a _root level.

So use loadMovieNum to load it into a level instead.
--
All the best
Jeckyl

Jeckyl
6/21/2005 11:13:11 AM
you can change the _x and _y of the level you loaded it into .. eg if you
loaded it into level 1 you could use

_level1._x = 100; _level1._y = 50; // offset 100 to right and 50 down
--
Jeckyl

redshark
7/12/2005 11:31:25 AM
AddThis Social Bookmark Button