Could it be a mistyped i == 1 ?

And for that matter:
function checkPlaying(e:TimerEvent) : void  if (1 == 1) {

should be
function checkPlaying(e:TimerEvent) : void {
  if (1 == 1) {


Karina


> -----Original Message-----
> From: [email protected] [mailto:flashcoders-
> [email protected]] On Behalf Of Eric E. Dolecki
> Sent: 04 May 2010 8:25
> To: Flash Coders List
> Subject: Re: [Flashcoders] Timer object created twice in class
> 
> Before I can go any further, I saw this in your code:
> 
>  if (1 == 1) {
> 
> ... ?!?!
> 
> 
> 
> 
> On Tue, May 4, 2010 at 2:58 PM, Mattheis, Erik (MIN - WSW) <
> [email protected]> wrote:
> 
> > Here's a snippit and a timeline version of it - when I run it on the
> > timeline, it works as expected, but when I run it within my class it
> acts as
> > though there are two instances of the _timer object.
> >
> > On the timeline, it works as expected, tracing,
> >
> > 1 1
> > True
> >
> > But when I have it inside my class, it traces,
> >
> > 1 0
> > false
> > 1 1
> > True
> >
> > What am I not seeing or understanding here? Thanks..
> >
> > //********  Version on timeline:
> >
> > var _timer:Timer;
> >
> > function init() {
> >  _timer = new Timer(250, 0);
> >  _timer.addEventListener(TimerEvent.TIMER, checkPlaying);
> >  _timer.start();
> > }
> >
> > function checkPlaying(e:TimerEvent) : void {
> >  if (1 == 1) {
> >  e.target.stop();
> >  trace(e.target.currentCount, _timer.currentCount);
> >  trace(e.target == _timer);
> >  }
> > }
> >
> > init();
> >
> > //******** Version in class:
> >
> > public function Tracker(video) {
> >  _video = video;
> > }
> >
> > public function init() {
> >  _timer = new Timer(250, 0);
> >  _timer.addEventListener(TimerEvent.TIMER, checkPlaying);
> >  _timer.start();
> > }
> >
> > function checkPlaying(e:TimerEvent) : void
> >  if (1 == 1) {
> >  e.target.stop();
> >  trace(e.target.currentCount, _timer.currentCount);
> >  trace(e.target == _timer);
> >  }
> > }
> >
> > I'm instantiating it from another class like this:
> >
> > if (_tracker == null) {
> >  _tracker = new Tracker(_videoScreen);
> > }
> > _tracker.init();
> > _ _ _
> > Erik Mattheis
> > Senior Web Developer
> > Minneapolis
> > T  952 346 6610
> > C 612 377 2272
> >
> > Weber Shandwick
> > Advocacy starts here.
> >
> > PRWeek Global Agency Report Card 2009 - Gold Medal Winner
> > The Holmes Report Global Agency of the Year
> > PR News Agency of the Year
> >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> 
> 
> 
> --
> http://ericd.net
> Interactive design and development
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to