|
| How to import a .swf photogallery to my .fla project? |
 |
Sun, 11 May 2008 08:13:01 +000 |
Hi, I need help please, I am very new to Flash. I created a photo-album that
came as a template with CS3 and published it to .swf file; separately I am
designing a .fla website hoping to use the photo-album in it. I imported .swf
photo-album into my .fla library, but now I am stuck - I don't know how to link
this .swf file to a button in my .fla site. I tried actionscrip code, but I
received an error when testing the movie. I can't find an answer to this in any
of the books I have searched, or online. Can anyone share their brilliant
knowledge please? Thank you!
|
| Post Reply
|
| Re: How to import a .swf photogallery to my .fla |
 |
Sun, 11 May 2008 12:21:22 +000 |
There are a few ways you could do this. The first way would be to import it
from your root folder without ever putting it in your library. You would add
this code to whatever method you are using when the button is clicked:
loadMovieNum("yourgallery.swf",5);
5 is the level that you want that swf to display. You can use just about any
number. Your main swf is assumed to be 0, so anything above it will display on
top of it.
The other suggestion would be to add the gallery to the stage withing a nested
movie clip. You could put the gallery on frame 2, with nothing on frame 1.
Giving this movieclip an instance name of "gallery_mc", you would have
this
code to your button method:
gallery_mc.gotoAndStop(2);
2 is the frame number you want it to stop in.
Hope this helps, feel free to post any questions you may have.
GAMBRKER
|
| Post Reply
|
| Re: How to import a .swf photogallery to my .fla |
 |
Sun, 11 May 2008 12:48:35 +000 |
Instead of importing the swf into the library, you can copy the frames in it
and create a new movieclip in the site file with the same numkber of layers in
it and paste the gallery frames into that. Now you would have the gallery as a
movieclip in the site library that you can place on the stage and follow the
second suggestion offered by GAMBRKER.
|
| Post Reply
|
| Re: How to import a .swf photogallery to my .fla |
 |
Mon, 12 May 2008 23:40:30 +000 |
THANK YOU!
I tried the first method, and here is an error I get when testing:
Error opening URL
'file:///G|/Liza%27s%20Backup/%7EOrbital%7E/site%5Fflash/flash/orbital_jim.swf'
(my .swf is in the library)
I will try the second method you suggested and see if I can figure it out.
Thank you!
|
| Post Reply
|
| Re: How to import a .swf photogallery to my .fla |
 |
Tue, 13 May 2008 01:58:15 +000 |
If you have your main fla saved under my documents (for example) then your
gallery file should be in the same location in order to use
loadMovieNum("yourgallery.swf",5);
If you have it in a different location, then you must note that in your
string. For example, if your gallery file is in a subfolder called
"gallery"
under my documents, the you would use
loadMovieNum("gallery/yourgallery.swf",5);
This will fix the error you are getting. But let us know if the second method
works for you.
GAMBRKER
|
| Post Reply
|
|
|
|
|
|
|
|
|
|