A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Array for loop not running

  1. #1
    Senior Member
    Join Date
    Nov 2004
    Location
    I'm a brumie, currently in London working for the man
    Posts
    147

    Array for loop not running

    for some strange reason i can't get my for loop to run.. wondered if any of u guys had any ideas.

    Andy.

    Code:
    function addString() {
    	trace ("add string run");
    	// create arrays to store data
    	_global.elementA = [];
    	_global.elementB = [];
    	// run a for loop that continues until the maximum number has been reached
    	for (var i = 0; i<_stringLength; i++) {
    		_global.elementA[i] = cluesReceived.elementA[i]
    		_global.elementB[i] = cluesReceived.elementB[i]
    		
    	}
    }

  2. #2
    Senior Member braxius's Avatar
    Join Date
    Jul 2005
    Location
    Lithuania
    Posts
    126
    remove var before i and make sure that _stringLenght is defined

  3. #3
    Senior Member
    Join Date
    Nov 2004
    Location
    I'm a brumie, currently in London working for the man
    Posts
    147

    Thanks

    Thankyou for that most helpful..

    btw you wouldn't know how to make time responsive functions..

    say element a = the time the function should be called and element b is the data called for that hour.

    Was looking at doing it at set interval, to refresh the php, every hour and writing if statements in the PHP to just produce the write date,

    just wondering if there was a quicker way to do it in flash..

    Andy.

  4. #4
    Senior Member braxius's Avatar
    Join Date
    Jul 2005
    Location
    Lithuania
    Posts
    126
    check setInterval function in flash help

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