Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-29-2006, 10:37 PM   #1
shoodogg1977
Registered User
 
Join Date: Mar 2006
Posts: 18
Question how do I make a clip wait before loading?

I have two movie clips in my library. I want to attach movieClipA and movieClipB on the same frame, but I want movieClilpB to wait until movieClipA is finished loading/playing before executing.

How do I do this?

Thanks,
Scott
shoodogg1977 is offline   Reply With Quote
Old 08-31-2006, 09:16 AM   #2
farang
Registered User
 
Join Date: Aug 2006
Posts: 18
Default

go inside movieclip B, on the first frame type stop();

after movieclip A finishes (on the last frame) you type movieClip B.gotoAndPlay(2);

Farang
farang is offline   Reply With Quote
Old 08-31-2006, 11:44 AM   #3
Deackie
From Paradise
 
Deackie's Avatar
 
Join Date: Jul 2005
Location: China
Posts: 524
Send a message via MSN to Deackie Send a message via Skype™ to Deackie
Default

as matter of fact, you'd better put B out of your original file,using LoadMovieNum().
__________________
Thank You In Advance // 万分感谢 // どうも ありがとうございます

Learn how to code at 02Geek
Deackie.J
Deackie is offline   Reply With Quote
Old 08-31-2006, 06:20 PM   #4
shoodogg1977
Registered User
 
Join Date: Mar 2006
Posts: 18
Red face Thank you

Thanks farang, I will try that.

Deakie, I'm not familiar wiht LoadMovieNum() and how it is used. Does this mean I have to make MovieClipB an external SWF?

Thanks to both of you for replying. I was beginning to wonder if anyone replied on this site.

-Scott
shoodogg1977 is offline   Reply With Quote
Old 09-01-2006, 01:08 PM   #5
Deackie
From Paradise
 
Deackie's Avatar
 
Join Date: Jul 2005
Location: China
Posts: 524
Send a message via MSN to Deackie Send a message via Skype™ to Deackie
Default

Quote:
Originally Posted by shoodogg1977
Does this mean I have to make MovieClipB an external SWF?
here is the explanation to the right method.
ActionScript Code:
loadMovieNum function loadMovieNum(url:String, level:Number, [method:String]) : Void
Loads a SWF, JPEG, GIF, or PNG file into a level while the original SWF file is playing. Support for unanimated GIF files, PNG files, and progressive JPEG files is added in Flash Player 8. If you load an animated GIF, only the first frame is displayed.

Tip: If you want to monitor the progress of the download, use MovieClipLoader.loadClip() instead of this function.

Normally, Flash Player displays a single SWF file and then closes. The loadMovieNum() action lets you display several SWF files at once and switch among SWF files without loading another HTML document.

If you want to specify a target instead of a level, use loadMovie() instead of loadMovieNum().

Flash Player has a stacking order of levels starting with level 0. These levels are like layers of acetate; they are transparent except for the objects on each level. When you use loadMovieNum(), you must specify a level in Flash Player into which the SWF file will load. When a SWF file is loaded into a level, you can use the syntax, _levelN, where N is the level number, to target the SWF file.

When you load a SWF file, you can specify any level number and you can load SWF files into a level that already has a SWF file loaded into it. If you do, the new SWF file will replace the existing SWF file. If you load a SWF file into level 0, every level in Flash Player is unloaded, and level 0 is replaced with the new file. The SWF file in level 0 sets the frame rate, background color, and frame size for all other loaded SWF files.

The loadMovieNum() action also lets you load JPEG files into a SWF file while it plays. For images and SWF files, the upper left corner of the image aligns with the upper left corner of the Stage when the file loads. Also in both cases, the loaded file inherits rotation and scaling, and the original content is overwritten in the specified level.

Note: JPEG files saved in progressive format are not supported.

Use unloadMovieNum() to remove SWF files or images that were loaded with loadMovieNum().

When using this method, consider the Flash Player security model.

For Flash Player 8:

Loading is not allowed if the calling movie clip is in the local-with-file-system sandbox and the loaded movie clip is from a network sandbox.
Loading is not allowed if the calling SWF file is in a network sandbox and the movie clip to be loaded is local.
Network sandbox access from the local-trusted or local-with-networking sandbox requires permission from the website by means of a cross-domain policy file.
Movie clips in the local-with-file-system sandbox may not script movie clips in the local-with-networking sandbox (and the reverse is also prevented).
For Flash Player 7 and later:

Websites can permit cross-domain access to a resource by means of a cross-domain policy file.
Scripting between SWF files is restricted based on the origin domain of the SWF files. Use the System.security.allowDomain() method to adjust these restrictions.
For more information, see the following:

Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
The Flash Player 8 Security-Related API white paper at http://www.macromedia.com/go/fp8_security_apis
Availability: ActionScript 1.0; Flash Player 4 - Flash 4 files opened in Flash 5 or later are converted to use the correct syntax. The ability to load JPEG files is available as of Flash Player 6. The ability to load unanimated GIF files, PNG files, or progressive JPEG files is available as of Flash Player 8.

Parameters
url:String - The absolute or relative URL of the SWF or JPEG file to be loaded. A relative path must be relative to the SWF file at level 0. For use in the stand-alone Flash Player or for testing in test mode in the Flash authoring application, all SWF files must be stored in the same folder and the filenames cannot include folder or disk drive specifications.

level:Number - An integer specifying the level in Flash Player into which the SWF file will load.

method:String [optional] - Specifies an HTTP method for sending variables. The parameter must be the string GET or POST . If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Example
The following example loads the JPEG image tim.jpg into level 2 of Flash Player:
ActionScript Code:
loadMovieNum("http://www.helpexamples.com/flash/images/image1.jpg", 2);
__________________
Thank You In Advance // 万分感谢 // どうも ありがとうございます

Learn how to code at 02Geek
Deackie.J
Deackie is offline   Reply With Quote
Reply


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
Wait until movie clip moves to certain position before loading SWF? mattmdes ActionScript 2.0 4 06-02-2006 03:07 AM
loading picture to movie clip natdrip ActionScript 2.0 0 03-16-2006 08:50 PM
Combobox error when loading a clip within a clip. Solution. KieranT Components 0 02-19-2006 12:32 AM
How do you make a Loading Screen Matsko Simple Stuff (Newbies) 3 03-06-2004 10:05 PM
make a movie clip act as a button paolo1234567891 ActionScript 1.0 (and below) 56 09-07-2003 10:50 PM


All times are GMT. The time now is 12:22 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.