I am hoping to build a little as3 factory to load my swf's but I am stumbling at the first hurdle.
I'd like to avoid using <mx:SWFLoader> so I am attempting to use the loader class. I can read in the swf file ok but immediately after the load it throws an Error#1009 (full detail at the bottom of the email).
All I am trying to do is load a swf into a canvas and returning. Sounds simple but noooo... not when I start to play :)
I've tried all sort of variations but no luck. Any ideas?
Angus
...
package com.qurg.iqurg.util {
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
import flash.system.LoaderContext;
import mx.core.*
import mx.containers.Canvas;
public class ApplicationFactory {
public function ApplicationFactory():void {
}
public function getObject():Canvas {
var appCanvas = new Canvas();
var loader:Loader = new Loader();
var url:String = "Reader.swf";
var request:URLRequest = new URLRequest(url);
loader.load(request); // error break ****
return appCanvas;
}
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::LayoutManager/set usePhasedInstantiation()
at mx.core::Application$iinit()
at BlogReader$iinit()
at mx.managers::SystemManager/create()
at mx.managers::SystemManager/::initializeTopLevelWindow()
at mx.managers::SystemManager/::frameEndHandler()
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.