I believe at one time that the following would create a static variable on
your class, not an instance variable, but don't know if that's changed:

protected var _timer:Timer = new Timer();


-Scott


On 12/7/06, T. Michael Keesey <[EMAIL PROTECTED]> wrote:

Are you initializing the timer at compile-time or in the constructor?
That is, are you doing this:

protected var _timer:Timer = new Timer();

... or this?:

public function MyBitmapClass() {
    super();
    _timer = new Timer();
    //...
}
//...
protected var _timer:Timer;

I've had some trouble with the former approach. It seems to set all
instances' _timer fields to the same object. The latter approach
ensures that each field is indeed different.

On 12/7/06, Sascha <[EMAIL PROTECTED]> wrote:
> Hi List,
>
> I have an advanced AS3 problem with that I'm stuck ...
>
> I'm extending the Bitmap Class to create a custom bitmap object that
uses a
> Timer to trigger a function that scrolls the bitmap's BitmapData.
> This works fine as long as there is only one instance of the custom
bitmap
> on the screen but as soon as there are two only one of them keeps
playing
> the timed scroll. If I add many more they even all disappear.
> I guess that it is timer related trouble like as if all are using the
same
> timer (though every instance creates its own timer).
>
> Does somebody have any clue how to get this working?
>
> Thanks a lot,
> Sascha
>
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry & Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--

: : ) Scott
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to