Hi,

   I found my problem...

   I had created classes that extended my AppScreen class

   public class ShowControlScreen extends AppScreen
   public class RobotDiagnosticsScreen extends AppScreen

   etc.
But the Flash IDE would not let me use the AppScreen as the Base Class for my Library symbol - it whines about the Base class being already defined???

   So to workaround this problem, I had set the Base class to;

ShowControlScreen, RobotDiagnosticsScreen, etc.
   Then set a LinkageID for each one to something else;
ShowControl, RobotDiagnostics, etc.

   So my symbols on stage that included components were ShowControl, etc.
As soon as I started instanciating these instead of the Base class for the symbol, my on stage instances appear - hooray.

Need to get my head around this - found a useful thread here, but I am having the problem that if I don't declare my stage instances automatically, but in my classes, I get a reference error for each thing on stage when the system tries to create these objects in the display list;

ReferenceError: Error #1056: Cannot create property _displayText on RobotDiagnosticsScreen

   etc...

So, does anyone know what the workflow is, because this seems like a PITA - either I have to create everything programmatically at runtime, or do some frig' in Flash with my LinkageID's to get it working and risk compounding errors with possible typo's etc in these fields.

Why can't I just specify the class name as the LinkageID and choose WTF I want for the Base class - if I mess it up, that's my problem surely??? Thanks, from a tired p****d off Glen.
Paul Andrews wrote:

----- Original Message ----- From: "Glen Pike" <[EMAIL PROTECTED]> To: "[email protected] >> Flashcoders mailing list" <[email protected]>
Sent: Monday, November 03, 2008 10:13 PM
Subject: [Flashcoders] Flash Authortime vs Runtime children


snip

The problem I have run into is that when I instanciate an AppScreen symbol from my library - it's not on stage - and add it to the stage I handle the ADDED_TO_STAGE event for wiring the components up. All my component instances trace out as null at this point, so I am left scratching my head wondering when they might be added to the display list...

I'd really like to see how you are trying to access the the component instances. Instanciating the symbols alone won't add them to the stage (addChild does that), so do you ever receive the event? If you do you should be able to find the component from the event payload.

If you can write a tiny snippet of code to show how you attempt to load and access your components, then I'm sure we'd find the problem straight away.

Paul
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to