PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
really noob question.. incrementing variables each frame
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: really noob question.. incrementing variables each frame

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    5

    really noob question.. incrementing variables each frame

    Code:
    function ZoomTo(xx,yy) {
    	
    	zoomMap = 1;
    	ZoomToX = xx;
    	ZoomToY = yy;
    	
    }
    
    
    if (zoomMap==1) { // do this}
    I call a function to change zoomMap to 1 but I want to check every frame using the IF statement so it increments another variable but it only runs this code once and not every frame. How can I check zoomMap every frame?

  2. #2
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    What about something like,
    Actionscript Code:
    if(zoomMap == _currentframe) {
        // do this
    }
    Wile E. Coyote - "Clear as mud?"

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    5
    im not sure i understand how that works?

    I have an action script in my movieclip that only has one frame in the timeline. I want to be able to check the variable every step and if 1 then do something.

  4. #4
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Sorry, I misunderstood. Having some difficulties in trying to figure out what you're asking. You have a mc that is 1 frame and you want to check the variable "zoomMap"s value every frame?
    Last edited by Robb@exo; 03-17-2010 at 01:14 AM.
    Wile E. Coyote - "Clear as mud?"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center