Very Slow / Lag When Screen Moves...

Hi Guys,
I’m really a newbie when it comes to AS3 – so really a total newbie when it comes to using it to develop iPhone games/apps, but I have used AS2 for years now
I’ve been trying to do a simple test – Just use mouse events to move a screen around depending on what is pressed. No Characters/hittests/etc.
What I have created works great on my pc – very smooth, and even on the iphone, the controls work as expected – but the problem is how SLOW everything is running. Pressing the "UP" arrow - makes the screen move, but very SLOW and Jumpy.
I have tried using onkeyframe and using a timer – but both are very slow.
Typically when I made games in AS2 – the “level” would just be a single BIG movieclip – as shown in “Example A” – but this was very slow on the iphone, so I tried a tile based approach (“Example B”), which reuses the same movieclips, it just moves them and renames them – trying to cut memory usage down, only loading what is needed - but  still its slow. The total size of the "level" is only about 3x bigger than the iphone visible screen.
I have made sure all variables are done correctly: var thisVar:int = 10; etc and have enabled cache as bitmap. I have replaced all vector graphics with jpegs, and followed the guide on how to optimize code for iphone development – but nothing seems to work, everything just lags as the screen moves/updates – but everything works great on my pc.
Can someone please explain what I am doing wrong? Is there a way to cache the whole map before the game loads? Which is the correct way to make an iphone game where the level is bigger than the default screen - tile based or a large level graphic.
Thanks so much for any help! I’ve been trying to get this simple test working for 3 days now – but documentation is limited at the moment.
Cheers!

This should be better:
the function addPage() is what I used to test Bitmaps
import flash.display.Shape;
import flash.display.Sprite;;
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var currentGalleryItem:Number = 1;
var totalGalleryItems:Number = 4;
var slideCounter:Number = 0;
var gallery_items:Sprite = new Sprite();
addChild(gallery_items);
addPages();
stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
// create pages
function addPages():void
addShape(0, 0, 0xff0000);
addShape(768, 0, 0x00ff00);
addShape(1536, 0, 0x0000ff);
function addPage(xPos:Number, yPos:Number):void
var p:Bitmap = new Bitmap(new bookPage());
p.x = xPos;
p.y = yPos;
gallery_items.addChild(p);
function addShape(xPos:Number, yPos:Number, col:uint):void
var s:Shape = new Shape();
s.graphics.beginFill(col);
s.graphics.drawRect(xPos, yPos, 768, 1028);
s.graphics.endFill();
gallery_items.addChild(s);
function fl_SwipeToGoToNextPreviousFrame(event:TransformGestureEvent):void
if(event.offsetX == 1)
if(currentGalleryItem > 1){
currentGalleryItem--;
slideRight();
else if(event.offsetX == -1)
if(currentGalleryItem < totalGalleryItems){
currentGalleryItem++;
slideLeft();
function slideLeft(){
gallery_items.addEventListener("enterFrame", moveGalleryLeft);
function slideRight(){
gallery_items.addEventListener("enterFrame", moveGalleryRight);
function moveGalleryLeft(evt:Event){
gallery_items.x -= 76.8;
slideCounter++;
if(slideCounter == 10){
gallery_items.removeEventListener("enterFrame", moveGalleryLeft);
slideCounter = 0;
function moveGalleryRight(evt:Event){
gallery_items.x += 76.8;
slideCounter++;
if(slideCounter == 10){
gallery_items.removeEventListener("enterFrame", moveGalleryRight);
slideCounter = 0;

Similar Messages

  • Does anyone has a problem with the screen of the new ipad? (there's a part of the screen which the color in it is "very" bright) and when I move the aluminium part of the smart cover when it's attached to the ipad the colors change!! Help!!!

    Does anyone has a problem with the screen of the new ipad? (there's a part of the screen which the color in it is "very" bright) and when I move the aluminium part of the smart cover when it's attached to the ipad the colors change!! Help!!!

    I'd take it into my local APple store and have them look at it. There may be something wrong inside your device.

  • Graphic card problem maybe? Since when I have changed the hard drive to my macbook pro and I installed all the new softwares, my mac is very slow and the screen gives crazy pictures,could maybe be the graphic card, does anybody have experienced this?

    Graphic card problem maybe? Since when I have changed the hard drive to my macbook pro and I installed all the new softwares, my mac is very slow and the screen gives crazy pictures,could maybe be the graphic card, does anybody have experienced this?

    after a restart it works for a time, but always slow. I went to the Applestore this afternoon and the made a check and said it would be the logicboard and they would have to change it for CHF 600 and it would be ready in 10 - 15 days

  • I am having a problem with my cs6 running very slow and when i save i am getting an error message that says, "This document is bigger than 2 gb (the file may not be read correctly by some TIFF viewers.) please help

    I am having a problem with my cs6 running very slow and when i save i am getting an error message that says, "This document is bigger than 2 gb (the file may not be read correctly by some TIFF viewers.) please help

    wen6275,
    It looks like you're actually using a camera or phone to take a photo of your monitor.
    That's not what is commonly known as a "screen shot". 
    It looks like you're on a Mac.  Hitting Command+Shift+3 places a capture of the contents of your entire monitor on your Desktop; hitting Command+Shift+4 will give you a cross-hairs cursor for you to select just the portion you want to capture.
    I'm mentioning this because I fear I'm not construing your original post correctly when you type "I am working with a large files [sic], currently it has 149 layers, all of which are high resolution photographs", so I'm wondering if there's some similar use of your own idiosyncratic nomenclature in your description of your troublesome file.
    Perhaps I'm just having a major senior moment myself, but I'm utterly unable to imagine such a file.  Would you mind elaborating?

  • Exchange 2013 CU5 , Exchange Power Shell very very very slow reasponse when using get command.

    Exchange 2013 CU5 , Exchange Power Shell very very very slow reasponse when using get command.
    First my organize has Exchange on 2 site like
    site A (internet facing) : 2CAS 2 MB all are Services pack1
    site B (DR Site , no user active on this site) : 2CAS 2MB all are Services pack 1
    so today I upgrade Exchange 2013 from SP1 to CU5 start on "site B" and I found this issue and the details is....
    When I open EMS on any CU5 for query something (like get-mailboxdatabasecopystatus) the response return very slow and some query will not return at all (like get-owavirtualdirectory).
    But If I using EMS on SP1. Everything is ok then I try to use EMS on SP1 connect to CU5 and try to query something. the result is
    some query command cannot return for any result that are server on siteB (just some query command)
    Problem
    EMS on CU5 return very slow result.
    EMS on SP1 still ok.
    Does anyone face this problem before for CU5??? Please help me figure this out. Thank you
    reply from Social.technet

    Hi,
    Have you used the above cmdlets to check your Exchange server health?
    "all other command that I ran on EMS didn't logged on event viewer.", my environment is the same with you. I use Exchange 2013, only errors will be displayed in MSExchange Management. Actually, it is not related to slow EMS response.
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Very slow responce when working with Office file on DFS-Share

    Very slow responce when working with Office file on DFS-Share
    We have implemented the following configuration
    Domain level Windows 2000. Two member servers with Windows Server 2008 R2, sharing the same DFS namespace with, at the moment, one folder target called Home.
    Users complaining that the access to different MS Office files is very slow. Even creating a new MS Word document using right click context menu takes up to 4 minutes to open. Saving, for example, one singe Excel sheet takes also few minutes.
    Tested with both, MS Office 2007 and MS Office 2010. Makes no difference. When using Office 2010 you can see the message like contacting:
    \\DomainName\Root\Home\UserName. Other files like TXT, JPG or PDF are not affected.
     What makes the thing really weird is the fact, that the behavior described above can absolutely change after client machine being rebooted, suddenly everything becomes very fast and this condition can revert back again just after the next
    reboot.
    Considerations until now:
    1. This has nothing to do with the file size. Even tiny files are affected.
    2. AD Sites are configured correctly and the client workstations see themselves in the correct sites.
    3. This is not an Office issue. If I map my folder target not as DFS, but directly as shared network drive
    \\ServerName\Root\Home\UserName , everything functions as expected
    What makes me suspicious: when using f.e. TCPView to monitor connections, I can see, that each time I make any operation on an office file, there will be a connection established to one of the domain controllers, sometimes to remote ones,
    located in other countries. But on the other side, even if the connection is established to the nearest DC, operations are still very very slow!
    Just forget to say. All clients are Windows 7
    Thanks to all who respond.

    Dear all,
    sorry for the delayed reply. The problem has been solved now and since September 19<sup>th</sup>. everything is functioning as expected.
    What was done:
    Deleted replication targets excepting the initial ones
    Carefully recreated folder targets
    Deleted and recreated  replication groups
    Disabled SNP features on both namespace servers
    Created EnableTCPA registry entry
    Checked that the following Updates are installed
    http://support.microsoft.com/kb/2688074
    http://support.microsoft.com/kb/2647452
    Concering Office File validation KB2553065 - This Update was already declined on our WSUS server
    Kind Regards
    Eduard

  • Very slow response when I click on a link, but almost instant response if I go back and click a second time.

    I often get very slow response when I click on a link, any link. But if I go back and click on the link again, then the page will open almost immediately. I discovered this by accident and noticed that this happens every time. It would be nice if I got fast response on the first click without having to do this silly procedure and it seems to me that there's a simple fix. I would appreciate it if you could help. I'm open to any and all ideas. Thanks again.
    Sincerely,
    Al
    Version 26.0 Firefox, Windows XP, sp/3

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Very slow start when initially entering the service ticket in Web UI (2007)

    We seem to encounter a very slow start when initially entering the service ticket in Web UI (2007). Once in all seems speedy enough. I don't have my access arrange for the Service marketplace (OSS notes) yet so can't check if there is a known solution, which I suspect there is. Has anyone encountered this problem and possibly resolved it?.
    Jason.

    Previous posts have highlighted the following notes:
    1048388 General Performance improvements of BSP transactions
    1162605 Network performance for CRM 2007 Webclient
    1162685 SAP CRM 2007 Webclient Performance
    821045 Poor performance of MIME objects in BSP pages
    581316 BSP Delta-Handling for CRM (BASIS 620 SP17)
    However, I was wondering whether anyone has come across any other small changes that may have a major effect. A quick-win I guess you call it. From bitter experience I know there are rarely quick wins when it comes to optimisation due to the amount of re-testing etc.
    But any further advice would be welcome.
    Jas.

  • My Photoshop CS3 goes very slow/choppy when I have a selection made.

    Hello,
    My Photoshop CS3 goes very slow/choppy when I have a selection made, with those little moving lines indicating the selection (the lines that look like walking ants). When I'm adding to the selection, it's fine again, because the "ants" aren't moving, same with when I hit Q to enter Quick Mask Mode--as long as the "ants" aren't moving, my Photoshop isn't slow. Is there any way to fix this? To either speed up Photoshop or to stop the "ants" from moving, and simply allow selections to be indicated by broken lines, but not moving broken lines?
    Thanks

    Operating System: Windows 7 Ultimate 32-bit (6.1, Build 7600) (7600.win7_rtm.090713-1255)
               Language: English (Regional Setting: English)
    System Manufacturer: Tyan Computer Corporation
           System Model: S2668 Tiger i7505              
                   BIOS: PhoenixBIOS 4.0 Release 6.0    
              Processor: Intel(R) Xeon(TM) CPU 3.06GHz (4 CPUs), ~3.1GHz
                 Memory: 4096MB RAM
    Available OS Memory: 3072MB RAM
              Page File: 2548MB used, 3589MB available
    49.9 GB of 465 GB free.

  • 've never used a Mac before, recently i purchased a MBP13" which came loaded with LION OS by default. I upgraded the OS to OS10.7.2 when prompted. Now after the upgrade, my MBP feels very slow - specially when typing emails !! What is the solution ??

    I've never used a Mac before, recently i purchased a MBP13" which came loaded with LION OS by default. I upgraded the OS to OS10.7.2 when prompted. Now after the upgrade, my MBP feels very slow - specially when typing emails !! What is the solution ??

    After an update or installation, your MBP may take some time to index its files. Give it some time - but if you don't see any improvement, post here - you'll get an answer!

  • InDesign CC 2014 very slow performance when dragging images and changing text

    InDesign CC 2014 very slow performance when dragging images and changing text.
    Running on 2010 Macpro 2.4GHz. 8GB RAM. Any solutions? I've read through many forums on this and tried several fixes.

    Have exact same issue on  my Windows 7 machine. Resetting preferences is a workaround.
    So I start InDesign whilst holding down these keys.
    Ctrl + Alt + Shift (Windows) or Cmd + Ctrl + Opt + Shift (Mac)
    Whilst inDesign is usable again with this fix- I have to do it every time so it trashes all my preferences so NOT GOOD long term fix. Otherwise InDesign freezes and can only be stopped by forcing a quit.
    I have manually deleted the preference files and I have created a brand new admin account - but still no luck - will be onto support tomorrow

  • VERY Slow Respons When Changing Songs on iPod

    My work computer is a Windows Vista machine, with Vista, SP 2 installed. I installed iTunes 8.2.0.23 this morning, upgrading from version 8.1.1.10. The new version works well when I play songs stored to the library on my hard drive, but I find that it has a VERY slow response when changing songs that I play from my iPod Touch. At one point, it took 17 seconds to change to the next song in the iPod's library. It changes instantaneously when I play songs from the library stored on my HDD. The iPod Software is version 2.2.1.
    Can someone please offer insight?
    Is there a way to download and install iTunes 8.1.1.10? I had no problems with that version.

    Hi Ajrobin,
    Welcome to Apple Discussions
    [deleted because misread original post]
    Jon
    [btabz...funny...wait never... ;)]
    Mac Mini 1.42Ghz, iPod (All), Airport (Origional & Express), G4 1.33Ghz iBook, G4 iMac 1Ghz, G3 500Mhz, iBook iMac 233Mhz, eMate, Power Mac 5400 LC, PowerBook 540c, Macintosh 128K, Apple //e, Apple //, and some more...  Mac OS X (10.4.5) Moto Razr, iLife '06, SmartDisk 160Gb, Apple BT Mouse, Sight..
    Message was edited by: ~JB~

  • Iphone 4 running very slow lagging

    hello..my iphone 4 is running very slow..when i slide to unlock my phone it's take around 1 minute to unlock it..then if it hang too long then it will respiring.. i already restore its by using itunes but it same..the problem not solved yet..can someone help me?

    Maybe a short term solution
    http://www.mactalk.com.au/31/104826-iphone-4-running-slow-ios-5-a-2.html
    Hope this helps.

  • Sketchbook Express Lag When Screen Recording

    I am having a problem with Sketchbook Express Lag When Screen Recording.
    I have successfully used Pencil and Quicktime to make a screen recording but whenever I try to use SBE the cursor won't keep up with my Wacom Tablet.
    Anyone else having issues of this nature and if so does anyone have a solution?
    Thanks
    Chris

    Hi Chris,
    Did you ever solve the problem?
    Best regards,
    Jon Jordal

  • My firefox is running very slow, espically when I am typing, scrolling and in many simple activities. On the other hand my internet explorer is going normally like simple browser.

    My firefox is running very slow, espically when I am typing, scrolling and in many simple activities. On the other hand my internet explorer is going normally like simple browser.

    Hi,
    Please try disabling all the features under '''Browsing''' in '''Tools '''('''Alt''' + '''T''') > '''Options '''> '''Advanced '''> '''General'''. You can later toggle the values to find an optimum solution. Please also [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u see this.]
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://support.mozilla.com/en-US/kb/Page%20Info%20window Page Info] Tools (Alt + T) > Page Info, Right-click > View Page Info
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [https://support.mozilla.com/en-US/kb/Viewing%20video%20in%20Firefox%20without%20a%20plugin Viewing Video without Plugins]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://developer.mozilla.org/en/Command_Line_Options#Browser Firefox Commands]
    [https://support.mozilla.com/en-US/kb/Basic%20Troubleshooting Basic Troubleshooting]
    [https://support.mozilla.com/en-US/kb/common-questions-after-upgrading-firefox-36 After Upgrading]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins Troubleshooting Plugins]
    [http://kb.mozillazine.org/Testing_plugins Testing Plugins]

Maybe you are looking for

  • Unable to fetch Peformance Report in SCOM

    Hi, I am unable to fetch the Performance reports for certain servers from 5th of this month. Tried troubleshooting the agent issue by clearing cache,bouncing health state folder and reinstalling the agents. But still the reports cant be fetched. The

  • HP Officejet Pro 8600 Plus e-All-In-One-Printer

    Can I still download and install this software on my desktop with Windows XP?

  • How to use variables, get results in a grid, without the Binds dialog.

    Hi all, I have recently embarked on the Oracle path, however am quite a seasoned MS SQL Server enthusiast. I would like to be able to use inline variables within my SQL Worksheet adhoc queries without having to bother with the BIND Popup window. I no

  • Unable to view Object Gallery when clicked File - New Menu. why?

    Hi, I am using JDeveloper( ver 3.2.3 build 1018) on Windows 2000 recently installed and i access using Novell Netware. After I create a new workspace and a new empty project, I try to click on File - New ... to see the object gallery. But i am unable

  • Problem to draw rectangle in Card LayOut.

    This is my code..i can't display the rectangle in card lay out...pls help me! JPanel cards; final static String WELCOME = "Welcome Screen"; public void addComponentToPane(Container pane) { JPanel comboBoxPane = new JPanel();      comboBoxPane.setSize