Jump to content
Search Community

BlitMask Stuttering on scrollX - Simple Panorama Viewer

themitchnz test
Moderator Tag

Recommended Posts

Hi,

 

I am having issues with random stuttering while scrolling an image.

 

I am creating a simple panorama image viewer, The image is loaded in via LoaderMax as well as settings related to scrollSpeed wrapEnabled etc..

 

Basically I load in the image, add it to a movieClip and then add the MovieClip to a BlitMask and then tween the scrollX value of the blitMask.

 

Once I set the fps to 60 the tween is nice and smooth 90% of the time but every now and again it stutters for 2-5secs then goes fine again.

 

I am using a few images I found on google images as test cases, and none are extremely large (around 1500x500px).

 

I have created a very simple example that recreates the stuttering. Just hold the mouse down to scroll. It happens every 10 secs or so.

 

Here is a link to the fla, it is in Google Drive which tries to open the file, but gives a download link once that fails. (the attach option in the post topic wouldn't accept it?)

 

https://docs.google.com/open?id=0B4XU51X_f9wCT0d0aFhIY0V3akE

 

I'm hoping I am just doing something wrong rather than it being something outside my control e.g. Garbage Collection.

 

I should note, that it has to run on Flash Player 9,

 

Thanks!

Link to comment
Share on other sites

I wasn't able to reproduce any major stuttering, although I did see [what I'd consider normal] minor hiccups that are almost surely due to the Flash Player's garbage collection routine. Unfortunately it's not realistic to expect there to be perfectly fluid movement when pushing around all these pixels. As far as I can tell, it has nothing to do with BlitMask specifically - it's just the nature of the Flash Player (JavaScript has the same problem, but even more noticeable).

 

You might want to set mouseEnabled to false for the BlitMask and the target object ("pano" in your case) just so that MOUSE_MOVE events aren't created and dispatched while the movement is happening, although I doubt that will deliver a huge performance gain by any means. Just a little optimization. Your fps counter code is also very unoptimized but it probably isn't causing major issues.

 

If you think there's a problem with BlitMask specifically, we'd be happy to look at any evidence that points in that direction.

 

I really wish we had a super easy solution for you. Like I said, I couldn't get any major stuttering on my machine with your file.

Link to comment
Share on other sites

  • 3 weeks later...

Hi, Smit. Welcome to the GreenSock forums,

 

There is quite a bit of logic and functionality that would have to be added to that tutorial. We really have to focus our support on the the core GreenSock tools and functionality specific to them.

 

In a general sense, you will need to generate and store the ending values for each reel.

After that you need to compare all three values and see if they are the same.

 

something like

 

if(reel1Num == 7 && reel2Num == 7 && reel3Num == 7){
trace("you won");
}

 

You may want to start by researching some tutorials that have nothing to do with BlitMask, but focus more on slot-machine logic.

 

Wish I had something more up my sleeve for you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...