A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Simple swf problem (I'm just a n00b)

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Simple swf problem (I'm just a n00b)

    Ok so I have a extremely simple page that I am making... you can even look at it here... http://www.choicedesserts.ca

    Upon going to the site you should get the same error that every one gets which is what is bugging me..

    code:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display:isplayObjectContainer/removeChild()
    at mainbodyflash_fla::MainTimeline/frame2()




    Basically, the "Gallery" section has an external SWF being loaded into it. I call it in by putting the following code onto Frame 1 of my actions layer...

    code:
    var myrequest:URLRequest=new
    URLRequest("viewer.swf");
    var myloader:Loader=new Loader ();
    myloader.load(myrequest);



    And I display it in the actually "Galley" stage by using this code on the content layer in the "gallery" frame...

    code:
    stage.addChild(myloader);



    If I just leave it like this it loads fine and I don't get any errors.....but if you click on any of the other tabs the external swf overlaps what is in those parts.... so I tried to just use this code in those frames....

    code:
    stage.removeChild(myloader);



    And it does make it so that it doesn't overlap anymore...but thats when I get that error mentioned above.... so basically I want to know how to remove the external SWF when going to another frame without it overlapping or giving me this error....

    THANKS IN ADVANCE! I know thats alot of info but it seems like it would probably be simple for someone whos not new at it like me...

  2. #2
    Member
    Join Date
    Nov 2005
    Location
    Houston, TX
    Posts
    93
    I don't get an error upon going to the site. All works fine.

  3. #3
    Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Ya..

    Yea it seems I only get it 4/10 times.... I dunno I guess I could let it slide... thanks for your response... I find I get it most on OSX in Safari.... I've tried loading the site on Mac OSX with Safari, Firefox, Opera and on Windows Vista with Firefox, Safari and IE. Windows seems to be fine.... Mac Safari screws up the most.

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