That helps, thanks, but I'm still doing something very wrong:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
 <mx:Script>
  <![CDATA[
   var i:Number;
   private function incrementit():Number
   {
    
    i += 1;
    return i;
   }
  
            private function testIncrementer():Number 
            {
            testText.addEventListener(Event.ENTER_FRAME, incrementit);
            testText.text = i.toString();
                  return i;
                  trace(i);
            }
  ]]>
 </mx:Script>
 <mx:Text x="30" y="30" id="testText" text="{testIncrementer}"/>
</mx:Application>


----- Original Message ----
From: ben.clinkinbeard <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, January 15, 2007 2:21:33 PM
Subject: [flexcoders] Re: New To Flex -- Autoincrement a variable?

addEventListener( Event.ENTER_ FRAME, myFunc);

HTH,
Ben

--- In [EMAIL PROTECTED] ups.com, David Steele <[EMAIL PROTECTED]> wrote:
>
> This is very easy to do in earlier versions of AS but I can't see
how to do it in Flex.
> 
> I want to autoincrement a variable and display it in a textbox. In
earlier versions of AS I'd just put an onEnterFrame and increment a
variable.
> 
> 
> Can anyone tell me how to do this??
> 
> Thanks,
> 
> David
> 
> 
> 
>
____________ _________ _________ _________ _________ _________ _
> Bored stiff? Loosen up... 
> Download and play hundreds of games for free on Yahoo! Games.
> http://games. yahoo.com/ games/front
>





 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

Reply via email to