gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Error using DataGrid in sub-SWF


From: zou lunkai
Subject: Re: [Gnash-dev] Error using DataGrid in sub-SWF
Date: Mon, 16 Mar 2009 07:02:34 +0800

> but by the time onLoadInit() is called, the target_mc is set at 0 and I cannot change it:
 
Maybe the problem is with onLoadInit event handler.  You could write a simple testcase for this function.  eg. check if the target and the properties of the target could be accesssed inside the onLoadInit function. Maybe Gnash doesn't trigger the onLoadInit handler at proper time, eg. at a too early or too late stage. 
 
--zou

On Sun, Mar 15, 2009 at 8:25 AM, Michael Landon <address@hidden> wrote:
>> I'm still digging into the details of this issue, and will post again once I
>> have more information, but I wanted to throw this error out there and see if
>> anyone can help direct my debugging effort.  Looking at the code for
>> "replace_display_object," depth is suppose to be unsigned so not sure why
>> it's negative at this point.
 
>For statically placed movieclips(eg. created by PlaceObject2) tags, the depth from the AS >view(mc.getDepth()) is calculated like this:  mc.getDepth() == depth_defined_in_placeObject2_>tag - 16384.  So '-16383' probably means it's a clip that was placed at depth 1.


Yes, the object is a depth 1, so that makes sense.

I've done a bit more testing today, and the replace_display_object error might just be a symptom of a larger issue I'm having. After the second load of the sub-SWF containing the DataGrid, the destination MovieClip has a width and height of 0 -- and I cannot resize with actionscript.

I verified that when I register my MovieClipLoader listener, the destination clip's size is valid:

22106:3085941184] 16:04:58 TRACE: myListener.constructor:: dest w/h=[501/701]

but by the time onLoadInit() is called, the target_mc is set at 0 and I cannot change it:

PC:3095 - EX: ActionPushData (reg[0])
    0) type=register, value=[number:501]
After execution: PC 3095, next PC 3100, stack follows
Stack: "[gnash::movie_instance(_level0.content.target):0x8560008]" | "[string:_width]" | "[number:501]"
Global registers: 1:[function(gnash::swf_function):0xb397e810], 2:[object(gnash::as_object):0xb397e888]
Local registers: 0:"[number:501]", 1:"[object(gnash::as_object):0xb1ca37f0]", 2:"[undefined]", 3:"[gnash::movie_instance(_level0.content.target):0x8560008]"
Local variables: this==[object(gnash::as_object):0xb1ca37f0]

PC:3141 - EX: ActionSetMember
-- set_member [gnash::movie_instance(_level0.content.target):0x8560008]._height=[number:701]
After execution: PC 3141, next PC 3142, stack follows
Stack:
Global registers: 1:[function(gnash::swf_function):0xb397e810], 2:[object(gnash::as_object):0xb397e888]
Local registers: 0:"[number:701]", 1:"[object(gnash::as_object):0xb1ca37f0]", 2:"[undefined]", 3:"[gnash::movie_instance(_level0.content.target):0x8560008]"
Local variables: this==[object(gnash::as_object):0xb1ca37f0]


22106:3085941184] 16:04:59 TRACE: onLoadInit:: [_level0.content.target] has w/h=[0/0]



If I remove the (empty) DataGrid from frame 4, everything works just fine.

Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]