Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 468757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:42:50+00:00 2026-05-12T23:42:50+00:00

I have created a Paralax effect in Flash 10 where I have about 5

  • 0

I have created a Paralax effect in Flash 10 where I have about 5 layers each sitting on a different Z-axis. These 5 layers have been grouped in a symbol, so when moving the symbol around its x and y axis, the layers move in 3D perspective as expected.

We need to dynamically render text on each layer, but the problem is, I am using addChild() to add textFields to these layers to display text, and this is causing the framerate to slow down drastically, to about 12 fps.

I tried a different approach, whereby I took a bitmap snapshot of the each layer, remove all the children (textfields) and add the bitmap onto the layer instead, hoping for an improvement in framerate…but to no avail.

How could I get more performance out of this? Would it be better to use something like PixelBender (that is if I can dynamically render text in PixelBender), or would using a 3D engine like Away3D or Papervision help here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:42:51+00:00Added an answer on May 12, 2026 at 11:42 pm

    Rendering text in pixelbender would be completely crazy. There is a much easier way.

    Don’t use the z axis, instead do the parallax yourself, as long as the clips are not transformed, but only translated flash can cache them and everything will be nice and fast.

    What I’d do is add them to an array and then update all of the positions each frame. To conveniently have them in an array I’d make a small class to associate the offset to each sprite:

    class Parallax
    {
        public var sprite:DisplayObject;
        public var offset:Number = 1;
    
        public function ParallaxedSprite(sprite:DisplayObject, offset:Number) {
            this.sprite = sprite;
            this.offset = offset;
        }
    
    }
    

    Once that class is made we add each of the clips/sprites we want to parallax to an array:

    var _sprites:Array = [  new ParallaxedSprite(foo, 1), 
                            new ParallaxedSprite(bar, .75), 
                            new ParallaxedSprite(baz, .5) ];
    

    (the square brackets are shorthand for creating an array)

    Then, each frame we loop over the list and set the offsets accordingly:

    var offsetX:Number = 100;
    var offsetY:Number = 100;
    
    for each (var parallax:Parallax in _sprites) {
        parallax.sprite.x = offsetX * parallax.offset;
        parallax.sprite.y = offsetY * parallax.offset;
    }
    

    And finally, to get that last speed boost, set the cacheAsBitmap property on your sprites:

    foo.cacheAsBitmap = true;
    bar.cacheAsBitmap = true;
    baz.cacheAsBitmap = true;
    

    Note that cacheAsBitmap will speed up the drawing of your sprites as long as they are not transformed, but once you DO transform them with this set you will have an added overhead of recreating this cache, so if you plan to rotate/scale alot it’s better to leave it off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a module in Magento which takes certain views from customers about
I have created a few small flash widgets that stream .mp3 audio from an
I have created the following C library for reading an image: typedef struct {
I have created a skin for DotNetNuke 5.x and I attempted to do as
I have created a basic site using ASP.NET routing according to Mike Ormond's example
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and
I have created a file with XmlDocument xmldoc = new XmlDocument(); Can I make
i have created a simple public ref class in the vc++ project, which is
I have created one table using the below command: create table Table1( Id int
I have created an MS Access 2003 application, set up as a split front-end/back-end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.