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

  • Home
  • SEARCH
  • 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 6045805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:09:56+00:00 2026-05-23T07:09:56+00:00

I’m creating an iPhone app in Flash, and I’ve run into performance problems. I’ve

  • 0

I’m creating an iPhone app in Flash, and I’ve run into performance problems. I’ve stripped the entire thing down to a simple example (below). It draws a box to the screen, and uses TouchEvent to track finger gestures. Here’s the problem: it is extremely sluggish on the iPhone 3G I am testing on. The box stutters up and down the page.

GPU mode is enabled in the application.xml, and when I set the -renderingdiagnostics flag, the text turns blue (meaning it is being rendered each time, which is correct), but the square stays white. It doesn’t turn any of the three colors of diagnostics mode. Here is a screen of that:

http://whit.info/dev/flashapp/screen.jpg

And here is a video of the sluggishness:

http://vimeo.com/25160240

So, given that this is only one cached sprite moving vertically, am I missing something about enabling the GPU or bitmap caching? Or is this as good as it gets on this hardware? Other apps seem to glide brilliantly.

Can anyone assist?

Many thanks!

-Whit

package {

import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;

[SWF(width='320', height='480', backgroundColor='#BACC00', frameRate='60')]

public class Main extends MovieClip{
    private var square:Sprite;  
    private var txt:TextField;  
    private var startDragY:Number;
    private var startObjY:Number;

    public function Main(){
        Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;

        stage.addEventListener(TouchEvent.TOUCH_BEGIN, beginhandler); 
        stage.addEventListener(TouchEvent.TOUCH_MOVE, movehandler); 
        stage.addEventListener(TouchEvent.TOUCH_END, endhandler);

        drawBox(0xffffff);
        makeOutput();
    }

    private function beginhandler(evt:TouchEvent): void { 
        startDragY = evt.stageY;
        startObjY = square.y;
    }

    private function movehandler(evt:TouchEvent): void { 
        out(String(evt.stageY));
        square.y = startObjY - (startDragY - evt.stageY); 
    }

    private function drawBox(fill:Number):void {
        square = new Sprite();

        square.graphics.beginFill(fill);
        square.graphics.drawRect(20,60,40,40);
        square.graphics.endFill();

        stage.addChild(square);
        square.cacheAsBitmap = true;
    }

    private function makeOutput():void {
        txt = new TextField();
        stage.addChild(txt);
        txt.selectable = false; 
        txt.autoSize = TextFieldAutoSize.CENTER;
        txt.defaultTextFormat = new TextFormat("Arial", 22, 0x000000);
        txt.text = "Touch Screen";
        txt.x = stage.stageWidth/2 - txt.width/2;
        txt.y = stage.stageHeight/2 - txt.height/2;
    }

    private function out(str:String):void {
        txt.text = str;
    }
}
}

Also, here are the commands I’m using to compile:

.amxmlc ~/Files/Code/iOS/MyApp/Main.as

.pfi -package -renderingdiagnostics -target ipa-test -provisioning-profile MyApp.mobileprovision -storetype pkcs12 -keystore Certificates.p12 -storepass MyPass MyApp.ipa application.xml Main.swf Default.png icons
  • 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-23T07:09:57+00:00Added an answer on May 23, 2026 at 7:09 am

    Latest Adobe updates are meant for the devices.

    Our team was also facing the same problem and kinda solved the problem by updating the products.

    We updated to:

    Flash professional CS5.5 
    AIR 2.7 
    

    and the performance difference is noticeable.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
Does anyone know how can I replace this 2 symbol below from the string

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.