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

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Results 1 to 8 of 8

Thread: Load external *swf - error #1009

  1. #1
    Junior Member Settled In Vinnie is on a distinguished road
    Join Date
    Feb 2008
    Posts
    2
    Rep Power
    0

    Load external *swf - error #1009

    flash templates
    Hello,
    I want to load following swf: http://www.flepstudio.org/forum/down...do=file&id=103
    into my main stage. The movie itself runs perfectly but as soon as I call it through the main stage it throws a

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at collection/init()
    at collection()


    I tried

    public function collection() {

    if (stage == null) {
    addEventListener(Event.ADDED_TO_STAGE, loadXML);

    } else {
    Security.LOCAL_TRUSTED;
    init();
    loadXML();}
    }


    but this only leads to another error.
    It would be great if somebody could help me to fix this issue.

    Thanks
    Vincent

  2. #2
    Junior Member Settled In Vinnie is on a distinguished road
    Join Date
    Feb 2008
    Posts
    2
    Rep Power
    0

    Re: Load external *swf - error #1009

    Never mind...I figured it out. Thank you very much Flep!!! Your tutorials are great!

    Vincent

  3. #3
    Junior Member Settled In oliverbass is on a distinguished road
    Join Date
    May 2008
    Posts
    4
    Rep Power
    0

    Re: Load external *swf - error #1009

    Hi,

    Would you share the solution you found Vinnie ?
    I get the same error message while trying to load an external swf file...

    Thanks

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

    Re: Load external *swf - error #1009

    Quote Originally Posted by oliverbass View Post
    Hi,

    Would you share the solution you found Vinnie ?
    I get the same error message while trying to load an external swf file...

    Thanks
    Yeah

    Or,
    Oliver, attach the files I'll have a look.

  5. #5
    Junior Member Settled In oliverbass is on a distinguished road
    Join Date
    May 2008
    Posts
    4
    Rep Power
    0

    Re: Load external *swf - error #1009

    Hi Flep, thanks for your answer

    I'm trying to load an external swf file (a photo gallery I found on ffiles.com) but I get an error message.
    I came across your forum while Googling my error message.
    If there's a quick way for you to help me I would be very grateful but I don't want to bother your with code that you didn't wrote or presented on your website.

    The code I use to load the movie is :

    Code:
    var thisMovieClip:MovieClip;
    
    var thisLoader:Loader = new Loader();
    
    thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
    
    thisLoader.load( new URLRequest("galerie.swf") );
    
    function doneLoading(evt:Event):void {
    
    thisMovieClip = MovieClip(thisLoader.content);
    thisMovieClip.x = 510
    thisMovieClip.y = 340
    addChild(thisMovieClip);
    
    thisMovieClip.stop();
    
    }
    the exact error message is :

    TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at classes::Script$iinit()
    TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at classes::ImageViewer$iinit()
    at classes::Script/::xmlLoaded()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    (sorry, french version...)

    I have to admitt that I don't understand half of the code...and error message...
    I'm amongst the huge quantity of non-programmer graphics designers who had a shock discovering that Flash CS3 doesn't allow some easy tricks anymore...

    But again, I would perfectly understand if you can't support this one.

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

    Re: Load external *swf - error #1009

    Hi,
    I think you have some code into the external SWF that try to call some objects and it does not get it.
    You can easy solve by using ADDED_TO_STAGE event.

    Add into your external SWF that event:
    Code:
    addEventListener(Event.ADDED_TO_STAGE,init);
    
    function init(evt:Event):void
    {
    	// here write the code
    }

  7. #7
    Junior Member Settled In oliverbass is on a distinguished road
    Join Date
    May 2008
    Posts
    4
    Rep Power
    0

    Re: Load external *swf - error #1009

    Hi Flep,

    Thanks a lot for your help.
    When I add the code with the ADDED_TO_STAGE event, I get an error message related to packages (unexpected package)

    I think I have to start everything over instead of copying pieces of code that I don't fully understand...

    The other sections of your website will certainly be of great interest to help me to learn AS 3 from the start

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

    Re: Load external *swf - error #1009

    I think the following tutorial can help you:

    Event.ADDED_TO_STAGE

+ Reply to Thread

Similar Threads

  1. I could really use some help (Error #1009)
    By YumaKirosaki in forum Actionscript 3.0 newbies
    Replies: 2
    Last Post: 07-03-10, 07:25
  2. Load external *swf - error #1009
    By Marshall157 in forum advanced Actionscript 3.0
    Replies: 1
    Last Post: 06-04-09, 14:18
  3. external swf loadin problem #1009 Error
    By keshaodhomane in forum Actionscript 3.0 newbies
    Replies: 2
    Last Post: 08-03-09, 10:57
  4. [as3]error #1009
    By Charlotte17 in forum Actionscript 3.0 base
    Replies: 9
    Last Post: 10-09-08, 10:55
  5. Error 1009 Load XML
    By loris.dassie in forum Actionscript 3.0 base
    Replies: 0
    Last Post: 10-07-08, 14:20

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