-
LoadPic problem
Hi all,
Ok I'm playing with an idea to reduce file size for a flash slide show eventually what I want is a slide show of around 30 pictures so when you press the next pic button it loads another pic from the server instead of from the SWF library.
I have done two buttons each button is attached to a differant picture, when you press on either of the buttons it loads the respective picture but when you click another button it clears the image so you have to press the button again to load the other image!
What I want it to do is by pressing the buttons to load the images straight in not clearing the previous image first
Can anybody help
Regards
Kev
Last edited by kevin_smithers; 08-11-2008 at 06:02 AM.
-
Senior Member
As only one swf can occupy a movieclip or _level at the time there is no need to unload any movies.
If you are wondering how to load external files....
There are two ways of loading external files into Flash. Either you can load swf files into _levels or into movieclip targets.
_levels only exist in the Flash player. They are like layers but for swf files The Flash player is like a overhead projector where the plastic films you put on top of each other are like the swf files in the player. There are 16000 available levels
//To load a external swf into a _level from a button. The number 1 being the level to load into.
on(release){
loadMovieNum("myExternalFile.swf",1);
}
Movieclip targets are what it sounds like. A empty movieclip placed on the stage just for the purpose of loading a swf file into it. The advantage is that you can place it anywhere, manually ( as opposed to swf's in _levels) and also can control what of the objects should be on top or beneath.
Usually you give the movieclip an instance name of container.
//To load a external swf into a target movieclip from a button ( both being on the main timeline ).
on(release){
container.loadMovie("myExternalFile.swf");
}
Note that the external files top left corner will load at the center of the empty movieclip.
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
|