[xray] How to see all objects?
John Grden
neoriley at gmail.com
Thu Mar 16 11:14:48 EST 2006
yeah, that's because you need to have a pointer to the instance of your
class - hence why _root.app = app shows up in Xray.
Most likely, if you used _global.ASSetPropFlags(_global, null, 0,2) you
might be able to see it under _global.HelloWorld - but you SHOULDn't have to
do that at all since it has a public static method in it.
On 3/15/06, Darren Cook <darren at dcook.org> wrote:
>
> I have the code below, and when I view it in xray I can see the txt
> object under _root fine. But what I cannot see is my HelloWorld object,
> under either _level0 or _global.
>
> If I attach a reference to _root (the commented out line at the bottom
> of the below code) then I can see it.
>
> Is there a way to view all my objects without explicitly attaching them
> to _root?
>
> BTW I don't see the output from _global.tt() anywhere. Am I doing
> something wrong there?
>
> Darren
>
> -------------------------------------------------------
> //Compile with:
> //mtasc -swf helloworld1.swf -cp ../as2classes -main
> // -version 7 -header 300:200:12 -strict HelloWorld.as
>
> import com.blitzagency.xray.util.XrayLoader;
>
> class HelloWorld{
> /** Holds reference to the single global class that main() creates */
> static var app:HelloWorld;
>
> public var data:String;
>
> /** Constructor: does all the work */
> function HelloWorld(){
> data="Hello World";
>
> _root.createTextField("txt",10,0,0,0,0);
> _root.txt.autoSize='left';
> _root.txt.text=data+"\n";
>
> _global.tt("Finished initializing HelloWorld");
> }
>
> /** Program entry point: creates one global instance of our class */
> static function main(){
> XrayLoader.loadConnector("XrayConnector.swf", _level0, true);
>
> app=new HelloWorld();
> //_root.app=app;
> }
>
> }
>
> _______________________________________________
> xray mailing list
> xray at osflash.org
> http://osflash.org/mailman/listinfo/xray_osflash.org
>
--
John Grden - Blitz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/xray_osflash.org/attachments/20060316/efac1d78/attachment.htm
More information about the xray
mailing list