Loading a SWF inside another SWF question

Hello friends,
1. (IMPORTANT) As all we know when putting some Flash SWF
inside an HTML page, normally it starts playing as soon as its
first frame is loaded.
Now in my case I have to load a SWF (let call it Flash A)
inside another Flash, I used mx.controls.Loader control to do this.
But this internal loaded SWF (Flash A) doesn't display untill it is
completely loaded. Although what is interesting is that if it
contains a sound track I can hear it while it is being loaded.
I wana know is there any way that we can make this Flash
display while being still loaded.
2. Is there anyway to change a Flash playback FPS at runtime?
Thank you so much for any note and help.
- M

damatrixhasu wrote:
> i want to know how i can load a flash inside another
flash container
go to help - search for 'loadmovie'
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>

Similar Messages

  • Embedding a SWF inside another SWF

    I used inDesign CS4 to develop a catalog of services for the
    company I work for. Then exported it to a Flash document with
    interactive buttons and page turns. This is the current look:
    http://www.directrixsolutions.com/cw
    My question in regards to my file is, can you import the .swf
    file, which inDesign makes, into a Flash document so that a
    preloader for the file can be used? My .swf (packet.swf) is about a
    1mb large and so should have a preloader. But, when I import it, or
    have an attached .swf within the file that points to my packet.swf,
    this is what happens. WARNING: IF YOU ARE PREDISPOSED TO HAVING
    SEIZERS, YOU SHOULD PROBABLY NOT CLICK ON THIS LINK. (c8
    http://www.directrixsolutions.com/cw/FlashVersion.html
    As you can see, the document goes crazy. Any ideas?

    NedWebs. Yes, I did add that message myself, and it isn't a
    virus. I can explain what it is doing if that would be better. When
    the FlashVersion of the packet is loaded, it goes through the
    preloader, then goes to the packet.swf. But instead of remaining on
    the first page of the packet and waiting for instructions from the
    viewer on going to the next page. It jumps to the next page, then
    to the next and so on. Very quickly. I would have to say that it
    goes through the entire 11page packet 3 or 4 times each second. It
    is as if when the packet.swf is opened, it goes through each frame
    and is on a loop. Maybe the stop(); script for each page is not
    being recognized? I have attached the ActiveScript code that I used
    within this project.

  • Trouble playing one swf inside another

    All,
    I'm trying to load a SWF and play it inside another SWF.
    Both SWFs are targeted to use Flash Player 8, and AS 2.0
    So, in the parent, I've got code that looks like this:
    var movie_mc:MovieClip =
    this.createEmptyMovieClip("movie_mc",
    this.getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("someothermovie.swf",movie_mc);
    function onLoadInit(target_mc:MovieClip):Void {
    target_mc.play();
    When I run this in the Flash IDE, it runs beautifully.
    However, when I try to play the movie in a browser, the inner
    movie
    plays for a few frames, then just stops playing.
    So potentially relevant facts -
    - Both movies are set to run at 30 FPS
    - The inner movie is about 2,700 frames long
    - The inner movie has an audio track embedded on one of the
    layers
    - The audio track has sync=Stream
    I'm definitely sure the inner movie has stopped playing - I
    set an
    interval in the parent movie that checks the inner movie's
    _currentframe, and displays it in a text field - sure enough
    - it gets
    to about frame 25, and just stops.
    Notably - if I remove the audio track from the inner swf, the
    entire
    thing runs perfectly, both in the Flash IDE and in a browser.
    So, i'm assuming the audio track embedded in a layer, and/or
    Sync=Stream has something to do with this?
    Any advice or insight is MUCH appreciated!
    Cheers,
    Matt

    All,
    I'm trying to load a SWF and play it inside another SWF.
    Both SWFs are targeted to use Flash Player 8, and AS 2.0
    So, in the parent, I've got code that looks like this:
    var movie_mc:MovieClip =
    this.createEmptyMovieClip("movie_mc",
    this.getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("someothermovie.swf",movie_mc);
    function onLoadInit(target_mc:MovieClip):Void {
    target_mc.play();
    When I run this in the Flash IDE, it runs beautifully.
    However, when I try to play the movie in a browser, the inner
    movie
    plays for a few frames, then just stops playing.
    So potentially relevant facts -
    - Both movies are set to run at 30 FPS
    - The inner movie is about 2,700 frames long
    - The inner movie has an audio track embedded on one of the
    layers
    - The audio track has sync=Stream
    I'm definitely sure the inner movie has stopped playing - I
    set an
    interval in the parent movie that checks the inner movie's
    _currentframe, and displays it in a text field - sure enough
    - it gets
    to about frame 25, and just stops.
    Notably - if I remove the audio track from the inner swf, the
    entire
    thing runs perfectly, both in the Flash IDE and in a browser.
    So, i'm assuming the audio track embedded in a layer, and/or
    Sync=Stream has something to do with this?
    Any advice or insight is MUCH appreciated!
    Cheers,
    Matt

  • Loading a flash inside another flash

    i want to know how i can load a flash inside another flash
    container

    damatrixhasu wrote:
    > i want to know how i can load a flash inside another
    flash container
    go to help - search for 'loadmovie'
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Error when opening swf from another swf

    Hi all,
    I'll try to explain this as good as possible.... I made a maze game that works perfectly when I run it by clicking on it's own .swf file, but when I try to access it from another .swf file which is a menu for the games I created, it does not work.
    I have absolutely no idea where to look for the error, so my question is: can it be that the main.swf (which is the menu for games) could be the problem, or the problem must be in the maze.swf?
    Thanx in advance!

    no, all code is in the first frame of actions layer:
    stop();
        var rightArrow:Boolean = false;   
        var leftArrow:Boolean = false;
        var upArrow:Boolean = false;
        var downArrow:Boolean = false;
        var speed:int = 5;
        stage.addEventListener(KeyboardEvent.KEY_DOWN, stage_onKeyDown);
        stage.addEventListener(KeyboardEvent.KEY_UP, stage_onKeyUp);
        stage.addEventListener(Event.ENTER_FRAME, stage_onEnterFrame);
        function stage_onKeyDown(event:KeyboardEvent):void {
            if(event.keyCode == Keyboard.RIGHT) rightArrow = true;
            if(event.keyCode == Keyboard.LEFT) leftArrow = true;
            if(event.keyCode == Keyboard.UP) upArrow = true;
            if(event.keyCode == Keyboard.DOWN) downArrow = true;
        function stage_onKeyUp(event:KeyboardEvent):void {
            if(event.keyCode == Keyboard.RIGHT) rightArrow = false;
            if(event.keyCode == Keyboard.LEFT) leftArrow = false;
            if(event.keyCode == Keyboard.UP) upArrow = false;
            if(event.keyCode == Keyboard.DOWN) downArrow = false;
        function stage_onEnterFrame(event:Event):void {
            var rect:Rectangle = player.getBounds(this);
            var i:int = 0;
            var xBump:int = 0;
            var yBump:int = 0;
            if(rightArrow) {
                xBump = speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(rect.right + i, player.y, true)) {
                        xBump = i - 1;
                        break;
            if(leftArrow) {
                xBump = -speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(rect.left - i, player.y, true)) {
                        xBump = -i + 1;
                        break;
            if(upArrow) {
                yBump = -speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(player.x, rect.top - i, true)) {
                        yBump = -i + 1;
                        break;
            if(downArrow) {
                yBump = speed;
                for(i = 0; i < speed; i++) {
                    if(maze.hitTestPoint(player.x, rect.bottom + i, true)) {
                        yBump = i - 1;
                        break;
            player.x += xBump;
            player.y += yBump;
            if(rightArrow) {
                xBump = speed;
                for(i = 0; i < speed; i++) {
                    if(cilj.hitTestPoint(rect.right + i, player.y, true)) {
                        xBump = i - 1;
                        nextScene();

  • Stop music playing in one swf when another swf starts

    Hello Flash developers please help me here.
    On my main SWF Home  File i have 2 swf files are loaded into my (main home swf)  and everything is runing smooth BUT the problem is when i want to  watch the video the music is still playing i have to click on the button to stop music playing.
    what i want is when i click on the video to play i want automatically the music to stop playing with out me clicking the mp3 button to stop the music playing.
    NOTE
    Keep in mind i have 2 SWF files that are loaded in to the main swf file ...
    Home SWF is the main file
    MP3 SWF   <<   Loads on Home SWF
    Video SWF <<    Loads on Home SWF
    All i want is when the video is playing automatically stop the music and when the video is finish the music automatically continuing from where it was left.
    Thank you so
    AKAoshi1

    I don't know how to do this. I have 4 files. file one calls file 2 when the Next at the end of file one is clicked, file 2 calls 3, etc. The reverse is true with the first Previous for files 2 - 4. Can I get some guidance?
    Thanks

  • Linking an SWF inside an SWF

    Hello eveyone. I am looking for an easy method of my .SWF
    file having a button that opens up an external .SWF internally. Any
    help would be appreciated.

    littlejohnny wrote:
    > Hello eveyone. I am looking for an easy method of my
    .SWF file having a button that opens up an external .SWF
    internally. Any help would be appreciated.
    >
    What you mean by open external swf internally ?
    Swf within SWF ? If so, than go to loadMovie action.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Possible to make embedded swf (in another swf) fill browser?

    I have an .swf which is set at 100x100 percent and fills the
    browser window. I have an embedded .swf within this .swf, and I
    would like to be able to have the embedded .swf fill the browser
    window and remain fluid (for different screen resolutions). This
    has to be done from the embedded .swf.
    I thought if I could retrieve the stage details of the parent
    .swf from within the embedded .swf, then I could use these to
    resize the embedded .swf - but I haven't been able to do this.
    I'm plum out of ideas. Can anybody give me any pointers?
    Many thanks.

    I may have my terminology mixed up. I have a pre-compiled
    .swf that allows embedding of .swf's from a seperate .xml file via
    a LocalConnection API.

  • Question? How to make one swf initialize another swf?

    On my website i would like to have my main swf which has a button that links to a contact form. This main swf is in its own div and i want to have another div with a contact form swf file that i created.
    So i want the first swf's contact button to load the contact swf in the other div.
    question is how would i change the current contact button from loading a link to a html page into a button that loads the swf in the other div?

    again,
    you need to know some javascript.  at least, enough to assign innerHTML to your div or learn some jquery.
    then you need to look-up the external interface class.
    neither of these are easy if you're just starting with flash and/or just starting with javascript.
    i don't think anyone will do this work for you unless you hire someone or find a friend that will do it for you.

  • Help with load xml driven swf in another swf

    Hello people ... (sorry for my Google transalte English)
    ... I am desperate, tapping in place last week.
    In fact, i make flash CD presentation in Adobe Flash CS5 AS2 (with minimal use of ActionScript). It  occurs to me the next problem ... need to load flash image gallery that i already have created, in new presentation file. Gallery  was created in Flash Slideshow maker and as products I have. Swf,. Xml  and folders with thumbnails and picture (no. Fla file).
    The concept of the presentation (as root is concerned) should look like in uploaded picture "izgled otvorenog cd-a". In each of the folder on cd presentation (as on picture) is a Flash presentation controlled by their xml file whose name I must not change. Exe file "Prezentacija 2011" is a presentation (Flash Projector) that i try to make. In the same presentation i create frames and for each of the frames added action:
    loadMovie ("02_Kapije/kapije.swf", "kapije_ucitavanje");
    kapije_ucitavanje._x = 23;
    kapije_ucitavanje._y = 167;
    stop ();
    (Of course, for each item varies loadMovie root and instance name).
    The problem is that presentations can't find xml file, apparently because they do not have the appropriate root. When  all the files of the one gallery set in the same folder with  the "Presentation 2011.exe" file, everything works normally (  however, as i said, i cannot change the name of Xml file and that disturb the concept of my CD presentation).
    How can I drive loaded swf file from the above script to use Xml file in its folder?
    HELP PLEASE!!!
    P.S. ...and it looks so easy

    you're welcome.
    p.s.  please mark helpful/correct responses.

  • A .swf inside a .swf wrapped in a pdf

    Here's what I'm doing:
    I've created interactive swfs of some print brochures using InDesign CS5. Before export I've tried to install some small .swf animated charts created either out of InDesign or out of Flash Catylyst as well as some f4v and flv movies. I've tried making them button activated or page turn activated and here are the results:
    Except for the Catalyst file, everything ran just fine and as expected. The problem with the catalyst file is that I set up a button in InDesign to activate it - which it did - but can only get it to run one time before turning the page to reset it. Actually, this may be the case with the Indesign swf chart as well, although I set it up to activate on page load and haven't experimented to see if a button can make it run repeatedly. Otherwise the movies ran fine either on page load or via button click.
    But unfortunately this isn't where the story ends. After exporting as flash, my task is to create pdfs using the swfs. The easiest way I've found is to go to to File/Create PDF/From File, choose the swf and set the parameters appropriately. But now in the pdf I lose the functionality of the smaller embedded swfs as well as the ability to run the movies. All the rest of the animation still works including page transitions etc, just not the embedded stuff.
    So my questions are these:
    In the swf is there a way to get a chart or animated graphic to run more than once via a button click;
    Once the InDesign file with its complement of small swfs and movies is exported as a swf and then embedded into a pdf is there a way to get the embedded swfs and movies to run?
    I have devised a work around for the project at hand at least for the movies, however its not optimal and it still would be better if these questions can be resolved, particularly since I haven't come up with a workaround for the animated charts yet.
    Many thanks in advance,
    SquareMoon

    Here it goes
    public function pushItemFromURL(url:URLRequest, row:int = -1):void {
    var loader:Loader = new Loader();
    loader.load(new URLRequest("http://127.0.0.1/emi_dir.swf"));
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(ev:Event):void {
    pushItem(loader.content, row);
    public function pushItem(obj:DisplayObject, row:int = -1):void {
    var item:Item = new Item(obj);
    if (row < 0 || getLinha(row) == null)
    row = getGrelha().numChildren - 1;
    if (item.width > maxWidth)
    maxWidth = item.width;
    if (row >= maxHeights.length)
    maxHeights.push(item.height);
    getLinha(row).addChild(item);
    refreshPlacement(row);
    public class Item extends MovieClip {
    public function Item(content:DisplayObject) {
    super();
    var fill:Sprite = new Sprite();
    fill.graphics.beginFill(0, 0);
    fill.graphics.moveTo(0, 0);
    fill.graphics.lineTo(0, content.height);
    fill.graphics.lineTo(content.width, content.height);
    fill.graphics.lineTo(content.width, 0);
    fill.graphics.lineTo(0, 0);
    addChild(fill);
    addChild(content);

  • Embeding a swf in another swf

    Hello, heres what I'm looking to do:
    I am trying to create a project completely in flash player,
    however its very large (its basically a tutorial for a coding
    language called "magic")
    I want to seperate it out a bit, basically one main flash
    file that acts as a menu system with buttons to send you to
    different sections of the tutorial, and then I want to make a bunch
    of individual flash files for each page of those sections.
    How would I go about calling a swf from within a swf file, or
    preferably embedding multiple swf files into the main swf file.
    This would allow me to make a bunch of complicated timeline
    animations without having a completely unmanageable single
    timeline.
    Or if you have another possible suggestion on how to more
    easily seperate functions/animations I'm certainly open to other
    idea's. Thank you in advance!

    This is pretty simple once you get the hang of it. Create an
    empty movieclip and place it on your stage. You can do this with
    either code or by actually creating it in your library. Call it
    holder_mc. position it where you would like your other movies to
    load. Again you can do this by code or by physically moving it.
    //This is how to do it with code:
    //STEP 1 create your empty movie clip and give it your name/
    place it in the next available level
    _root.createEmptyMovieClip ( "holder_mc" ,
    _root.getNextHighestDepth() )
    //position the holder mc
    _root.holder_mc._x = 50
    _root.holder_mc._y = 50
    //create a button and place it in the root - then attach code
    that loads your external .swf into your holder mc
    homeButton_btn.onPress = function(){
    _root.holder_mc.loadMovie("home.swf") }

  • Having problem controling resizing of a swf from another swf

    I'm trying to build a site where all the pages are full browser and maintain aspect ratio. I would like to control the resizing from the menu page.  The resizing works fine from the page that's being resized but when I try to let the parent swf do that it has issues.
    Here's what the home page looks like with the controls built in  http://www.mespinach/example1/
    This example is the site it has a menu page that I open the others from I remove the resizing code from the home page and try to resize from menu.swf.
    here's the code from menu.swf
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var holder:btnHolder = new btnHolder();
    addChild(holder);
    stage.addEventListener(Event.RESIZE, moveHolder);
    moveHolder();
    function moveHolder(e:Event = null):void {
        holder.x = stage.stageWidth - (holder.width +25);
        holder.y = 50;
    holder.mcHome.buttonMode = true;
    holder.mcAbout.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    //holder.mcLocation.buttonMode = true;
    holder.mcStore.buttonMode = true;
    //var objFileToLoad:URLRequest = new URLRequest();
    var swfLoader:Loader;
    addListeners();
    function addListeners():void {
        holder.mcHome.addEventListener(MouseEvent.CLICK, homePage);
        holder.mcAbout.addEventListener(MouseEvent.CLICK, aboutPage);
        holder.mcMovies.addEventListener(MouseEvent.CLICK, moviesPage);
        // holder.mcLocation.addEventListener(MouseEvent.CLICK, locationPage);
        holder.mcStore.addEventListener(MouseEvent.CLICK, storePage);
    var currentPage:*;
    var xImage:Sprite = new Sprite();
    homePage();
    function homePage(event:MouseEvent = null):void {
        SoundMixer.stopAll();
        addListeners();
        if(swfLoader){this.removeChildAt(0);}
        holder.mcHome.removeEventListener(MouseEvent.CLICK, homePage);
        var loadRequest:URLRequest = new URLRequest("home.swf");
        swfLoader = new Loader();
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT, positionContent);
        swfLoader.load(loadRequest);
        this.addChildAt(swfLoader, 0);
        function positionContent(e:Event):void {
            currentPage = swfLoader.content;
            var loadedImage = currentPage.onStage;
            xImage = loadedImage;
    //        loadedImage.x= 0;
    //        loadedImage.y= 0;
            fillBG();
    function aboutPage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("about.swf");
        loader.contentLoaderInfo.addEventListener(Event.INIT,positionContent);
        loader.load(objFileToLoad);
        this.addChildAt(loader, 0);
        function positionContent(e:Event):void{
           loader.x= 0;
           loader.y= 0;
    function moviesPage(event:MouseEvent):void {
        addListeners();
        holder.mcMovies.removeEventListener(MouseEvent.CLICK, moviesPage);
        SoundMixer.stopAll();
        if(swfLoader){this.removeChildAt(0);}
        var objFileToLoad:URLRequest = new URLRequest("Movies.swf");
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT,loadedHandler);
        swfLoader.load(objFileToLoad);
        this.addChildAt(swfLoader, 0);
        function loadedHandler(e:Event):void {
            currentPage = swfLoader.content;
            xImage = currentPage;
    function locationPage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("location.swf");
        loader.load(objFileToLoad);
         this.addChildAt(loader, 0);
    function storePage(event:MouseEvent):void {
        SoundMixer.stopAll();
        var objFileToLoad:URLRequest = new URLRequest("store.swf");
        loader.load(objFileToLoad);
         this.addChildAt(loader, 0);
    holder.addEventListener(MouseEvent.MOUSE_OVER, over);
    holder.addEventListener(MouseEvent.MOUSE_OUT, out);
    holder.addEventListener(MouseEvent.MOUSE_DOWN, down);
    holder.addEventListener(MouseEvent.MOUSE_UP, up);
    holder.mcAbout.buttonMode = true;
    holder.mcHome.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    holder.mcStore.buttonMode = true;
    //holder.mcLocation.buttonMode = true;
    var myColor:ColorTransform = transform.colorTransform;
    function over(e:MouseEvent):void {
        myColor.alphaMultiplier = 3;
        e.target.transform.colorTransform = myColor;
    function out(e:MouseEvent):void {
        myColor.alphaMultiplier = 1;
        e.target.transform.colorTransform = myColor;
    function down(e:MouseEvent):void {
        myColor.alphaMultiplier = 5;
        e.target.transform.colorTransform = myColor;
    function up(e:MouseEvent):void {
        myColor.alphaMultiplier = 1;
        e.target.transform.colorTransform = myColor;
    //var cpc = this.child.child.getChildByName("onStage");
    //trace(cpc);
    var ratio:Number;
    var rRatio:Number;
    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;
    function fillBG(evt:Event = null):void {
        trace("width: " + xImage.width);
        trace("height: " + xImage.height);
        trace("ratio: " + ratio.toString());
        trace("rRatio: " + rRatio.toString());
        trace("newRatio: " + newRatio.toString());
        newRatio = stage.stageHeight/stage.stageWidth;
        holder.x = stage.stageWidth - (holder.width +25);
        holder.y = 50;
        if (newRatio > ratio) {
            trace("newRatio > ratio: ");
            xImage.height = stage.stageHeight;
            xImage.width = stage.stageHeight * rRatio;
        } else {
            trace("else");
            xImage.width = stage.stageWidth;
            xImage.height = stage.stageWidth * ratio;
        stage.addEventListener(Event.RESIZE, fillBG);
    messages from trace statements here:
    width: 939
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: NaN
    else
    width: 561
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: 0.49376114081996436
    else
    The height never changes
    retio and rRatio are NaN even though they are the Quotient of numbers.

    First, it is too much code to go through so I don't think I will give a complete answer. I assume this is a timeline code.
    Here is what I was able to notice:
    1. You declare the variables outside the scopes of the functions:
    var ratio:Number;
    var rRatio:Number;
    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;
    Naturally, they are NaN because neither xImage.height nor xImage.width are available at this point.
    I suspect that you anticipate that when code hits these lines - swf is already loaded but IT IS NOT. Flash executes ALL THE CODE to the end NOT WAITING for swf to load - this is one of the premises of asynchronous event model.
    To remedy this you need to place value assignments into the event handler:
    Version One:
    Declare variable at the top of the code before you start loading:
    var ratio:Number;
    var rRatio:Number;
    var newRatio:Number;
    Calculate values in event handler:
    function positionContent(e:Event):void {
            ccurrentPage = swfLoader.content;
            var loadedImage = currentPage.onStage;
            xImage = loadedImage;
            ratio = xImage.height/xImage.width;
            rRatio = xImage.width/xImage.height;
            fillBG();
    Or do it inside  fillBG(); method (version two)
    2. Nested functions are evil and I would like to suggest you reconsider using them and bring them outside of other methods' scopes. I am talking about positionContent handlers you use.

  • Calling swf to another swf

    Hi ....
    Ok here is the deal ... I have a banner rotator (in AS3) and works just fine.
    In another flash file I have this code that load's the banner rotator:
    this.addEventListener(Event.ENTER_FRAME, cargar);
    function cargar(e:Event):void {
        var newMedia:Loader = new Loader();
        var cont:MovieClip = new MovieClip();
        newMedia.load(new URLRequest("rotor_imagenes_as3_v2.swf"));
        cont.x = 0;
        stage.addChild(cont);
        stage.addChild(newMedia);
    And really calls the banner rotator, but don't play it. I put the files for me to understand what i'm talking about.
    Thanks ...

    an enterframe event is a loop.  use:
    cargar();
    function cargar():void {
        var newMedia:Loader = new Loader();
        var cont:MovieClip = new MovieClip();
        newMedia.load(new URLRequest("rotor_imagenes_as3_v2.swf"));
        cont.x = 0;
        stage.addChild(cont);
        stage.addChild(newMedia);

  • How to remove SWFs under another SWF?

    Hello!
    I'm using the following code to link to other pages:
    var loadPage = new Loader();
    function loadBiology(e:MouseEvent):void {
    addChild(loadPage);
    loadPage.load(new URLRequest("biology.swf"));
    Now the code works fine and such, this is more of something I'm curious about!
    When I use that code, I'm assuming that 'biology.swf' is simply placed over the current SWF that is open (as I can still hear the music even though I've gone away from that particular page). Is this correct?
    And then I'm just wondering if there is a simple way to remove that current SWF and replace it with the new one ('biology.swf)? (I use this code in various pages to link them all together, and I think the more a user navigates around the pages it really slows down the whole program!)
    I have slight knowledge that in Actionscript 2 you assigned a SWF to a particular layer, but I'm not sure how to go about it in AS3!
    Any help is appreciated! (I'm a beginner so please forgive my ignorance!)

    Assuming that this is on the main timeline, I suggest creating sprites that hold each one of the SWFS that you create, so then you can have something like the following:
         var bioHolder:Sprite;
    public function addBiologyPage( _url:String ):void{
         if( !bioHolder) //holder doesn't exist? create it
              bioHolder = new Sprite();
         var loadPage:Loader = new Loader();     //create new loader
         this.addChild( bioHolder );     //ad holder to parent
         bioHolder.addChild( loadPage );  //add loader to holder
         loadPage.load(new URLRequest( _url ) ); //load loader
    private function removeBioPage():void{
         this.removeChild( bioHolder );
         bioHolder.removeAllChildren();
         bioHolder = null;
    That should let you add and remove pages as needed.  Then you could set up an array that holds the holder Sprites if you have alot  / dynamic pages that you need to manage.

Maybe you are looking for

  • Version 1 and CS4 on the Same System?

    Hello, I am ready to install the CS4 Production bundle but I have an active project in Encore 1. I have read that I can not open the V1 files in Encore CS4. Is there a way to still use the V1 file? Or can I have V1 installed along with CS4 in order t

  • Orchestration in bpel

    hi all, i am trying to orchestrate using bpel. but not getting proper help regarding that. i want to get a file as input in bpel and separate(orchestrate) to various other applications. Thank u Revert back for clarifications.

  • Out Of Memory Error when running multiple tasks

    Hey All, I am currently running DASYLab 13.0 with the latest version of NI MAX (14.0.1f1). The hardware that I have is the cDAQ-9188. I am attempting to read psi, temperature, and flow; each has a seperate task set up in MAX. The reason I did this wa

  • SMP 2.2 Deployment of package (update) problem in SCC

    Hi everybody, Hope you can help. I'm currently working on some updates of a mobile application. The changes on the frontend and backend work ok. The problem lies in the update of the Sybase part. We already have a complete environment up and running

  • I can't sign into Icloud: Server Error.

    I've tried everything to sign into Icloud on my Windows 7 PC with no success! i've tried the CMD solution some people have suggested, and downloaded all the new windows updates. My verison of Itunes and Icloud are the most recent versions! No help at