When time line reaches a certain frame load swf into movieclip.

Hi,
I need some help with some actionsscript. When the timeline reaches a certain frame, I want an swf to load into a movieclip in that particular frame. I need this to occur on level 1 as the root of the site is pre loader. Any help would be much appreciated. Cheers

In that frame, on an actions layer, use either the loadMovie method or the MovieClipLoader.loadClip method to load the swf into the movieclip.  There should be examples of using either in the help documents and via Google.

Similar Messages

  • How to go back to frame 1 when the timeline reaches a certain frame?

    I have a timeline that has some label frames at the very end of the timeline. During the timeline a user will hit a button on a frame and will jump to one of the label frames. On the label frame is another button that when clicked - returns the user to the previous frame. How do I make the movie return to frame 1 - without a button - but before it reaches the label frames? In other words, by simply reaching a certain frame in the movie, I want the timeline to go back to frame 1.
    I am using Action Script 3 on a PC
    Thank you.

    Thanks from me as well. I'm trying to make an interactive house simulation game (basic) and hit this issue where the timeline needs to skip to the next segment as several options are available per room (listed one after the other in the timeline). Flash isn't particularly easy to use when it comes to this kind of thing. Is Flash Catalyst CS5 more suited to this?

  • Controling a loaded swf into movieClip

    help!!
    i have loaded a {slide swf} into a movieClip .. on stage ..
    using the
    var loader:MovieClipLoader();
    using a button movie clip the is embeded into a seperate swf
    file that is loaded in at run time
    but the {slide swf} is runing a Interval that i need to clare
    ... so is there a way to talk to swf file after you load it into a
    movie Clip how do you address that

    var kglad : Master = new Master();
    Kglad .onReply=function(){
    " you are on to somthing big [ only the second picture fade
    in and thats where it stop ] it deos not seem to bee loading any
    more ... but when you click the next _btn.
    the caption keep changing ... but pictures don't change
    "........ i am sending you a better view of what ihave
    done<<<<<<<<<<start... // create
    variables
    var x:XML = new XML();
    x.ignoreWhite = true;
    var urls:Array = new Array();
    var captions:Array = new Array();
    var captions2:Array = new Array();
    var whoIsOn:Number;
    //XMl function
    x.onLoad = function() {
    var photos:Array = this.firstChild.childNodes;
    for (i=0; i<photos.length; i++) {
    urls.push(photos
    .attributes.url);
    captions.push(photos.attributes.caption);
    captions2.push(photos
    .attributes.caption2);
    holder.loadMovie(urls[0]);
    caption.text = captions[0];
    caption2.text = captions2[0];
    whoIsOn = 0;
    //Load XML
    x.load("pics/kingslandMarks/lmlist.xml");
    // The Button envents
    previous.onRelease = function() {
    clearInterval(nInterval);
    if (whoIsOn>0) {
    whoIsOn--;
    holder.loadMovie(urls[whoIsOn]);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    next.onRelease = function() {
    if (whoIsOn<urls.length-1) {
    whoIsOn++;
    clearInterval(transitionI);
    transitionI = setInterval(transitionF, 50, wholsOn);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    function transitionF(index) {
    if (!fadedOut) {
    holder._alpha -= 4;
    if (holder._alpha<0) {
    fadedOut = 1;
    holder._visible = 0;
    } else {
    if (!loadStart) {
    holder.loadMovie(urls[whoIsOn]);
    loadStart = 1;
    if (!loadComplete) {
    if (holder.getBytesLoaded()>0 &&
    holder.getBytesLoaded()>=holder.getBytesTotal()) {
    holder._visible = true;
    loadComplete = 1;
    holder._alpha = 0;
    } else {
    holder._alpha += 4;
    if (holder._alpha>=100) {
    clearInterval(transitionI);
    /*next.onRelease = function() {
    clearInterval(nInterval);
    if (whoIsOn<urls.length-1) {
    whoIsOn++;
    holder.loadMovie(urls[whoIsOn]);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    var s;
    //Experimenting with auto play slide show
    var nInterval:Number;
    autoPlay();
    function autoPlay() {
    function neXt():Void {
    if (whoIsOn<urls.length-1) {
    whoIsOn++;
    holder.loadMovie(urls[whoIsOn]);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    if (whoIsOn == urls.length) {
    clearInterval(nInterval);
    whoIsOn = 1;
    function prEv() {
    if (whoIsOn>0) {
    whoIsOn--;
    holder.loadMovie(urls[whoIsOn]);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    auto.onRelease = function() {
    nInterval = setInterval(neXt, 2000);
    this._visible = false;
    sTop._visible = true;
    if (whoIsOn<urls.length-1) {
    whoIsOn++;
    holder.loadMovie(urls[whoIsOn]);
    caption.text = captions[whoIsOn];
    caption2.text = captions2[whoIsOn];
    sTop.onRelease = function() {
    clearInterval(nInterval);
    this._visible = false;
    auto._visible = true;
    //try to fade the movieClip holder
    function fade():Void {
    holder._alpha -= 5;
    if (holder._alpha == 20) {
    holder._alpha = 100;

  • Loading swf into movieclip object

    I am trying to load a swf file into a movieclip object on the
    stage. The movieclip object is sized smaller than the screen, and
    placed in the middle. I have defined a loader with:
    var myMovieClipLoader:MovieClipLoader = new
    MovieClipLoader();
    then use it like this:
    _level0.myMovieClipLoader.loadClip("moviename.swf",
    _level5.movieclipinstancename);
    (the movieclip object is used in a swf loaded in level5)
    When I load the swf like this, the swf loads at the correct
    location according to where I have placed the movieclip object,
    however it "blows up" to fill the screen from that point down and
    across, ignoring the size of the movie clip object (the loading swf
    actually expands beyond it's created size to fill the screen,
    making all the graphics and text much larger than intended). The
    actual pixel size of the swf I'm trying to load matches the size of
    the movieclip object (1024x350 in a 1280x1024 screen).
    What is the magic setting or property that will tell the
    loading swf to honor the size of the movieclip object I'm loading
    into?
    Thanks for your help!
    Barb

    Something I've been working on:
    Place the following code in a new file <your project
    folder>\as\MovieContainer.as
    Then open the properties for the symbol you want to be your
    movie container
    Set the AS 2.0 Class to as.MovieContainer and give it a name
    (I named mine 'loader').
    To load the movie, simply call:
    loader.queueSWF('my.swf');
    Hope that makes sense. Basically, it's just a self contained
    class for loading into an object on the scene. It draws a simple
    progress bar on the center of the symbol when it's loading and it
    resizes the loaded object on init to conform to the size of the
    object on the stage. Why queueSWF? Well, if it's currently loading
    a SWF, it will wait till it's finished and load a new one. The
    biggest problem right now is the progress bar, but it's fairly easy
    to remove if you don't like it. Hopefully it helps.
    If anyone else is reading this. I'm trying to figure out if I
    can load these movies into an array of movieclips. So far I've had
    no luck. If you know of a way, feel free to drop some input.

  • Load swf into movieclip // play pause buttons

    I am going out of my mind trying to get this to work. I can do it in AS2 without a hitch - but not AS3.
    I just need to load an external swf file into an empty movieclip. Then I have 2 buttons play and pause that need to be on the top layer of the new movie and they need to play and pause the loaded swf file.
    I have tried a number of things and nothing is working. Please help.
    Thank you in advance.
    Shawna

    you can use:
    var ldr:Loader=new Loader();
    addChild(ldr);
    ldr.load(new URLRequest("yourswfthatyouwanttoload.swf"));
    addChild(yourplaybtn);
    addChild(yourpausebtn);
    yourplaybtn.addEventListener(MouseEvent.CLICK,playF);
    yourpausebtn.addEventListener(MouseEvent.CLICK.pauseF);
    function playF(e:Event){
    MovieClip(ldr.content).play();
    function pauseF(e:Event){
    MovieClip(ldr.content).stop();

  • Flash html5 - How can i make an internal movie clip slow down and stop when it get to a certain frame?

    I am creating an automotive braking system using flash and have a wheel turning. I want the wheel to slow down and stop after the brake pedal is pushed at a certain frame. I know I could do this with frame by frame animation but was hoping there was a short cut - javascript?? If not the slowing down portion then is there code for just making the internal movie clip (wheel turning) to stop when it gets to a frame.? Thanks

    you can use the ticker class to create a loop that you use to control the wheel's rotation or frame, TweenJS v0.6.0 API Documentation : Ticker

  • Load swf into mc frame by frame

    Hi, I have a movieclip to dynamically load swf's. Some of my
    swf's are slideshows and contain jpgs that are quite large.
    Therefore I do not want to wait till the end of a complete load to
    show the swf. Say, if i want to show picture 3 (at frame 3), i'd
    like to show it as soon as the frame is loaded. However, I also
    need to rezie the swf to fit my mc's fixed size. Resize only works
    after all bytes of the swf are loaded I believe.
    How do I solve this problem?
    Ted

    Can you be more specific? I read at the MCLoader apis, but
    still have no clue how to solve this problem.

  • Load swf into RAM via an asset manager

    Hi.
    I have an AS3 virtual world and we are continually loading external resources such as swfs and sounds.
    A few of my menu screens that take a damn long time to load. Read a tut that said we should load them into RAM using an asset manager.
    I'm assuning the asset manager is simply a Class used specifically for loading and unloading graphics, swfs and sounds. So the important part to ask is:
    What do they mean by loading into RAM.
    I thought all swfs were automatically loaded into RAM ie: cached or in the flash player cache or the browser cache. Or do I have to do it specifically myself with some code. We are importing external files so we thought that was a great idea as they are shared by many games.
    btw: RSLs I have read about but I don't understand. I thought my externally loaded files were RSLs (runtime shared libraries) or would I have to do some physical coding do convert them into RSLs.
    This is so important because I am not very experienced but I am getting a lot better due to help receied in this forum and my current programmer is leaving me. I have been studying up on As3 and design patterns and I understand basic coding a lot better now.
    CHEERS
    EDIT: Just read that I am using a http call. - I use urlloader - well that's what you use isn't it or how would you load an external swf. Just read that you can hold the swf as a variable which loads it in RAM and therefore will be available immediately. Know I don't understand anything as I have never read that anywhere.

    Hi Andrei, nice to see you around here.
    Well, somebody helping me says that normally we make a http request with urlLoader to the server and that is what was happening each time. We weren't getting the cached swf. (that bit I don't understand and doesn't sound right - anyway...)
    So he says if we create a dictionary class to hold that swf then the next time we make a request we will get the movie from there and not from the server.
    I have highlighted the main parts of code below.
    What I don't understand about all this is that I have never seen anything like this in my life. I have read extensively and read all about loading external files and using this type of asset manager with the dictionary class does not ring a bell and goole comes up with nothing.
    I hunch is that as you say, we are doing something wrong somewhere because the only way to get an external file is via urlLoader to the server the first time and then the second time it should look for it cached on our computer is that right? Or when we make the urlLoader request how does it know to look on our computer first before going to the server or are these innner workings of the flash player I know nothing about. This is so important as when I get 10 kids on the computers they wait for as long as 5 minutes for movies that have already been downloaded many times before.
    Cheers in advance.
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        public class AssetLoader extends Loader
            private var _assetName:String;
            public function AssetLoader()
                super();
            public function get assetName():String
                return _assetName;
            public function set assetName(value:String):void
                _assetName = value;
    The asset manager loading class
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.utils.Dictionary;
        public class AssetManager extends Sprite
            public static const ASSET_LOADED:String = "assetLoaded";
            private static var _instance:AssetManager;
            private var _assetsLoaded:Dictionary = new Dictionary();
            private var _assetsBeingLoaded:Dictionary = new Dictionary();
            public function AssetManager(pvt:SingletonEnforcer)
             * loads and asset and keeps a reference to the loaded content
             * @param name
             * @return null if the asset is not loaded yet
           public function loadAsset(name:String):MovieClip
                var asset:MovieClip;
                if (_assetsLoaded[name])
                    asset = _assetsLoaded[name];
                else if (_assetsBeingLoaded[name] == null)
                    var skinloader:AssetLoader = new AssetLoader();
                    skinloader.assetName = name;
                    skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    skinloader.load(new URLRequest(name));
                    _assetsBeingLoaded[name] = true;
                return asset;
            protected function loadCompleteF(e:Event):void
                var skin:MovieClip = e.target.content as MovieClip;
                var name:String = ((e.target as LoaderInfo).loader as AssetLoader).assetName;
                _assetsLoaded[name] = skin;
                delete _assetsBeingLoaded[name];
                dispatchEvent(new Event(ASSET_LOADED));
             * gets an instance of the class
             * @return
            public static function get instance():AssetManager
                if (_instance == null)
                    _instance = new AssetManager(new SingletonEnforcer());
                return _instance;
    internal class SingletonEnforcer
    The function inside a class called Screen which is used by menus classes to load their swf menus.
    protected function loadSkin(path:String = null):void
                trace("skin to load: " + path);
                Home.instance.addPreloaderF();
                _path = path + Home.instance.cacheString;
                if (_usingAssetManager)
                    loadSkinFromAssetManager();
                else
                    if (_skinloader.content)
                        _skinloader.unloadAndStop(true);
                    _skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    _skinloader.load(new URLRequest(_path));
            protected function loadSkinFromAssetManager(e:Event = null):void
                _skin = AssetManager.instance.loadAsset(_path);
                //if no skin we have to wait to be loaded it
                if (_skin == null)
                    AssetManager.instance.addEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                else
                    AssetManager.instance.removeEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                    loadCompleteF(null);

  • Loading swf into empty mc in a html page

    Hello Flashers,
    I've set up a html page that contains a swf file with an
    empty movie clip in which I wish to load another swf.
    However I trie to do it, it just won't listen.
    Can anybody help me with this.
    Situation:
    html page (complete one, with tables etc.) contains main swf
    file (in a table) which contains an empty movie clip.
    Within the main swf there is a button which should load
    another swf file into the empty movie clip.
    What happens is that the external movie clip is loaded into
    level 0 of the main movie.
    It usualy works fine just with flash site but within the html
    page it results differently.
    Is it possible to get it right.
    Thanks
    Justin Time

    Urami, thanks for your interest for helping me ( and others,
    as far as I know )
    I'll try to explain it in more details ( although english is
    not my language)
    I've made a html page which contains a swf file ( theMAIN )
    in one table, other tables are filled with gif's, jpeg's etc.
    In the main movie - theMAIN - there is a empty movie clip
    with instance name "deder_mc" which is ment to accept loaded swf's.
    There is also a button with action ---- on release :
    _global.theMAIN.loadMovie("./swf_s/000_studioG.swf", "deder_mc");
    That means, when user click this button movie
    000_studioG.swf should be loaded into deder_mc empty movie
    clip.
    The movie 000_studioG.swf is located in swf_s folder in site
    root.
    _global.theMAIN = this;
    is a action script in a first frame of the main movie so it
    build a reference to it.
    I've done it before but site was built complete in Flash and
    I did not had any problems with loading external movies into empty
    movie clips. Not long before I've red somewhere(don't remember
    where) that this don't work in swf in a html page.
    But I live in a hope that I would be able to build a html
    site which contains swf which can load external movies into empty
    movie clips. So I am looking for solution.
    I hope it's enough information for you to tell me a solution
    if you know the right answer.
    Thank you.

  • Loading swf into SWFLoader before it is added to a container

    I want to dynamically load a SWF file, before a particular view is created in a Flex 4.5 mobile app. Is it possible to load a SWF file into a SWFLoader before the SWFLoader is added to a container? I tried this but it didn't work.
    I tried doing this using the AS3 Loader class and movieclips, but when I compile for iOS this method does not work for me. Is there a way to do what I want?

    Hello,
    Firstly, why do you want to do this?
    Secondly, you cannot run runtime-loaded SWF files on iOS devices.
    By that I mean you can probably only use static SWF files like assets, but code inside them will not work.
    If you still want to load it, try inside the initialize event handler.

  • Can't load swf into editable region

    Am using DW CS4 in W7 64.
    Have designed an html site with one page that has a swf to control dynamic content with php.
    All the pages are created based on one template and al is fine until I try to place the flash file in the editable area of the html page. It seems that no swf files can me placed in this or any other editable area of the page.
    When the swf is put in the follwoing error comes up "While executing object Tag in Flash htm, a JavaScript error occurred"
    Any one else had this issue? More to the point anyone found a work around?

    Cevema wrote:
    To test the theory, as I had previously loaded CS4 onto my old XP pro machine, following a fresh install of XP Pro, and as Dreamweaver had never been started on the is machine before, I then created a brand new page from the template and tried to load in a swf file, but got the same error message. For a fresh install this couldn't be a corrupt file. A friend also tried this on his machine and had the same result.
    I don't normally use either templates or SWFs, but I have just done a quick test in Dreamweaver CS4 on Windows Vista 32-bit. Dreamweaver inserted the SWF into an editable region without demur. It's definitely not a Dreamweaver bug.
    Did your friend use the same template?
    Since a JavaScript error is being generated, I suspect you have invalid code somewhere in your template, or perhaps you have given more than one element the same ID. Validate your page with the W3C validator (http://validator.w3.org/), and eliminate any errors it finds.

  • Loading SWF into level and setting height/width/location?

    Hi folks, I am an old AS2 guy who gave up on Flash heavy coding when it switched to AS3. Always thought it was less intuitive, longer, and a brand new language and I got tired of trying to keep up when most of my clients did not want to pay for a full flash site. But I got this client...
    Here's the problem, I can load a swf into my main stage or into an MC , but I cannot find out anywhere how to set parameters or load into a level so it doesn't replace the current material or fix to a size that doesn't block my other material.
    I've gotten this far:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    loadGallery();
    function loadGallery():void
    var l:Loader = new Loader();
    var req:URLRequest = new URLRequest("shortstack.swf");
    l.load(req);
    l.contentLoaderInfo.addEventListener(Event.INIT, galleryLoaded);
    function galleryLoaded(e:Event):void
    addChild(e.target.loader);
    What i want to do is load shortstack.swf into level 5, say, and fix it to the bottom left corner of the stage, and set its height to 400px and width to 980. 
    I have a an MC on the stage at those exact dimensions called placeholderMC, but I cannot figure out a way to target it, and the tutorials I've read have to do with loading on CLICK (I want it to load on enterFrame), and none of them tell me how to set parameters, as I could in old AS2.
    FWIW, AS3 may be more powerful, but AS2 was easier to understand.
    TIA,
    Jeff

    http://www.adobe.com/devnet/flash/quickstart/display_list_programming_as3.html

  • Load .swf into .swf with linked .flv

    Hi all,
    I'm trying to load swf-2 into swf-1, with swf-2 externally
    loading an .flv.
    When I go straight to swf-2, it works fine. And when I embed
    the flv in swf-2, and open swf-1, it works fine.
    It's only an issue when swf-2 is pulling the EXTERNAL flv.
    Any ideas?
    Thank you,
    Tracy

    are the files all in the same directory? if you load a swf 2
    in a swf 1, then the code used by swf2 to load the flv file would
    be executed as if the code was executed from swf 1 location. is swf
    2 and the flv in a different folder from swf 1?

  • Load swf into an instance

    In the first frame of my movie, I want to load a swf into
    'cwgmap' mc instance, which is inside 'thumbs' mc instance. I am
    attempting (with no joy!)
    thumbs.cwgmap.loadMovie("2014_map/thumbs.swf");
    Any ideas how I can achieve this? The action must be in the
    first frame of the movie - not attached to the mc itself. Driving
    me mad!
    many thanks

    Managed to fix the issue - the scripting was correct but in
    the wrong frame.
    Cheers!

  • Loading swf into container

    I have created a movie that loads several swfs through an
    empty container. I have tried changing file paths numerous times
    and I can't get the movies to play correctly. Actually, they did on
    our local testing server, but after uploading to the clients
    server, the problems began.
    My test page is:
    http://www.sumnerhomemortgage.com/test/index.html
    loader.swf initially plays part1.swf. Here is the code for
    that:
    loadMovie("
    http://www.sumnerhomemortgage.com/test/flash/part1.swf",
    container);

    Did you upload the FLV to the correct place?
    I downloaded part1.swf, opened it in Flash, and got the
    following error:
    Error opening URL '
    http://www.sumnerhomemortgage.com/test/flash/part1.flv'
    If I paste that URL into the browser I get a 404. I also
    tried it in:
    http://www.sumnerhomemortgage.com/test/part1.flv
    http://www.sumnerhomemortgage.com/part1.flv
    and got a 404 for all of them

Maybe you are looking for

  • Avoiding DUMMY value for profit center while posting COPA document

    Hi All, I have a requirement where I post a document using BAPI_COPAACTUALS_POSTCOSTDATA using a Z Program. Everything works fine , but if we do not mention the profit center explicitly, it takes the value as "DUMMY". Same happens with KE21N. I want

  • ITunes will not sync Photos with iPad

    iTunes 11.1.5 will not sync photos from iPhoto 9.5.1 to an iPad running IOS 7.1.1.... The sync will not complete it just spins forever on 'importing photos'....  I have always selected Sync photos from 'iPhoto' and 'Selected albus,s, Events and Faces

  • Identity services Engine

    Hello, i Christian and i am currently having issues with the Cisco ISE server. I am unable to save group retrieved from the active directory on the cisco ISE server. i can retrieve group and note: it has being joint to the domain (ISE has been joined

  • Flash won't load xml generated from coldfusion

    I have a swf file that used to load in xml files. It worked perfectly fine. However, I then realized it would make more sense to have the flash load a cfm file that creates xml on the fly. My cfm page is creating perfectly fine xml but the flash won'

  • Can't open files due to permissions

    When I create an rtf file in text edit on my laptop, send it to my iMac, and try to open it on my iMac, it says I do not have permission. This is a regular standard text edit file. Why is it's default set to this? When I go under privacy and permissi