A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Flash Video FAQ

Threaded View

  1. #1
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Please read before posting on the forum

    1. Take a look at the other posts to see if your question has already been answered. You could even do a search first (look up on the right side of the page - there it is!) you may just find what your looking for quite easily. It's a handy tool.

    2. When describing a problem, please tell us what version of Flash you are using, describe the methods of scripting and targeting you are using, and if there is a possibility that hardware or software may play into the issue - tell us how your machine is set up. Most of the questions that end up not getting answered are because there is just too little information there for anyone to be of any help.

    3. Code listed in the FAQ is tested and works - but if you are a cut-and-paster, don't be surprised if something does not work right. You should have a working knowledge of actionscript if you want to use any advanced method shown here in the FAQ or in the forums.

    4. Be nice, and don't act stupid! As with all the forums here, no cussn', no stealin' (warez talk), and no solicitation.

    These are some the most common questions and answers here on this forum, for more in depth tutorials - look under the Flash video tutorials thread at the top of the video forum.

    How do I load a external (dynamic) movie


    There are two methods for loading external movies into your Flash movie. These methods are the same for video as they are for loading any external information or standard Flash movies, but there is often some confusion on how to use these methods.

    Either method will allow the video to stream provide the video is either on the main timeline or created with encoding software.

    1. loadMovie();
    This method is used to load external data or a movie (.swf) into a movie clip on the timeline, so targeting is the key. Here's how you use it:

    In this example, you have a movie clip on the root timeline called target_MC, my.swf is located in the same folder as your main movie on the server. You can place this code on a frame, a button or in a function.
    Code:
    loadMovie("my.swf", target_MC);
    You may want to use an empty movie clip for this method, as whatever is currently in the clip will be removed when the external movie is loaded.

    2. loadMovieNum();
    This method is used to load external data or movies to a level (_level).

    In this example, you want to load an external .swf to level 10 of your main movie. The name of the external .swf is my.swf, it is located in the same folder as your main movie on the server. Again, you can place this code on a frame, a button or in a function.
    Code:
    loadMovieNum("my.swf", 10);
    Bandwidth and proper compression for your target audience is the key to making your external movie stream instantly. Loading another movie into the same level will clear the memory and clear the screen of the first dynamically loaded .swf, my.swf.


    How do I control a dynamically loaded video .swf

    Once you have used one of the above methods to load a video .swf to either a movie clip or the main timeline, you may want to know how to target it so that you can control it's properties and timeline.

    1. If you loaded into a movie clip using the loadMovie(); method, you just target the movie clip that you loaded into - as that will now be your video. By loading into a movie clip you remove any other content in that clip, and now control of that clip is like control of your loaded movie (you may want to use an empty MC in the above method).

    In the above example we loaded the .swf into target_MC, so to play the movie:
    Code:
    target_MC.play();
    2. If you used the loadMovieNum();, you target the level that you placed the new movie on, in the above instance - _level10.
    Code:
    _level10.play();
    Last edited by Wheels; 05-08-2004 at 03:04 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center