No I wanted to write a pure action script factory (no mxml tags) and for some reason or other started down the track of using the Loader class. Probably because the docs said I could load swf's that way. Anyway that's what throws the error. If I try and load a Flex 2 swf file using Loader it always fails.
I just did a quick run through using SWFLoader and the swf's load up ok. Sweet!
Actually what I am really trying to do is tie some sub app's into a main shell application. I am very sketchy on how to do this. I was thinking once I had the swf's loaded I would embed them into a panel component and use a menu to link through. Not sure how they will speak to each other yet. The docs are a bit vague on partitioning.
Thanks for the nudge toward SWFLoader I'll have a crack at it tomorrow.
Angus
On 30/05/06,
Michael Schmalle <[EMAIL PROTECTED]> wrote:
Ha,
I reverse translated you post. You used swfloader but that is what is throwing the erorr?
What type of code do you have in the swf that is loading?
I use SWFloader and have only had problems with sizing it's content.
Is the reason you want to avoid swloader because of the bug?
Peace, Mike
On 5/30/06, Michael Schmalle <[EMAIL PROTECTED] > wrote:Hi,
Try using the SWFLoader, it was designed ofr you guessed it, swf's!
I don't see any other things in your code that would cause that error.
Peace, MikeOn 5/30/06, Angus Johnson < [EMAIL PROTECTED]> wrote:Hi all,
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 .
--
What goes up, does come down.
--
What goes up, does come down.
--
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 .
--
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.

