My God Hans, that's a brilliant idea!
It worked like a charm! I can finally see!


Thanks man!

Dimitrios



----- Original Message ----- From: "Hans Wichman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>; "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, December 21, 2005 7:39 PM
Subject: Re: [FlashCoders] game slowing down - eventListener


Hi,
all principles aside (it should work etc), cant u just put _global.gameRef = game; at the end of initGame, just so that u can test it? using _global.gameRef as path, should give u a direct link to your game object.

greetz
Hans

At 06:16 PM 12/21/2005, Dimitrios Bendilas wrote:
At the timeline of my .fla file all I have is:

import com.zefxis.games.myGame.Application;
Application.main(_root)

Structure outlines of Application class:

class com.zefxis.games.gameName.Application {

...
...
private var game:Game;
...


private function Application() {
   // code
}

static function main(...) {
   // code
}

private function initGame():Void {
   // coce
   game = new Game(.........);
}

...
...

}

So, all I want is to find the "game" object.
I've been playing around for hours now and I can't find it, either
inside the _level0 tree or the _global.com tree.

What you said makes sense and that's what I'm trying to do.
Go deep in the tree, copy the path and then with the new snapshot
use recursion and go even deeper. But all I find is Functions.

Thank you for helping here, John.

Dimitrios

----- Original Message ----- From: "John Grden" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, December 21, 2005 6:21 PM
Subject: Re: [FlashCoders] game slowing down - eventListener


ah, if it's under com, you're good.  It'll get searched.

The thing with global is that, you're only going to see the class
definitions (functions/props), unless it's a static class.

So, I would stick with _level0, and try to type in the path as deep as you
can recal to start the snapshot, if that makes sense.

Does that all make sense?

On 12/21/05, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:

John,

At the Class Packages array,
should I add just "zefxis" or "com.zefxis"?
Cause that's where my class package resides.

I did what you told me about the XRay component in the timeline.
The project is pretty huge (more than 150 classes) and there is
a real problem with recursive ON (it actually freezes the player)

I tried going pretty deep in the tree and then enable recursive,
but still I'm having trouble. I only see some objects. And if I click
on them, then I only see functions again.

I'm looking in _global.com.zefxis..... etc, right? I guess that's where
I should be looking, not the _level0 tree.

Sorry John, I don't have it online.

Regards,
Dimitrios




----- Original Message -----
From: "John Grden" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, December 21, 2005 3:11 PM
Subject: Re: [FlashCoders] game slowing down - eventListener


1.  Put Xray back on stage in the _level0 timeline.

2.  Click on it and select the parameters tab.

3.  in the Class Packages array, add Zefxis

4.  Republish and try a snapshot again.

This time, it should at least show you the true class names/paths.  I
actually realized yesterday that if the connector wasn't on stage, the
ClassPath engine isn't initialized (more on that later).

In the older versions of the AdminTool, it used to only do Recursive
searches and it would recurse objects at the same time as
movieclips.  That
proved to be a huge task that caused script timeout errors left and right.
Now, I list objects/movieclips (including arrays), but only movieclip's
get
recursed.  If you want to drill down through an object, just click on it,
and drill down through the property inspector.

So, republish after doing the above.  If you have it online, do you mind
if
I try and look through it with Xray?  Let me know,

Thanks,

John

On 12/21/05, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:
>
> Hello again,
>
> I've been doing test all this time
> but I still haven't found what I'm looking for.
>
> I'm not able to find the actual objects.
>
> When in _global I only see class names (functions).
> If I view _level0 or any movieclip child I only see movieclips
> (I'm not using classes that extend MovieClip)
>
> e.g.
>
> _global.com shows:
>
> blitzagency (object)
> darronschall (object)
> robertpenner (object)
> xfactorstudio (object)
> zefxis (object)
>     applications (object)
>     games (object)
>     control (object)
>         List (function)
>         ScrollBar (function)
>         ScrollableTextBox (function)
>
> Zefxis is my package, so everything game related should be in there.
> If I expand any of the other objects, like applications or games,
> at the end all I get is functions. So no actual object instances.
>
> _level0 shows:
>
> _level0 (movieclip)
>     appPanels (movieclip)
>     onAppChangeFocus (function)
>     onLoad (function)
>     sound_manager (movieclip)
>
> And if I expand anything in the tree all I get is movieclips
> and movieclip functions.
>
>
> What am I doing wrong? I'm still confused.
>
> I remember I used to be able to see object instances
> back when the application was still AdminTool.
>
>
> Thanks for the help
>
> Regards,
> Dimitrios
>
>
> ----- Original Message -----
> From: "John Grden" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
> Sent: Sunday, December 18, 2005 5:13 AM
> Subject: Re: [FlashCoders] game slowing down - eventListener
>
>
> YES!  that's a great tip - you don't have to start at _level0 in your
> snapshots - it's just the default ;)
>
> I'm surprised that the non-recursive searches posed a problem. Once > you > start with a single snapshot, you should be able to click on objects > in
> the
> treeview and have it expand on demand.
>
> On 12/17/05, MyName <[EMAIL PROTECTED]> wrote:
> >
> > Great tips! John.  Sorry for jumping in, Dimitrios. In my case, my
> desktop
> > project got about 140 classes and many circular references. It'll > > take > > forever to take a snapshot from "level0" with recursive option on. > > The > > snapshot returns nodes of the 1st tier from level0 if recursive > > option
> is
> > turned off. But nothing will show up when clicking on a node that is
too
> > complex. So, what I had to do is to take a snapshot from a deep > > down
> > path.
> > For example in my case:
> > _level0.gameBoard.gamePanel.operationPane.accViews.shipView. From > > that
> > point, things seem started looking ok.
> >
> > Thanks,
> >
> > Doug
> >
> > ----- Original Message -----
> > From: "John Grden" <[EMAIL PROTECTED]>
> > To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
> > Sent: Saturday, December 17, 2005 12:27 PM
> > Subject: Re: [FlashCoders] game slowing down - eventListener
> >
> >
> > Good! you're looking around and getting comfortable with doing so > > in
> > Xray!
> >
> > Ok, some tips:
> >
> > 1.   When browsing through global, you'll see your packages and
objects.
> > You'll see all classes - instance, static, singleton etc.  You *can*
see
> > static properties/objects through global since that's where they
> live/are
> > instanced.  Singletons and Instanced classes can be where they're
> > instanced.  So, whatever timeline/movieclip has created the Object,
> that's
> > where you can take a look through it / execute calls against it with
> Xray.
> >
> > 2. If you want to save time with browsing with the treeview, you > > can
> > always
> > use the trace/execute window to verify an objects/propertie's
existance.
> > (IE: _level0.main.myMovieClip.objX)
> >
> > 3. In your class, if it extends a movieclip, you could put in an > > xray
> > trace
> > (_global.tt("MyMovie", this);
> >
> > Then just copy and paste the path that spits out in the trace window
and
> > start checkingyour objects and props from there.
> >
> > Make sense?
> >
> > Let me know if you other questions.  With xray, there's usually 3-4
ways
> > to
> > get an an object and mess with it ;)
> >
> > On 12/17/05, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello John,
> > >
> > > Sorry for the late reply, I wanted to run
> > > some tests before answering back.
> > >
> > > I'm aware of the way the garbage collector works
> > > (even though I'm a little confused with object parameters
> > > stored in the inline functions inside Delegates, if they
> > > get garbage collected after all or not).
> > >
> > > Throughout my framework and the custom code for the game
> > > I pay much attention to deleting all object references.
> > >
> > > I've used xray in the past sometimes. I did this now too
> > > but I'm having some troubles.
> > >
> > > The only lines in my .fla are
> > > import ....Application
> > > Application.main(_root);
> > >
> > > Where in xray should I be looking for object instances?
> > > I can see all movieclips if I take a snapshot of _level0
> > > but if I want to see the instances of the Tile objects,
> > > or the TileManager, or the Countdown objects where
> > > should I look? I tried _global.com.zefxis which is where
> > > all the packages reside but all I see is functions (Classes)
> > > and no objects.
> > >
> > > e.g.
> > >
> > > _global.com.zefxis.solarwind snapshot gives me:
> > >
> > > animation (object)
> > >    Animation (function)
> > >    Animations (function)
> > >    EaseFunctions (function)
> > >    RelativeMovement (function)
> > >    Sequence (function)
> > >
> > > Any clues?
> > >
> > > Thank you!
> > > Dimitrios
> > >
> > >
> > > ----- Original Message -----
> > > From: "John Grden" <[EMAIL PROTECTED]>
> > > To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
> > > Sent: Thursday, December 15, 2005 5:35 PM
> > > Subject: Re: [FlashCoders] game slowing down - eventListener
> > >
> > >
> > > Hey Dimitrios, I know this might be covering something you already
> > > understand, but thought to say it outloud just in case.  An object
> lives
> > > as
> > > long as there is reference to it in memory.
> > >
> > > So, in this scenario below "obj" lives on even though I've tried > > > to
> > delete
> > > the original reference to it ("tt" is Xray's trace method):
> > >
> > > var obj:Object = new Object();
> > > obj.prop = "here";
> > > var a = obj;
> > > var b = a;
> > > tt("all: obj/a/b", obj, a, b);
> > >
> > > delete obj;
> > > tt("delete obj: obj/a/b", obj, a, b);
> > >
> > > delete a;
> > > tt("delete a: obj/a/b", obj, a, b);
> > >
> > > delete b;
> > > tt("delete b: obj/a/b", obj, a, b);
> > > //++++++++++++++++++++++++
> > >
> > > Which traces  out
> > >
> > > //++++++++++++++++++++++++
> > > (41) all: obj/a/b:
> > >   prop = here
> > >
> > >
> > >   prop = here
> > >
> > >
> > >   prop = here
> > >
> > >
> > > (41) delete obj: obj/a/b: undefined ::
> > >   prop = here
> > >
> > >
> > >   prop = here
> > >
> > >
> > > (41) delete a: obj/a/b: undefined :: undefined ::
> > >   prop = here
> > >
> > >
> > > (42) delete b: obj/a/b: undefined :: undefined :: undefined
> > >
> > > With a tile based game and all the possible references you're
probably
> > > running, you might have to take a closer look at how objects are
being
> > > destroyed for garbage collection.  You can easily see if they're
still
> > > alive
> > > using xray as well as delete them at runtime using the execute > > > panel
> > with
> > > xray to see if that helps your memory issues a performance.  Also,
try
> > > changing the visibility of your movieclips at runtime with Xray or
> movie
> > > items off stage one at a time at runtime to see who's hoggin' the
CPU
> > etc.
> > >
> > > Check out the video on the Property Inspector for xray for working
> with
> > > objects/movieclips at runtime:
> > >
> > >
> >
>
http://labs.blitzagency.com/wp-content/xray/videos/tutorials/indexFlash.html#Overview.propertyInspectorOverview
> > >
> > >
> > >
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > John Grden - Blitz
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> John Grden - Blitz
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--
John Grden - Blitz
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
John Grden - Blitz
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to