Re: [flexcoders] AS3 loading AS2 getBounds() issue (SOLVED)

2008-03-12 Thread Ian Thomas
Followup on this issue for the archives...

Eder Fortunato from Brazil suggested setting _lockroot=true on App C.
This solves the problem.

Cheers,
   Ian

On Tue, Mar 11, 2008 at 8:22 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> Alex,
>
>   It works correctly when app A loads app C directly.
>
>   As I said, the test sources are minimal. They contain no excess
>  code or dependencies.
>
>   I have tested this thoroughly in a number of scenarios and believe
>  it's a player error.
>
>   I have logged this as an error on Jira.
>
>  Thanks,
>  Ian
>
>
>
>  On Tue, Mar 11, 2008 at 7:57 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>  > Does it fail for app A loading app C directly?  Maybe there is some
>  > dependency in app C that isn't in app B like access to stage.  I won't have
>  > time to diagnose from your sources, so maybe someone else will take the
>  > time.
>  >
>


Re: [flexcoders] AS3 loading AS2 getBounds() issue

2008-03-11 Thread Ian Thomas
Alex,

  It works correctly when app A loads app C directly.

  As I said, the test sources are minimal. They contain no excess
code or dependencies.

  I have tested this thoroughly in a number of scenarios and believe
it's a player error.

  I have logged this as an error on Jira.

Thanks,
 Ian

On Tue, Mar 11, 2008 at 7:57 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

> Does it fail for app A loading app C directly?  Maybe there is some
> dependency in app C that isn't in app B like access to stage.  I won't have
> time to diagnose from your sources, so maybe someone else will take the
> time.
>


RE: [flexcoders] AS3 loading AS2 getBounds() issue

2008-03-11 Thread Alex Harui
Does it fail for app A loading app C directly?  Maybe there is some
dependency in app C that isn't in app B like access to stage.  I won't
have time to diagnose from your sources, so maybe someone else will take
the time.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ian Thomas
Sent: Tuesday, March 11, 2008 10:31 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 loading AS2 getBounds() issue

 

Hello Alex,
This is nothing to do with communication between the VMs.

As it happens, for our actual production app, we are using Grant
Skinner's SWFBridge to communicate via LocalConnection.

But the sample Zip I've provided shows the bug, and has nothing to do
with VM->VM communication - a simple Loader component shows the
problem.

To restate the simplest test case:

AS3 app A loads AS2 app B (via a Loader component)
AS2 app B loads AS2 app C (via MovieClipLoader)

MovieClip.getRect() and MovieClip.getBounds() _fail_ within app C, and
work within app B.

No communication (other than loading) required.

Thanks,
Ian

On Tue, Mar 11, 2008 at 5:23 PM, Alex Harui <[EMAIL PROTECTED]
<mailto:aharui%40adobe.com> > wrote:

> AS3 and AS2 are different VMs and cannot access each other.
LocalConnection
> or ExternalInterface can be used instead. Google for "AS2 SWF Loader"
for
> some existing solutions.

> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Ian Thomas
> Sent: Tuesday, March 11, 2008 3:13 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] AS3 loading AS2 getBounds() issue
>
> Hi guys,
>
> (This is an AS3 issue rather than Flex per se, but might be of
interest.)
>
> I've discovered a strange bug with the AS2 MovieClip.getBounds() and
> MovieClip.getRect() methods.
>
> As far as I can tell, it only happens in this situation:
>
> AppA is an _AS3_ application. AppA loads AppB.
> AppB is an AS2 application. AppB loads AppC.
> AppC is an AS2 application.
>
> If you run AppA, then any getBounds() or getRect() calls on objects in
> AppC fail, but they work as expected in AppB.
>
> (If you just run AppB, then everything works as expected.)
>
> I've tried various variants of this; if, instead of loading AppB, you
> embed it into AppA at compile-time, the problem still occurs. It
> appears to be something to do with loading one VM1 movie into another
> one within a VM2 shell.
>
> For the curious, here's a Zip containing a minimal test setup:
> http://www.wildwinter.net/public/getBoundsBug.zip
<http://www.wildwinter.net/public/getBoundsBug.zip> 
>
> All suggestions for workarounds welcomed, as this is a real nuisance
> for what we're currently working on.
>
> (For reference, this is in Flash Player 9,0,115,0, using either Flex
> compiler 2.01 or Flex Compiler 3.0 for the AS3 and using Flash 8.0 or
> MTASC for the AS2.)
>
> Cheers,
> Ian
>

 



Re: [flexcoders] AS3 loading AS2 getBounds() issue

2008-03-11 Thread Ian Thomas
Hello Alex,
   This is nothing to do with communication between the VMs.

As it happens, for our actual production app, we are using Grant
Skinner's SWFBridge to communicate via LocalConnection.

But the sample Zip I've provided shows the bug, and has nothing to do
with VM->VM communication - a simple Loader component shows the
problem.

To restate the simplest test case:

AS3 app A loads AS2 app B (via a Loader component)
AS2 app B loads AS2 app C (via MovieClipLoader)

MovieClip.getRect() and MovieClip.getBounds() _fail_ within app C, and
work within app B.

No communication (other than loading) required.

Thanks,
   Ian

On Tue, Mar 11, 2008 at 5:23 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

> AS3 and AS2 are different VMs and cannot access each other.  LocalConnection
> or ExternalInterface can be used instead.  Google for "AS2 SWF Loader" for
> some existing solutions.

> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Ian Thomas
>  Sent: Tuesday, March 11, 2008 3:13 AM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] AS3 loading AS2 getBounds() issue
>
> Hi guys,
>
>  (This is an AS3 issue rather than Flex per se, but might be of interest.)
>
>  I've discovered a strange bug with the AS2 MovieClip.getBounds() and
>  MovieClip.getRect() methods.
>
>  As far as I can tell, it only happens in this situation:
>
>  AppA is an _AS3_ application. AppA loads AppB.
>  AppB is an AS2 application. AppB loads AppC.
>  AppC is an AS2 application.
>
>  If you run AppA, then any getBounds() or getRect() calls on objects in
>  AppC fail, but they work as expected in AppB.
>
>  (If you just run AppB, then everything works as expected.)
>
>  I've tried various variants of this; if, instead of loading AppB, you
>  embed it into AppA at compile-time, the problem still occurs. It
>  appears to be something to do with loading one VM1 movie into another
>  one within a VM2 shell.
>
>  For the curious, here's a Zip containing a minimal test setup:
>  http://www.wildwinter.net/public/getBoundsBug.zip
>
>  All suggestions for workarounds welcomed, as this is a real nuisance
>  for what we're currently working on.
>
>  (For reference, this is in Flash Player 9,0,115,0, using either Flex
>  compiler 2.01 or Flex Compiler 3.0 for the AS3 and using Flash 8.0 or
>  MTASC for the AS2.)
>
>  Cheers,
>  Ian
>


RE: [flexcoders] AS3 loading AS2 getBounds() issue

2008-03-11 Thread Alex Harui
AS3 and AS2 are different VMs and cannot access each other.
LocalConnection or ExternalInterface can be used instead.  Google for
"AS2 SWF Loader" for some existing solutions.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ian Thomas
Sent: Tuesday, March 11, 2008 3:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AS3 loading AS2 getBounds() issue

 

Hi guys,

(This is an AS3 issue rather than Flex per se, but might be of
interest.)

I've discovered a strange bug with the AS2 MovieClip.getBounds() and
MovieClip.getRect() methods.

As far as I can tell, it only happens in this situation:

AppA is an _AS3_ application. AppA loads AppB.
AppB is an AS2 application. AppB loads AppC.
AppC is an AS2 application.

If you run AppA, then any getBounds() or getRect() calls on objects in
AppC fail, but they work as expected in AppB.

(If you just run AppB, then everything works as expected.)

I've tried various variants of this; if, instead of loading AppB, you
embed it into AppA at compile-time, the problem still occurs. It
appears to be something to do with loading one VM1 movie into another
one within a VM2 shell.

For the curious, here's a Zip containing a minimal test setup:
http://www.wildwinter.net/public/getBoundsBug.zip
<http://www.wildwinter.net/public/getBoundsBug.zip> 

All suggestions for workarounds welcomed, as this is a real nuisance
for what we're currently working on.

(For reference, this is in Flash Player 9,0,115,0, using either Flex
compiler 2.01 or Flex Compiler 3.0 for the AS3 and using Flash 8.0 or
MTASC for the AS2.)

Cheers,
Ian

 



[flexcoders] AS3 loading AS2 getBounds() issue

2008-03-11 Thread Ian Thomas
Hi guys,

(This is an AS3 issue rather than Flex per se, but might be of interest.)

I've discovered a strange bug with the AS2 MovieClip.getBounds() and
MovieClip.getRect() methods.

As far as I can tell, it only happens in this situation:

AppA is an _AS3_ application. AppA loads AppB.
AppB is an AS2 application. AppB loads AppC.
AppC is an AS2 application.

If you run AppA, then any getBounds() or getRect() calls on objects in
AppC fail, but they work as expected in AppB.

(If you just run AppB, then everything works as expected.)

I've tried various variants of this; if, instead of loading AppB, you
embed it into AppA at compile-time, the problem still occurs. It
appears to be something to do with loading one VM1 movie into another
one within a VM2 shell.

For the curious, here's a Zip containing a minimal test setup:
http://www.wildwinter.net/public/getBoundsBug.zip

All suggestions for workarounds welcomed, as this is a real nuisance
for what we're currently working on.

(For reference, this is in Flash Player 9,0,115,0, using either Flex
compiler 2.01 or Flex Compiler 3.0 for the AS3 and using Flash 8.0 or
MTASC for the AS2.)

Cheers,
   Ian