PDA

View Full Version : difficulty referencing...


fu-meng
01-31-2005, 08:35 PM
hi.

i've got a datagrid component that i'm having difficulty targeting. i have a button onstage and onclick it creates a pop up window like this:

showWindow( "myMovie", "contents_mc", 400, 250, stage.width/2, stage.height/2 );

and here's my showWindow function:

function showWindow( title, contents, width, height, x, y )
{
// create the Pop Up
_global.windowMgr = PopUpManager.createPopUp( _root, Window, true,
closeButton: true, title: title, contentPath: contents } );
}

the problem is that i just don't know how to target my dataGrid component. i've tried:

windowMg.contents_mc.myDataGrid

but it doesn't work.

any helpful tips are appreciated.

thanks.

fumeng.

misspelledyouth
01-31-2005, 08:43 PM
Publish your swf with the debugger open (ctrl+shift+enter) and you should be able to see the absolute path of the thing you want to target.

Alternatively, once the swf is running go to Debug>List Objects. If you've got a lot of loaded objects in your swf this might be a bit long but look for the instance name of your object - this will give you the full path with dot notation.

fu-meng
01-31-2005, 10:36 PM
hmm..i didn't realize that. it's very useful. but it doesn't seem to be working for me. for example, i'm getting returned this value:

_level0.depthChild0.content.myDataGrid.content_mc

and i'm trying to target my datagrid, but i'm not getting to it. it seems strange, too, because shouldn't i be able to reference it via my global handler, _global.windowMgr? ...and i attach the contents_mc via its linkage name -- it doesn't have an instance name. would that cause a problem?

thanks for replying....i appreciate it.

fumeng.