External SWF controlling main timeline

Hi all --
I have a main SWF file that I am loading a smaller, external
SWF file into (with loadMovie, if you care to know). Within that
smaller file, I have a button -- ideally, this button should
trigger an action within the main SWF file.
My problem is that I cannot get the external SWF file to
control an action within the main SWF. I'm guessing there must be a
way to do this, but I'm having some trouble here.
Thanks in advance... please advise!

Well.... there may be a reason if it is set up correctly and
still doesn't work....
Is this external SWF hosted on another server?
If so, you might be running into crossdomain policy problems.
I've had the issue that remotely-hosted SWFs will not OBEY commands
from the root timeline while they are remote, but work just fine
when they are copied onto the same server as the main SWF.
Do a search on crossdomain policy XML in Flash help. It may
help you get around this problem.

Similar Messages

  • Controlling multiple external swfs from main timeline

    Hi, I've been trying to combine the features of two tutorials I found, one that deals with controlling external swf's from the main timeline and the other that explains how to load and unload multiple external swf's.  I'd like to be able to load and unload multiple external swf's, and control these swf's buttons from the main timeline. 
    I asked this same question on the forum of the site where I found these tutorials, and receive only one reply saying that "it should'nt be hard to do." but they did not elaborate any further.  This left me think that I was missing something very obvious and I've spent too much time now trying to work what it is now.  I understand pretty much how both pieces of code work, but just can't work out how to combine them.
    If someone could explain it to me, I'd much appreciate it.
    Tutorial One code - controlling an external swf from the main timeline.
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("swfs/balls.swf");
    ldr.load(urlReq);
    function loadHandler (event:Event) {
    var myClip:MovieClip = event.target.content;
    addChild(myClip);
    function myClipOver(event:MouseEvent):void {
    myClip.myBlueBalls.stop();
    function myClipOut(event:MouseEvent):void {
    myClip.myBlueBalls.play();
    // set listeners
    myClip.addEventListener(MouseEvent.ROLL_OVER, myClipOver);
    myClip.addEventListener(MouseEvent.ROLL_OUT, myClipOut);
    // listener
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
    Tutorial Two code - loading and unloading multiple external swfs.
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
        loader.y = Ypos;
    addChild(loader);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

    I will not be able to help you with whatever relaxatraja provided though it is purported by relaxatraja to be clearly explaining what I was explaining (???).
    Your loadHandler function appears a bit confused.  For the code you show I don't see you assigning any event listeners for the events that will be dispatched in the loaded file.  As I showed earlier, your loadHandler function should be assigning a listener for the event that will be dispatched (modified slightly below). and if you have three different events being dispatched in the loaded file, then you'll do better to have three different listeners.  I show only one below for one of the events you dispatch...
    function loadHandler (event:Event) {
      // assign a listener for the loaded file's goExit function's event
       MovieClip(event.currentTarget.content).addEventListener("close", event1Handler);
    // I can't make sense of what you have here
        removeChild(myClip); // why ?? - it hasn't been added yet as far as I can see - error 2007?
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf"); // the event.target is the Loader
        ldr.load(newSWFRequest); // this will load over the file you just finished loading??
        ldr.x = Xpos;
        ldr.y = Ypos;
        addChild(myClip);  // why?? it has nothing in it
    function event1Handler(e:Event):void {
        // do whatever is involved with what the "close" event is supposed to do
        trace("goExit function executed");
    As far as what you have in the loaded file, you appear to be trying to pass the files names as if they were parameters.  The file naming should be done at the receiving side for the event handler function for the event listener.  While you could create a custom event that include parameters that you can pass, that's another level of coding that is better left for a future experience.
    Study the following - understand it before you try to use it.
    Below is a link to some files I made for another posting that demonstrates what I have been explaining.  The neurope file is the main file.  Publish the netherlands file so that you have an swf to load for it, and then run the neurope file.  The file that gets loaded (netherlands) only has a button in it that when clicked dispatches an event for which the main file (neurope) has assigned a listener.  The main file displays a message when the button gets clicked in the loaded file.
    http://www.nedwebs.com/Flash/neurope.zip

  • Controlling loaded swf from main timeline

    Hello,
    I'm working on loading external swf files for ios. I am able to load the swf files and set them to visible or invisible in different frames. I am having trouble controlling the loaded swf files from the main timeline. Specifically, I would like to have a button on the main timeline, that when clicked will move a loaded swf to frame 1.
    Here is a code that loads one swf file:
    var myLoader1:Loader;
    var loaderContext1:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
    if(myLoader1 == null)
              myLoader1 = new Loader();
              addChild(myLoader1);
    myLoader1.load(new URLRequest("folder/file1.swf"),loaderContext1);
    myLoader1.visible = true;
    backbutton.addEventListener(MouseEvent.MOUSE_DOWN, backbutton1);
    function backbutton1(myEvent:MouseEvent):void {???????????? myLoader1.gotoAndStop(1);}  (this line does not work)
    (Once I load file1.swf, within the file1.swf I click a forward button to move to different frames. My question is: how do I code the 'backbutton' on the main timeline so that it causes the loaded file1.swf to go to frame 1?)
    Thank you for your help.

    sure.
    if the movieclip on the loaded swf's main timeline has reference mc, you would use:
    MovieClip(myLoader.content).mc.gotoAndStop(1);
    p.s.  you might find the following helpful,  http://kb2.adobe.com/community/publishing/918/cpsid_91887.html

  • Control main timeline from loaded swf.

    Hi,
    I'm using a textfield for debug information.
    I'm loading an swf on the main timeline and I'm showing the status in the debug textfield.
    function swfLoaderCompleteHandler(event:Event)
         Debug.text +=  "Swf loaded.";
    That works.
    But,
    I'm loading a png file in the loaded swf. , I'm trying to show the status of the png file as I showed the status of the swf.
    function pngLoaderCompleteHandler(event:Event)
         MovieClip(parent).Debug.text += "Png loaded.";
    I can't control the main swf from inside the loaded swf. Even gotoAndStop or calling a function doesn't work.
    Do I need to add something when I load the swf, saying it's a MovieClip or something?
    Here's a fla too. http://flashfocus.nl/forum/attachment.php?attachmentid=9885&d=1282509233

    Thank you! you're brilliant!
    For people with the same problem:
    If you use CS5 and you have a TLF text on the stage, it doesnt work... I think it's a bug. But when I converted my TLF textfield to classic and everything works fine!

  • Control swf from main timeline

    i know i've done this before! i have a swf. 4 labels. a stop
    at frame 1. i embedd this into my main timeline. i have 4 butons in
    an MC in my main project, going to specific labels in my main
    timeline, where i have the following code, attempting to load the
    swf and jump to that label:
    this.container_shell.loadMovie("interact01.swf");
    interact_shellb.gotoAndStop("label1");
    its not working. the swf loads, but i can't jump to the
    label.
    any ideas? appologize for the basic question, i'm a designer,
    not a programmer!

    If you have a question to ask, you should start a new posting and include the code/info pertinent to your problem.  The one you are trying to catch a ride from is flawed and requires some questions to be answered.  Being that the posting is over 4 years old, it is unlikely the original poster is going to be answering any.

  • Flash 8 xml rotator.swf and main timeline frame looping

    Hi Y'all -
    I have a purchased swf file that randomly rotates images (90
    or them) located in an external xml file. It works fine in it's own
    swf file.
    The author suggested dragging the movie clip to the library
    and to the stage. I did that in frame one, on its own layer of my
    main swf file, followed by empty keyframes for all other frames in
    the main swf. That works too, only showing the rotating logos in
    frame one.
    However, the stop(); actions on each of the other frames are
    ignored, so that going to frame two on the main timeline starts
    with the proper content and then continues on to the next frame and
    the next. Without the rotator, buttons control the action and I
    have no problem.
    This link shows the problem -
    http://uniconexed.org/bigflash/unicon-05-17-08-newlook.swf
    I've tried attaching the swf file and unloading it, using
    "create empty movie clip" (my current attempt outlined in the
    code), and about a half dozen other ways to no avail.
    I think I need to kill "play movie" when someone leaves frame
    one (or enters any other frame) even though not all of the 90
    images have displayed. It could be some depth issue, or lock root,
    I dunno.
    To restate, one of two things happen -
    1) the scene continues to display the files randomly over top
    of the content in the other frames (wrong) but the navigation
    buttons work (correct)
    or
    2) the random images do not display in the other frames
    (correct) but the navigation stops at each frame do not work
    (wrong) - the swf file scrolls through each of the frames, ignoring
    the stop(); at the top of each frame.
    Any help that leads to success would be greatly appreciated.
    Dan

    Hi there,
    Try using...
    unloadClip(myContent);
    instead of
    unloadMovie(myContent);
    unloadClip is the proper method to use when removing content
    created with the MovieClipLoader class

  • Child .swf controlling parent timeline

    Hello Captivate Heroes,
    I've searched around, and can't seem to find any solid info on an issue my team is having. I'm a bit of a noob when it comes to Javascript, so I apologize if this question is too basic for this forum.
    Is it possible for an embedded .swf (created in Captivate) to control the main timeline in a parent .swf? Consider the example below:
    1) This window is an embedded .swf (another captivate file, which I’ll refer to as the “child”) that has an interactive walkthrough. It loads and begins playing immediately. I want users to complete this module and all interactions in it before continuing to the next slide in the “parent” file. Essentially, I want either the child or the parent timeline to play, but never both at the same time.
    2) This is our normal continue button, and I don’t want it appearing until 1 has been completed.
    My solution was to add a javascript call on the first slide of the child file that tells the parent file to pause its timeline (something like _root.rdcmdPause=1;). Then, do the opposite on the last child slide ( _root.rdcmdResume=1;). In this way, the parent slide would essentially pause on its first frame (which doesn’t have an active continue button) while the child animation continues to play. However, this isn’t working. It’s been a really long time since I’ve scripted, so I’m very rusty. Is that the proper way to manipulate parent variables in a child file? Do you have any other ideas on how to accomplish this task?
    I have a backup solution -- providing a "password" at the end of the child animation, which users can use to unlock the continue button. I'd rather use a more graceful solution
    Thank you in advance,
    Jamie

    Hi Jamie,
    I don't think JavaScript is going to help you here.  You need to be doing this in ActionScript 3. 
    For the non-scripting part, you can control the Captivate movie using system variables.  To pause the main slide, you could assign rdcmdPause=1 on the Slide Entry action.  You may want to adjust the slide transition to none so that it won't look faded out when it pauses the movie.  You can also show/hide items on the slide using the timeline, but it sounds like you won't really know when the Learner will be done with the interactive child .swf. 
    From what you described, it sounds like the Child .swf (#1) needs to communicate with other objects on the slide... mainly the continue button (#2).  In order to do that you'll most likely need to make the child .swf #1 into a widget so that it can communicate with the main movie and other objects on the slide.  I would suggest 3 possibilities:
    1.  Learn to use a widget framework such as Widget Factory or CpGears to make this possible
    2.  Take a look at the Infosemantics Event Handler Widget.  Not sure if it will meet all your needs, but it's worth a look.
    3.  Hire a Captivate Widget Developer to make this possible... and yes I am a Widget Developer (shameless plug )
    Hope that helps,
    Jim Leichliter

  • GotoAndPlay specific frame in external swf from main swf

    I have a main swf that loads 2 external swfs.
    I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
    In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff.
    NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
    However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
    Here is code in frame #1 of main swf to load external swfs:
    //load academic movie
    var swfLoader1:Loader = new Loader();
    container1.addChild(swfLoader1);
    var url1:URLRequest = new URLRequest("academic.swf");
    swfLoader1.load(url1);
    //load wisdom movie
    var swfLoader3:Loader = new Loader();
    container3.addChild(swfLoader3);
    var url3:URLRequest = new URLRequest("wisdom.swf");
    swfLoader3.load(url3);
    Here is code in frame 2 of main swf that checks button to see where to go in external swf:
    //academic button clicked
    function academicClick(event:MouseEvent){
       container3.alpha = 0;
       container3.visible = false;
       container1.visible = true;
       container1.gotoAndPlay(1); //this is where I am trying to force it to start at frame 1
       container1.alpha = 1;
    I don't want to reload the external movie to force it to start over.
    Any help would be much appreciated.

    You can easily control this by making the external swf to load with your movieclip, The below is the code snippet that clear on accessing the specific frame on external swf.
    //Loading clips content
    var ldr:Loader;
    var mcExt:MovieClip;
    //Loading
    loadswf("external.swf");
    function loadswf(tmp:String):void{
        unloadSwf();
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    //UnLoading
    function unloadSwf():void{
        if (ldr!=null){
            ldr.unloadAndStop();
            removeChild(mcExt);
            mcExt=null;
    //Intervals (The part you work on the specific frame within the external swf
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        if (num==1) mcExt.play();
        if (num==9) {
                mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                function skipfn(e:MouseEvent):void{
                    mcExt.stop();
                    mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
        if (num==mcExt.totalFrames){
            mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
            gotoAndStop("help");
    hope it solve

  • Controlling main timeline from loaded movie

    I have loaded an external movie onto the main movie in a
    movie clip called "mainholder" - In the main timeline on the main
    movie there is a "stop" command on frame 1. From the loaded movie,
    I want to control the main timeline and tell it to go to frame 2.
    Can someone tell me the actionscripting to do this, I have tried
    several commands and getting frustrated. ;-)
    Thanks

    movies are loaded into levels. The main movie is always
    considered level0 a.k.a _root in the AS. When you load a movie into
    another, the main movie is also considered the parent of that
    loaded movie a.k.a. this._parent in AS where this refers to the
    loaded movie. If you want something in the loaded movie to control
    the main timeline you could call it like this...
    _root.gotoAndStop(2); or _root.gotoAndPlay(2); depending on
    what you want.
    but because of the parent/child relationship, it can also be
    done like this....
    this._parent.gotoAndStop(2); or this._parent.gotoAndPlay(2)
    Although the first method is less to remember, the second
    method proves the most friendly and re-usable. Let me explain...
    Say that you did something like this....
    [MAIN MOVIE]
    [LOADED MOVIE]
    {Loaded Movie with buttons to control LOADED MOVIE}
    Your main movie loads a movie and when this loaded movie
    reaches it's 10th frame, it loads another movie where the buttons
    reside for controlling that clip. If you used _root in the button
    movie, it would cause the main movie (_root) to be called and not
    the LOADED MOVIE as you had intended during its design prior to
    trying to make this new main movie (and it would work as intended
    if you opened the LOADED MOVIE's fla file and exported). If you use
    this._parent in the button movie, it will always make it's calls to
    the LOADED MOVIE's timeline and not the main clips timeline.
    Sorry if this confuses you but it's important to
    understand.

  • Problem with nested button controlling main timeline...

    I am new with as3, i like it, but I am suffering
    After I looked on google for trying to figure out my problem I attempt to post here...
    to make it simple, I have a loader that is loading some swf(a scrolling content), with some content, in those swf I am trying to put a "close" button and some other like  next/prev. But no way... normally I thought that the MovieClip(root) would make it but it's seems not to be enough.
    code of the swf:
    var btnclose1:btnclose = new btnclose();
    this.addChild(btnclose1);
    btnclose1.x = 770
    btnclose1.y = 55;
    btnclose.addEventListener(MouseEvent.CLICK, closearchi)
    function closearchi (e:MouseEvent):void {
    MovieClip(root).gotoAndStop(1);
    Thanks by advance...

    Hi Ned,
    Actually, I just saw than the problem come from the timeline itself, but I don't see what to do...
    on the frame 1 of the main timeline, it is loading an empty swf into my container"box":
    var myLoader:Loader = new Loader();
    var myURL:URLRequest = new URLRequest("empty.swf");
    myLoader.load(myURL);
    box.addChild(myLoader);
    on frame 2 I have the first content and so on:
    function loadarchi():void
    var myURL:URLRequest = new URLRequest("archi.swf");
    myLoader.load(myURL);
    loadarchi();
    I did a simple button on the main just for testing purpose, telling him to go to frame 1, it doesn't unlod the content ! there is the problem!
    what is wrong with that? it shoul load the empty swf instead of archi...
    thanks again

  • Slider to control main timeline

    What code would I need to take the Slider Component and have it control the Main timeline? I have created a presentation with audio embedded and images coming up and moving as the person is talking about it. I need a way to scrub back and forth down the timeline.

    Help Please!
    I have used the slider successfully to move between frames 43 and 60 in an individual scene:
    stop()
    function moveAlong_ff(evt:Event):void {
    gotoAndStop(sl_ff.value);
    sl_ff.minimum = 43;
    sl_ff.maximum = 60;
    sl_ff.liveDragging = true;
    sl_ff.addEventListener(Event.CHANGE, moveAlong_ff);
    this.addEventListener("enterFrame",onEnterFrame_ff);
    function onEnterFrame_ff(e:Event) {
    sl_ff.value = this.currentFrame;
    And I have also managed to set up some buttons that navigate between scenes successfully:
    ff_btn2.addEventListener(MouseEvent.CLICK, jump11);
    function jump11(event:MouseEvent):void
              gotoAndPlay(1,"Scene2");
    fb_btn2.addEventListener(MouseEvent.CLICK, jump12);
    function jump12(event:MouseEvent):void
              gotoAndPlay(1,"Scene3");
    bs_btn2.addEventListener(MouseEvent.CLICK, jump13);
    function jump13(event:MouseEvent):void
              gotoAndPlay(1,"Scene4");
    However, when the above scripts are present together there seems to be some kind of conflict and I get the error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at trailfresh_demo_19_fla::MainTimeline/onEnterFrame_ff()
    Can anyone help as I'd really like to be able to navigate between scenes using buttons and also have the slider work in individual scenes

  • Script to control main timeline from inside MC?

    This is such a newb question and I'm sorry! I have a Movie
    Clip on the main timeline and inside that MovieClip are several
    buttons. I want the buttons to go to specific frames in the main
    timeline. I have:
    on (release) {
    gotoAndPlay("PowerPoint");
    I know there needs to be something in there to tell it the
    main timeline. I searched for this very basic, simple question and
    couldn't find anything.
    Thanks for any help.

    if your buttons are true buttons use:

  • How to control main timeline from buttons in a movieclip - job in jeopardy!

    I am trying to do a simple thing in theory. In my main timeline I have a series of images with frame labels for each. In a movieclip (with its own labels & script) below the images, I have two panels of butttons that flop back and forth (to save space). The idea is to simply have the main timeline play the frame specified by the corresponding button in the movieclip. I tried the parent.child thing but either im doing it wrong or that isnt the solution. If anyone can help me I will be saved from certain death. If you think any other part of my project may be to blame, Ill be happy to provide anything that can help. Thanks in advance.
    Here is my script:
    ActionScript Code:
    function on1click(evt:MouseEvent):void {
        gotoAndPlay("pic1");
    thumbPanel.pic1_btn.addEventListener(MouseEvent.CLICK, on1click);
    this is the error: 
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at gallery_fla::MainTimeline/frame1()

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is not in the display list
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Controlling main timeline from a movieclip

    I am helping someone (using MX 2004) who is trying to send
    the playback head to different scenes via a dropdown menu in a
    movieclip. We have tried many variations but still can make it
    work.
    Any help is greatly appreciated!

    don't use the goto functions and don't use scenes to
    navigate. use frame labels and the goto methods:
    _root.gotoAndPlay("scene2_frame1"); // <- label that
    frame.

  • Control Main swf through external swf..

    ok, this is a tough one for me.....
    ive figured out timeline transitions, and timeline based preloaders......so now i have a problem.....
    i have my MAIN swf file that i load all my pages in externally ( external swf files )....
    when i click a button ( for example ) my "about us" button - the transition begins....
    i have a keyframe with the following code on frame 40 ( inside a movie clip named "pages" in my main SWF where all the buttons/transitions are ):
    var Xpos:Number=0;
    var Ypos:Number=0;
    var swf:MovieClip;
    var bgloader:Loader = new Loader();
    var bgURL
    if(page==1){
    bgURL=new URLRequest("pages/home.swf");
    if(page==2){
    bgURL=new URLRequest("pages/about.swf");
    if(page==3){
    bgURL=new URLRequest("pages/updates.swf");
    if(page==4){
    bgURL=new URLRequest("pages/contact.swf");
    bgloader.load(bgURL);
    bgloader.x=Xpos;
    bgloader.y=Ypos;
    bg.addChild(bgloader);
    stop();
    now as you can see, at the end it stops...and this is because my external swf files have timeline preloaders in them.....
    now on frame 41 of my main swf, i created a label called "start" which i need to target from my external pages....
    on all my external swfs i have this code on frame 2( and this is where i am having the problem ):
    if(framesLoaded==80){
          MovieClip(parent).gotoAndPlay("start");
    else if(framesLoaded<80){
         gotoAndPlay(1);
    now, where i have MovieClip(parent).gotoAndPlay("start"); - i am trying to target my MAIN swf files timeline ( which is inside a movie clip on the main timeline called "pages").
    however, it doesnt work....i cannot get my external swf to communicate correctly for some reason.....
    how do i code my external swf files to know that once frame 80 has loaded on them, that it needs to direct my MAIN swf file to gotoAndPlay("start"); ??
    im hoping someone can help here....

    You may not need all of what you're trying to accomplish if you are just waiting for the swf to load before you command the main timeline to move along.  If you assign a listener to the loader you can determine when the file is loaded and ready to run without having the file figure that out itself and tell you about it.  Just add an INIT listener to your loader...
    bgloader.contentLoaderInfo.addEventListener(Event.INIT,  eventHandler);
    That line of code will have your main timeline waiting to call that eventHandler function until the loader content (your swf) indicates that it is loaded and ready for action.
    So all you might need is (meaning no code is needed in your loaded swf's)...
    stop();
    var Xpos:Number=0;
    var Ypos:Number=0;
    var swf:MovieClip;
    var bgloader:Loader = new Loader();
    var bgURL;
    if(page==1){
    bgURL=new URLRequest("pages/home.swf");
    if(page==2){
    bgURL=new URLRequest("pages/about.swf");
    if(page==3){
    bgURL=new URLRequest("pages/updates.swf");
    if(page==4){
    bgURL=new URLRequest("pages/contact.swf");
    bgloader.contentLoaderInfo.addEventListener(Event.INIT,  initHandler);
    bgloader.load(bgURL);
    bgloader.x=Xpos;
    bgloader.y=Ypos;
    bg.addChild(bgloader);
    function initHandler(event:Event):void {
        gotoAndPlay(41);
    Taking one step back to what you tried just so the intentions of that solution aren't wasted... the missing link in your attempt was neglecting to add a listener for the load completion that would have called the loaderCompleteHandler function...
    bgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,  loaderCompleteHandler);

Maybe you are looking for

  • Still having trouble with iTunes movie rental

    Running a Mac w/iTunes 7.6. It brought down the whole movie, but just as it's about to finish, I get an error that says "We could not complete your iTunes store request. An unknown error occured (5103). There was an error in the iTunes Store. Please

  • How to add multiple reports in single

    Hi, I have to develop a report which contains two reports. Ex: first one is Year Revenue 2008 10000 2009 30000 2010 20000 G.Total 60000 and seconds report is Year Product Units 2008 Biztec 2000 2009 FunProd 1000 my requirement is that i want to devel

  • Why is the backup twice as big?

    I scanned the Freeagent drive with Grand Perspective and it was 417 GB, almost twice as big as the iMac scan (Macintosh HD): 221 GB. As far as I can recall, I've only ever used that drive for Time Machine backups. The biggest item is the iPhoto libra

  • Spaces: Possible to hide applications from other spaces?

    Hi I'm wondering if it's possible when you press alt+tab and see the "application switcher", to show only the applications that are located in your current Space? f.x. if I have 5 applications open, but 2 of them are in the Spaces window number 1, th

  • Hotmail problem - sending

    Mac has stopped sending mail via Hotmail though it receives (can't connect to SMTP server). iPad working fine in both directions. Is it them or me ? New problem in last 36 hrs. What can I do ?