A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash player in browser slow

  1. #1
    Senior Member nubz's Avatar
    Join Date
    Jun 2001
    Posts
    173

    Question Flash player in browser slow

    Hi

    Hopefully someone can let me know what's going on here.

    I have a small snowball throwing game I am making, I use setInterval to control all motion - when I preview from Flash in the local player it throws like a bullet when I opt for highest velocity and nice'n'slow when i opt for lowest - when I look at the same 9kb movie in Firefox or IE7 FP9 it is extreeeemely slow and sluggish - anything I should know??

    ali

    site check spec: ADSL (UK), PC P4 3Ghz, 1024MB RAM, Res: 1440 X 900, Player: Flash 9, WinXP Home, Firefox 2
    dev spec: Flash 8 Pro, Flash MX 2004, Flash MX

  2. #2
    Senior Member nubz's Avatar
    Join Date
    Jun 2001
    Posts
    173
    anyone?

    it's driving me nuts - I really don't want to use onEnterFrame() - it's not even like I am running simultaneous setIntervals they are all running on their own one at a time - e.g. (simplified a bit but the set interval is within another function called after each throw)

    Code:
    function rotateArm()
    {
    	if(armDir=="right"){
    		if(_root.arm._rotation<30){
    			
    			_root.arm._rotation+=1;
    		} else {
    			armDir="left";
    		}
    	} else {
    		if(_root.arm._rotation>-30){
    			_root.arm._rotation-=1;
    		} else {
    			armDir="right";
    		}
    	}
    	updateAfterEvent();
    	
    }
    
    sideways=setInterval(rotateArm,4);

    site check spec: ADSL (UK), PC P4 3Ghz, 1024MB RAM, Res: 1440 X 900, Player: Flash 9, WinXP Home, Firefox 2
    dev spec: Flash 8 Pro, Flash MX 2004, Flash MX

  3. #3
    Senior Member nubz's Avatar
    Join Date
    Jun 2001
    Posts
    173
    as usual with these things the fault was in my code - updateAfterEvent() was not being called within every interval based method......

    site check spec: ADSL (UK), PC P4 3Ghz, 1024MB RAM, Res: 1440 X 900, Player: Flash 9, WinXP Home, Firefox 2
    dev spec: Flash 8 Pro, Flash MX 2004, Flash MX

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