Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-20-2006, 08:47 PM   #1
Registered User
Join Date: May 2006
Posts: 11
Default Play exit animations on multiple external SWF's?


Here is what I would like to do: I have some buttons, then 2 movie clips named container and container2. When I click on a button, an external SWF is loaded into container. I have it working so that when another button is clicked, it plays the exit animation of the current SWF, then loads the new one. Here is the code that I used for that:

on a button:

on (release) { 
if (_root.currMovie == undefined) { 
_root.currMovie = "who"; 
} else if (_root.currMovie != "who") { 
if (container._currentframe >= container.midframe) { 
_root.currMovie = "who"; 
In who.swf frame 1:

midframe = 114;
In who.swf last frame:

_root.currMovie = undefined;
Frame 114 is where the exit animation starts.

What I would like to do, is have a button in who.swf, that will load another external swf into container2, while leaving who.swf in place. Then, when one of the main buttons is clicked, I would like it to play the exit animation of the swf that is currently in container2, then play the exit animation of the swf that is currently in container, then load the new swf into container. Can someone please help me out with the code for that?

mattmdes is offline   Reply With Quote
Old 06-21-2006, 08:08 AM   #2
'go with the flow'
extremefun1's Avatar
Join Date: May 2006
Posts: 71
Send a message via MSN to extremefun1

first of all
container.loadMovie("who.swf"); does NOT main u load "who.swf" IN container...
It means "who.swf" takes the place of "container"....

if u would make a movie mainContainer ..then mainContainer.container...then if u say mainContainer.container.loadMovie("who.swf"); ...THEN the who.swf is in the mainContainer..
extremefun1 is offline   Reply With Quote
Old 06-21-2006, 09:43 AM   #3
Addicted To FLASH
farafiro's Avatar
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro

ActionScript Code:
//Assets: who.swf, btn1, btn2, container1_mc, container2_mc, who_btn //this goes in the who.swf who_btn.onRelease = function(){ _parent._parent.container2_mc.loadMovie("theMc") } //script in the main movie btn.onRelease = function(){ container.loadMovie("who.swf") } btn2.onRelease = function(){ container1.gotoAndPlay(114) container1.gotoAndPlay("theExitFrame") }
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
farafiro is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preloading External SWF's ninebar69 Other Flash General Questions 0 05-03-2005 06:51 PM
Preloading External Swf's FrankieB ActionScript 2.0 1 04-08-2005 08:19 PM
loading bars/info in external swfs case ActionScript 1.0 (and below) 1 10-16-2003 11:21 AM
Multiple Movie Clips (external swf's) background loading?? ttadder ActionScript 1.0 (and below) 4 10-09-2003 03:37 PM
preloading multiple external movies rico-magico Simple Stuff (Newbies) 5 05-15-2002 03:41 AM

All times are GMT. The time now is 11:45 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.