Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / August 2008



Tip: Looking for answers? Try searching our database.

flash player stuttering

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
21n9 - 14 Aug 2008 13:36 GMT
Hi everyone

I?ve got a problem with a game I?m developing when I test the game the player
seems to stutter at certain points I?m using Flash CS3 with flash player 9.
actionscript 2.0
The problem is obviously more prevalent when played back in the browser but
its still in evidence when run through flash itself to a lesser degree. when I
scroll a image on screen the movement seems to freeze for a split second when
its halfway on screen.

The problem even occurs when there?s not much going on, on screen. With my
logo screen for example once my logo appears the only movement on screen is the
dot on the (i) which is a 20*20 png image rising and falling, this movement is
controlled by actionscript in an onenterframe when I scroll over a simple and
small button on the logo screen the stutter reappears.

Is this a problem with flash player 9 under Vista or is there a project
setting I?m missing. I never had any problems with Flash 8 under XP so I don?t
think its my code technique although I?m not sure? and my game runs smoothly on
a friends slower XP laptop.

Any help and advice greatly appreciated its driving me nuts I cant smooth out
the control and gameplay until I resolve the problem
Shan-Dysigns - 14 Aug 2008 17:45 GMT
Can you provide an example? Do you have more than one onEnterFrame running at a time? It's hard to help without actually seeing what's going on.
21n9 - 15 Aug 2008 02:21 GMT
Hi thanks for replying much appreciated

Here?s a link to my game on my website
http://www.quick2play.com/games/react/play.html
My laptop is a 1.9ghz HP laptop running windows vista with 2gig of ram Flash
player version 9,0,124,0
Id be interested to hear if you have any  issues with playback speed on your
computer.
 
Im only using one onenterframe here?s a snippet from the logo screen all the
code is in the first frame of the main timeline.

stop();

 
var lang:Number = 1;

var L_SLIDEON:Number = 1;
var L_LOADING:Number = 2;
var L_SLIDEONLANG:Number = 3;
var L_READY:Number = 4;
var L_SLIDEOFF:Number = 5;

var L_MODE:Number = L_SLIDEON;
 

var L_dottop:Number = 31;
var L_dotease:Number = 37;
var L_dotbot:Number = 67;
var L_dotmoverate:Number = 6;
var L_ballpaused:Number = 0;
var L_dotup:Boolean = true;

var L_startx:Number = 340;
var L_finishx:Number = 0;
var L_speed:Number = 8;
var L_moverate:Number = (L_startx - L_finishx) / L_speed;

L_logo._x = L_startx;
L_logo._alpha = 0;

var globalSound = new Sound();
globalSound.setVolume(21);

var wiz:Sound = new Sound(this);
wiz.attachSound("wiz");
var langselect:Sound = new Sound(this);
langselect.attachSound("langselect");
var langrollover:Sound = new Sound(this);
langrollover.attachSound("langrollover");

L_progressbar._visible = false;
wiz.start();

var version = System.capabilities.version;
var firstSpace = version.indexOf(" ");
var tempString = version.substring(firstSpace + 1, version.length);
var tempArray = tempString.split(",");

var majorversion = parseInt(tempArray[0]);
if(majorversion < 7)
{this._xscale = 99.98;
 this._yscale = 99.98;   }
 
 
 
 
 function L_slideon():Boolean
{
 if(L_logo._alpha < 100)
{L_logo._alpha += 10;    }
 if(L_logo._x > L_finishx)
{L_logo._x-= L_moverate;    }
 if(L_logo._x <= L_finishx && L_logo._alpha >= 100)
{return true;    }
 else
{return false;           }}

 function L_load():Boolean
{if(_root.getBytesLoaded() < _root.getBytesTotal())
{L_progressbar._visible = true;
 var percent:Number = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
 var framenum:Number = Math.floor((8 / 100) * percent);
 if(framenum <= 8)
{L_progressbar.gotoAndStop(framenum);      }
 return false;      }

 else
{L_progressbar._visible = false;
 return true;    }}

function L_slideonlanguage():Boolean
{if(uk_btn._x > 76)
{uk_btn._x -= 50;     }
 else if(french_btn._x > 136)
{french_btn._x -= 50;   }
 else if(german_btn._x > 196)
{german_btn._x -= 50;   }
 else if(italy_btn._x > 256)
{italy_btn._x -= 50;   }
  else if(spain_btn._x > 316)
{spain_btn._x -= 50;   }
  else if(portugeuse_btn._x > 376)
{portugeuse_btn._x -= 50;   }
 else
{return true;     }

 return false;      }

 function L_slideoff():Boolean
{
 
 uk_btn._y += 20;
 french_btn._y += 20;
 german_btn._y += 20;
 italy_btn._y += 20;
 spain_btn._y += 20;
 portugeuse_btn._y += 20;
 
 if(L_logo._alpha > 0)
{L_logo._alpha-= 20;     }
 if(L_logo._x > -320)
{L_logo._x-= L_moverate;        }
 if(L_logo._x <= -320 && L_logo._alpha <= 0)
{return true;     }
 else
{return false;    }}

 function onEnterFrame()
{
    if(L_MODE == L_SLIDEON)
   {if(L_slideon())
   {L_MODE = L_LOADING;     }}
   
    else if(L_MODE == L_LOADING)
   {if(L_load())
   {L_MODE = L_SLIDEONLANG;     }}
   
    else if(L_MODE == L_SLIDEONLANG)
   {if(L_slideonlanguage())
   {L_MODE = L_READY;     }}
   
    else if(L_MODE == L_READY)
   {}
   
    else if(L_MODE == L_SLIDEOFF)
   {if(L_slideoff())
   {delete this.onEnterFrame;
    gotoAndStop("global_init");     }}
   

 if(L_ballpaused == 0)
{if(!L_dotup)
{if(L_logo.logodot_mc._y > L_dotease)
{L_logo.logodot_mc._y = L_logo.logodot_mc._y + L_dotmoverate;  }
 else
{L_logo.logodot_mc._y = L_logo.logodot_mc._y + (L_dotmoverate / 2); }}

 else if(L_dotup)
{if(L_logo.logodot_mc._y > L_dotease)
{L_logo.logodot_mc._y = L_logo.logodot_mc._y - L_dotmoverate;  }
 else
{L_logo.logodot_mc._y = L_logo.logodot_mc._y - (L_dotmoverate / 2); }}}

 if(L_logo.logodot_mc._y <= L_dottop)
{L_dotup = false;               }
 else if(L_logo.logodot_mc._y >= L_dotbot)
{L_dotup = true;
 L_ballpaused++;                  }

 if(L_ballpaused == 18)
{L_ballpaused = 0;                          }}
21n9 - 15 Aug 2008 02:33 GMT
sorry this code is also on the first frame of the main timeline

french_btn.gotoAndStop(2);
german_btn.gotoAndStop(3);
italy_btn.gotoAndStop(4);
spain_btn.gotoAndStop(5);
portugeuse_btn.gotoAndStop(6);

also this code is attatched to the language button

function onRollOver()
{if(_parent.L_MODE == _parent.L_READY)
{_y = 310;
 _parent.langrollover.start();}}

 
function onRollOut()
{if(_parent.L_MODE == _parent.L_READY)
{_y = 315;}}

function onPress()
{if(_parent.L_MODE == _parent.L_READY)
{_parent.langselect.start();     }}

function onReleaseOutside()
{if(_parent.L_MODE == _parent.L_READY)
{_y = 315;}}

function onRelease()
{if(_parent.L_MODE == _parent.L_READY)
{_parent.lang = _currentframe;
 _parent.L_MODE = _parent.L_SLIDEOFF;
 _parent.wiz.start();}}
Shan-Dysigns - 15 Aug 2008 04:06 GMT
Nice graphics. I played the game for a while at all three levels, and the only
thing I noticed was the bubbles jumped once, and it was a very little jump.
Other than that, as long as the animation played, I didn't notice anything
distracting like you mentioned. What browser are you using? Have you asked
others (not counting your friend with the laptop) to test the website? Find out
what browsers they are on. Doing all this testing outside of your computer can
help you troubleshoot better. It could be on your side only.
21n9 - 15 Aug 2008 21:34 GMT
Hi
I?m glad you like it :) I?ve tested it on several of my friends pc's and no
problems, apart from one but that was a very old laptop, and it was general
slow down not the jumping I?ve experienced.

I?m using IE7 but the problem even occurs when I test from within Flash,
control, testmovie. although to a slightly lesser extent.
is there anyway to speed up flash maybe allocate more memory to the program or
something like that, which might cure the problem?

Im currently doing a overhaul of the game adding mouse control ect and its
proving difficult to smooth out the controls with the problem I have

Thanks again
Shan-Dysigns - 15 Aug 2008 23:21 GMT
If no one else is experiencing the same problem, it has to be on your computer.
Watch your cpu usage when you run test the flash file. If your cpu pegs high
while testing the flash file, maybe you have too many "checks and balances"
running at the same time - meaning maybe you have redundant action script
trying to execute the same thing at the same time. Maybe try creating a new
flash document and copy/paste segments of your code and symbols to that
document and see where (on your computer) the trouble begins. I'm afraid it's
just going to be a matter of trial error to find out what your issue is since
no one else experiences it.
21n9 - 16 Aug 2008 00:51 GMT
My cpu usage never goes above 22% when I open the React swf I tried
transferring just the logoscreen to a new blank project and the problems still
there :(

I?m using cs3 web premium upgrade edition and studio 8 is still on my system I
just tried uninstalling flash 8 but now my FLA icons have been replaced by
blank ones and the file associations for fla's and swf's have disappeared. and
it hasn?t made any difference  to the problem.

 I did notice on my travels that the flash 8 video encoder is still in the
macromedia folder I don?t suppose that could have anything to do with it ???
Shandy Elliott - 16 Aug 2008 04:16 GMT
I know when you install CS3, you MUST have any other version of CS uninstalled
(especially when it comes to the Adobe Suite of programs). I don't think this
is the case for versions lower than CS1, but I think it's a good idea to
uninstall everything below any of the CS Suites. I mean, you are talking 3+
versions back, so no need (and no advantage) of having Flash (or Studio) 8 on
your computer. I doubt that has anything to do with this issue, but you never
know. So, you transferred your logo to a new document and still had the
jitters? I don't know how comfortable you may feel about sharing a fla file,
but maybe I could look at it to see if it does it on my machine and/or if I see
any code that could be causing this. If not, you can still comment out certain
parts of the code at a time.
21n9 - 18 Aug 2008 02:39 GMT
Hi
Thanks for the offer to have a look at my fla much appreciated but like you
say, its more than likely a problem isolated to my computer, either something
to do with vista or some kind of conflict with the software HP has seen fit to
stick on it :(.

Studio 8 is Flash 8 so its only one version back but I was unsure as to
whether you had to have the previous version installed or you could just
install CS3 and stick in the old product code, so next time I give my PC a
spring clean I'll just install CS3 on its own, it will certainly eliminate any
potential conflicts.

Thanks for all your time and help I very much appreciate it :)
fishinear@hotmail.com - 31 Aug 2008 17:34 GMT
> Hi
>  Thanks for the offer to have a look at my fla much appreciated but like you
[quoted text clipped - 9 lines]
>
>  Thanks for all your time and help I very much appreciate it :)

Actually, I experience the same problem, and not only with your game
(cool graphics, by the way). Try for example the following games:

http://www.pepere.org/flash-development_1_3x/flash-game-ringmania_u_42.html
(Ringmania)
http://www.neave.com/games/hexxagon/    (Hexxagon)

The problem as I experience it, is this: After a sound effect has
finished playing, the game is frozen for a short time. Even with the
built-in speaker, the freezing is noticable (about 100ms), but with my
USB speaker the freeze is totally annoying - about one second.
Strangely enough, when music is playing in the background, the sound
effects do not cause a freeze (try out Ringmania for an example). I
have have been trying to find somebody with the same problem, so I was
happy when I saw your post ;)

I do not think it is a problem in your code, but more a problem with
the combination Flash Player 9 and Windows Vista. I have it in both IE
and Firefox, so it is not browser specific. I have been trying to find
a way to report this problem to Adobe, but have not been able to.
Maybe you as developer have a way to report problems?

I am running an HP Pavillion DV9000 laptop, with Windows Vista and
Flash Player 9 something, not sure which version (how do I find that
out?)
fishinear@hotmail.com - 31 Aug 2008 19:02 GMT
On Aug 31, 6:34 pm, fishin...@hotmail.com wrote:

> > Hi
> >  Thanks for the offer to have a look at my fla much appreciated but like you
[quoted text clipped - 34 lines]
> Flash Player 9 something, not sure which version (how do I find that
> out?)

Just tried it on my work laptop as well - an HP nc2400, and I have a
similar problem there. That computer runs Windows 2000, so it is not
entirely Windows Vista related. In both cases, I am using Flash Player
9
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.