hitTestPoint() in loaded movie fails

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

hitTestPoint() in loaded movie fails

fallen-2
don't know if this is directly haXe related:

when loading one movie clip into another, hitTestPoint() fails in the loaded movie (as3/flash9):

loaded movie code snippet:

var htp1:MovieClip = new MovieClip();
htp1.graphics.beginFill( 0xff0000, 1.0 );
htp1.graphics.drawRect( 0, 0, 100, 100 );
Lib.current.addChild( htp1 );
trace( htp1.hitTestPoint( 50, 50, true ) );

when just using the loaded swf, hitTestPoint returns true, when loaded by another movie it fails. in as2 there was somthing like _lockroot, but that is gone in as3 - do i have to set anything special in the movie that loads the other(s)?


greetings,
fallen


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hitTestPoint() in loaded movie fails

fallen-2
ah, don't mind.

seems htp1 wasn't initialized at this point (it was created right after main()). when checking later hitTestPoint() returned true.

greetings,
fallen

> don't know if this is directly haXe related:
>
> when loading one movie clip into another, hitTestPoint() fails in the loaded movie (as3/flash9):
>
> loaded movie code snippet:
>
> var htp1:MovieClip = new MovieClip();
> htp1.graphics.beginFill( 0xff0000, 1.0 );
> htp1.graphics.drawRect( 0, 0, 100, 100 );
> Lib.current.addChild( htp1 );
> trace( htp1.hitTestPoint( 50, 50, true ) );
>
> when just using the loaded swf, hitTestPoint returns true, when loaded by another movie it fails. in as2 there was somthing like _lockroot, but that is gone in as3 - do i have to set anything special in the movie that loads the other(s)?
>
>
> greetings,
> fallen
>



--
haXe - an open source web programming language
http://haxe.org