Note that there are some explanatory texts on larger screens.

plurals
  1. POFlash AS3 Loading 2 Different SWF from the same server getting null object reference error
    primarykey
    data
    text
    <p>I'm trying to load two swf files one after the other from the same domain into a main flash player... When The first one is Loaded... it works fine, But when I'm trying to load the other one the first one's actionscript freaks out (stop() function just stops working) In addition, the second one doing some issues with sandbox violation (#2121).</p> <p>I don't find a reason for this problem...</p> <p>The Loading code for the first swf:</p> <pre><code>... ldr = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded); ldr.load(new URLRequest(swf1filename)); ... function swfLoaded(e:Event):void { mcExt = MovieClip(e.currentTarget.content); mcExt.x = 0; mcExt.y = 32; addChild(mcExt); } </code></pre> <p>The Loading code for the second swf:</p> <pre><code> ... function showSWF2(){ if ( end_movie_swf == null &amp;&amp; endMcExt== null ){ end_movie_swf = new Loader(); end_movie_swf.contentLoaderInfo.addEventListener(Event.COMPLETE, Swf2Loaded); end_movie_swf.load(new URLRequest(endSwffilename)); }else{ endMcExt.gotoAndPlay("show"); } } ... function Swf2Loaded(e:Event):void { trace(e); endMcExt = MovieClip(e.currentTarget.content); end_movie_swf.contentLoaderInfo.removeEventListener(Event.COMPLETE, endSwfLoaded); endMcExt.x = 0; endMcExt.y = 0; addChildAt(endMcExt,3); endMcExt.gotoAndStop("show"); } </code></pre> <p>and I'm getting this error:</p> <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference. at SWF1::MainTimeline/frame13() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload