Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 35

Thread: Loading external swf with no use of AS files

  1. #11
    Junior Member Settled In AYDIN is on a distinguished road
    Join Date
    Jan 2009
    Posts
    4
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    flash templates
    Hi Flep,
    OK, here step by step:

    I decompressed the zip-file again and open main.fla.
    Then I compile the swf. No errors yet.
    I press Button 1, "one.swf" is loaded correctly and I receive:

    "I am one.swf and now I can interact with the main SWF
    ...and I can also interact with the MovieClip of main SWF from a nested MovieClip"

    Everything OK, but then I press Button 2, "two.swf" is loaded correctly and I get the following error:

    "ArgumentError: Error #2025: Das angegebene DisplayObject muss ein untergeordnetes Element des Aufrufers sein.
    at flash.display::Loader/unload()
    at main_fla::MainTimeline/onButtonDown()"

    Now every time I press another Button, the files are loaded correctly, but I get the same ArgumentError. I think, there must be a problem by unloading the previous swfs.

    Thanx,
    ciao Aydin

  2. #12
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Loading external swf with no use of AS files

    lol
    sometime Flash gets me nervous...I did your same steps but I do not get errors

  3. #13
    Junior Member Settled In AYDIN is on a distinguished road
    Join Date
    Jan 2009
    Posts
    4
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    Hi Flep,
    yes you're so right... Sometimes I think, Flash is like a woman you love and you think you know everything about, even the mistakes, you reached a lot with. And everytime you catch errors, she says it's your fault, you're not doing right... ;o)

    Ciao Aydin

  4. #14
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Loading external swf with no use of AS files

    ha!

  5. #15
    Junior Member Settled In gbrentf is on a distinguished road
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    I can load the first swf ok but when I try to load the next swf I get the error message:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::Loader/unload()
    at main_fla::MainTimeline/onButtonDown()

    I have seen this error many times before but do not understand what it means??/
    Thanks for your help.

  6. #16
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Loading external swf with no use of AS files

    Hi,
    as I sais I do not get any error.
    Anyway, if you take off these lines:
    Code:
    if(loader!=null)
    		loader.unload();
    do you still get the error ?

  7. #17
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Loading external swf with no use of AS files

    Or try to change the function onButtonDown with the following:
    Code:
    function onButtonDown(evt:MouseEvent):void
    {
    	if(loader!=null)
    	{
    		loader.unload();
    		loader=null;
    	}
    	request=new URLRequest(my_videos[evt.target.id]);
    	loader=new Loader();
    	loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImageLoaded);
    	loader.load(request);
    }

  8. #18
    Junior Member Settled In AYDIN is on a distinguished road
    Join Date
    Jan 2009
    Posts
    4
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    Hi Flep,

    removing the 2 llines of code fix it.
    Code:
    if(loader!=null)
            loader.unload();
    But this one doesn't work.
    Code:
        if(loader!=null)
        {
            loader.unload();
            loader=null;
        }
    I don't understand why?
    Seems to be correctly. Any idea?

    Ciao Aydin

  9. #19
    Junior Member Settled In eg19689 is on a distinguished road
    Join Date
    Dec 2007
    Posts
    6
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    Flep, I think this is perfect. Good job on the keeping the code simple.

  10. #20
    Junior Member Settled In susannep is on a distinguished road
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Re: Loading external swf with no use of AS files

    I'm building a drop down menu with four main buttons that click open 4 sub buttons.
    The main buttons contain no swfs but the sub buttons buttons each contain a swf file. I'm really stuck and have no idea on how to script this. Is this a case of different levels or sub clicks or what?

    Please help me...Iv'e been stuck for days.

    I'll highly appreciate a reply!!
    Thanks, Susanne

+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Problems loading external SWF files
    By scott123 in forum Flash English
    Replies: 0
    Last Post: 15-04-10, 15:40
  2. Loading mulitple external .swf files
    By mrentschler in forum Actionscript 3.0 newbies
    Replies: 2
    Last Post: 06-04-10, 12:54
  3. preLoader with external files!!!
    By losbenos in forum advanced Actionscript 3.0
    Replies: 10
    Last Post: 01-11-09, 08:21
  4. unload External swf files with AS3
    By andrei in forum advanced Actionscript 3.0
    Replies: 2
    Last Post: 08-11-08, 15:08
  5. Loading external XML files with Flash CS3
    By Flep in forum Tutorials
    Replies: 14
    Last Post: 19-11-07, 14:23

Tags for this Thread

Bookmarks

Posting Permissions

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