External swf loader
mike-db
Posted: Jun 21 2006, 04:39 PM


I Like Pie!!! (Admin)


Group: Admin
Posts: 6
Member No.: 1
Joined: 21-June 06



Ok here is a tut for those of you who want to load a external swf from another swf threw more then one scene.
This tut will be a step by step tut.
1. Open flash, and start a new flash document.
2. Make your document 300 x 200 (size really does not matter)
3. Then make your background what ever color you want, im using "#A0855A" its a light brown.
4. Now time to make another scene. Go to "Insert > Scene" the scene indicator (as im calling it) should say "Scene 2"
user posted image
5. Now change it back to Scence 1 look for this button user posted image and select the "Scence 1" tab
6. On your first frame on Scene 1 open the actions tab and put this code...
CODE

stop();

This code stops the movie from going to Scene 2.
7. Your "Scene Indicator" should say "Scene 1" now, Make a button it does not matter if it is text or a image just make something, (im making text that says "Click here") once you are done that select your new graphic or text and push F8 the "Convert to Symbol" window should pop up then make it a button instead of a Movie clip and call it "button" on your new button put this code...
CODE

on(release){
gotoAndPlay("Scene 2",1);
}

This code tells the movie that when the user clicks the button it will change to Scene 2 Frame 1.
8. Now go back to Scene 2 and on the first frame put this code...
CODE

stop();
this.createEmptyMovieClip("loader", 100);
loader._x = 100;
loader._y = 100;
loadMovie("test.swf", loader);

This code tells the movie to not repeat it self and to load the external swf file called "test.swf" Feel free to edit the two lines that say
loader._x = 100;
loader._y = 100; (change the numbers so that the file you load goes to the right spot that you want.
9. Now to make the "test.swf" first save your new loader and call it what ever you want, then start a new flash document and make it any size you want, (just make sure that its not bigger then your "loader" in it put some text or something that indicates that it has worked, for me im putting some text that says "If you see this it worked". Save this and call it test.
10. Now to view the movies open both of your movies (if you closed them) and puch Ctrl+Enter and both your loader and your test.swf then test the loader file again and watch.
Top
« Next Oldest | Tutorials | Next Newest »


Topic Options



Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.1396 seconds | Archive