|
List Info
Thread: movieclip lose reference
|
|
| movieclip lose reference |
  France |
2007-04-16 15:32:49 |
Again
I tried it in pure AS2, it does the same .... undefined
everywhere, but trace(
typeof myMc ) => movieclip
First time I see it.
--
haXe - an open source web programming language
http://haxe.org
|
|
| Re: movieclip lose reference |

|
2007-04-16 15:38:03 |
Instead of using the depth to destroy your movieclip, try
explicitly
removing it. Attach your bitmap to a new depth and
myMc.removeMovieClip()
On 4/16/07, filt3r free.fr <filt3r free.fr> wrote:
> Again
> I tried it in pure AS2, it does the same .... undefined
everywhere, but trace(
> typeof myMc ) => movieclip
> First time I see it.
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
--
haXe - an open source web programming language
http://haxe.org
|
|
| Re: movieclip lose reference |
  France |
2007-04-16 15:51:41 |
Hm, I know, but , I have to keep the same reference.
myMc is a clip that I have a reference in others objects ,
and if I create
another clip, I'll loose the refernce too :(
Selon Mason Staugler <mason staugler.net>:
> Instead of using the depth to destroy your movieclip,
try explicitly
> removing it. Attach your bitmap to a new depth and
> myMc.removeMovieClip()
>
>
> On 4/16/07, filt3r free.fr <filt3r free.fr> wrote:
> > Again
> > I tried it in pure AS2, it does the same ....
undefined everywhere, but
> trace(
> > typeof myMc ) => movieclip
> > First time I see it.
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
--
haXe - an open source web programming language
http://haxe.org
|
|
| Re: movieclip lose reference |
  France |
2007-04-16 16:02:47 |
Nicolas,
I do exactly what you say.
I'll try to explain more :
myMc = flash.LMib.current.attachMovie ( "gfx", 1
);
transformFunction( myMc, ....... )
transformFunction (target...)
{
var blabla = target.createemptymovieclip(.....);
blabla._width = 200....
var bmp = new BitmapData(.....
bmp.draw(blabla....
target._parent.attachBitmap( bmp .....)
}
All display is good , but after thyat myMc._width =
undefined :(
I don't know if it's clear enough .....
Thanks,
Michel
Selon Nicolas Cannasse <ncannasse motion-twin.com>:
> > Hm, I know, but , I have to keep the same
reference.
> > myMc is a clip that I have a reference in others
objects , and if I create
> > another clip, I'll loose the refernce too :(
>
> The reference is the object, not the depth. If you want
to be able to
> change it, pass an object such as { r : myMc } and then
you can modify
> the .r content.
>
> Nicolas
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
--
haXe - an open source web programming language
http://haxe.org
|
|
| Re: movieclip lose reference |
  France |
2007-04-17 04:42:49 |
Hi there !
I've tried to return a new instance too, but it seems to not
working. Neither in
pure AS2 ( maybe a bug ? ).
In fact it works great, the display I mean, but after that,
all the mc
properties are lost, not the mc ! It's really strange...or
maybe I didn't
construct it the right way...
I've found another solution for now, but I don't like loose
a battle like this
;)
I'll try another way until I find how to do that.
Thanks,
Michel
Selon Nicolas Cannasse <ncannasse motion-twin.com>:
> > Nicolas,
> > I do exactly what you say.
> > I'll try to explain more :
> > myMc = flash.LMib.current.attachMovie (
"gfx", 1 );
> > transformFunction( myMc, ....... )
>
> myMc can't be modified this way. You should return the
new instance in
> transformFunction and write the following :
>
> myMc = flash.LMib.current.attachMovie (
"gfx", 1 );
> myMc = transformFunction( myMc, ....... )
>
> Or else :
>
> myMc = { r : flash.LMib.current.attachMovie (
"gfx", 1 ) };
> transformFunction( myMc, ....... ) // will modify
myMc.r content
>
> Nicolas
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
--
haXe - an open source web programming language
http://haxe.org
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|