Home > Default > Newbie to iPhone packager

Newbie to iPhone packager

November 30Hits:0
I am using Flash CS5 with the current iPhone packager, to take an existing project that i made for AIR for android. Two issues..  One, i know that the publishing time for iPhone in flash is quite slow, as i did a test run with a completely empty fla and it took a minute or two.  But when i went to publish my project after i imported all my classes and such, it went on for 6 hours with out ever completing.  I checked my task manager and it did NOT say that flash was not responding.. but when i hit cancel, flash crashed. 
The other problem is that when i did a test (ctrl+enter) i got a bunch of errors from one of the classes i have been using.  These errors only happen with the project set to iPhone and not in any other project setting.. the class is below with the lines that caused the errors commented out..
package com.quasimondo.bitmapdata
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.TimerEvent;
import flash.filters.ColorMatrixFilter;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.media.Camera;
import flash.media.Video;
import flash.utils.Timer;
import flash.utils.setTimeout;
public class CameraBitmap extends EventDispatcher
[Event(name="Event.RENDER", type="flash.events.Event")]
public var bitmapData:BitmapData;
private var __width:int;
private var __height:int;
private var __cam:Camera;
private var __video:Video;
private var __refreshRate:int;
private var __timer:Timer;
private var __paintMatrix:Matrix;
private var __smooth:Boolean;
private var __colorTransform:ColorTransform;
private var __colorMatrix:Array;
private var __colorMatrixFilter:ColorMatrixFilter = new ColorMatrixFilter();
private const CAMERA_DELAY:int = 500;//orig 100;
private const origin:Point = new Point();
public function CameraBitmap( width:int, height:int, refreshRate:int = 15, cameraWidth:int = -1, cameraHeight:int = -1 )
__width  = width;
__height = height;
bitmapData = new BitmapData( width, height, false, 0 );
__cam = Camera.getCamera();
//__cam.setQuality(50000, 0);
if ( cameraWidth == -1 || cameraHeight == -1 )
//__cam.setMode( width, height, refreshRate, true );
} else {
//__cam.setMode( cameraWidth, cameraHeight, refreshRate, true );
__refreshRate = refreshRate;
setTimeout( cameraInit, CAMERA_DELAY );
public function set active( value:Boolean ):void
if ( value ) __timer.start() else __timer.stop();
public function close():void
active = false;
__video = null;
__cam = null;
public function set refreshRate( value:int ):void
__refreshRate = value;
__timer.delay = 1000 / __refreshRate;
public function set cameraColorTransform( value:ColorTransform ):void
__colorTransform = value;
public function set colorMatrix( value:Array ):void
__colorMatrixFilter.matrix = __colorMatrix = value;
private function cameraInit():void
//__video = new Video( __cam.width, __cam.height );
//__video.attachCamera( __cam );
//__paintMatrix = new Matrix( __width / __cam.width, 0, 0, __height / __cam.height, 0, 0 );
//__smooth = __paintMatrix.a != 1 || __paintMatrix.d != 1
__timer = new Timer( 1000 / __refreshRate );
__timer.addEventListener(TimerEvent.TIMER, paint );
private function paint( event:TimerEvent = null ):void
//bitmapData.draw ( __video, __paintMatrix, __colorTransform, "normal", null, __smooth );
if ( __colorMatrix != null )
bitmapData.applyFilter( bitmapData, bitmapData.rect, origin, __colorMatrixFilter );
dispatchEvent( new Event( Event.RENDER ) );


I have started going through my code on the main fla line by line in an effort to try and figure out what is actually causing my fla to freeze when publishing..
the problem seems to happen when i ad this line of code:
var myScanner:FaceDetector_Camera=new FaceDetector_Camera();
mind you, if i comment out that line and still leave the line that imports the FaceDetector_Camera class it publishes relatively quickly, but as soon as i ad the line mentioned above we fail.. any ideas?

Read other 2 answers


Related Articles

  • Newbie to iPhone packagerNovember 30

    I am using Flash CS5 with the current iPhone packager, to take an existing project that i made for AIR for android. Two issues..  One, i know that the publishing time for iPhone in flash is quite slow, as i did a test run with a completely empty fla

  • Quick iPhone packager question...November 30

    Hello, I am interested in purchasing Flash CS5 so I can make an iPhone app that involves PDF opening and saving, but I had a question to all those who have used AlivePDF... would it work with the packager for iphone to make an iPhone app? If not... W

  • Air 2.7 and MacOs Lion: iPhone packager does not workNovember 30

    hi. After upgrading from Snow Leopard to Lion the iPhone packager does not work. It throws an error concerning the Application Version Number. Is this a Know bug? Is there a work- around?  Thanks.  Michael.Yeah sorry, the start of my descriptor looks

  • How big is the Adobe team for developing the iphone packager?November 30

    How many active full time developers are working on the iPhone packager at Adobe currently? I'm a bit curious since it would help me get a realistic idea how long it will take for new versions of the packager might come out. This is not to be taken a

  • IPhone Packager File SizeNovember 30

    I just experimented with the new cs5 iPhone packager and noticed that although my little test app just had some movable text the app file size was already 5mb.  Can any explain this to me?  Am I missing out on some way to reduce the file size.  I am

  • Importing Flex project into Flash CS5 for use with iPhone packager? Please Help.November 30

    Hi all, I have been developing an application in Flex builder for the iPhone using the iPhone packager, where I've been using the Flex framework. Now I'm stuck at trying to use my existing libraries in Flash. It seems I can't add the UI components I

  • IPhone Packager, weight and start up performanceNovember 30

    Hi All I have a question about the Iphone packager, but first i can describe my main project structure. project-api ( only interface ) - swc - 32ko project-core ( implementation ) - swc - 825ko project-flex-app - swf - 2.000 ko project-mobile-core (

  • HI guys - a newbie at iPhone and i have questions that I would appreciate sNovember 30

    am a newbie on iPhone. Came from Symbian OS, and so I miss a couple of things. The first is this: 1. How come Apple (iTunes) doesn't sync Outlook Notes - I have solved the problem with Evernote, but is it so difficult to include Outlook Notes in the

  • When the update for iPhone Packager will be available??November 30

    Anybody has any idea, when the new update will be available of iPhone packager? Does new update will be able to interact with the iPhone OS to load the images from the Camera Roll, if internet connection is available, message notification, badges etc

  • Is it really true that we can't update from iPhone packager to 2.6?November 30

    Hi, My understanding is that once we have build an app in Iphone Packager we are never able to upgrade to air 2.6... http://developer.apple.com/library/ios/#qa/qa1623/_index.html Can anyone confirm that there really is no way to do this? Apple sugges

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.096 s.