This is an update to my earlier post announcing the launch of FTM. Source provided after the jump.
Archive for the 'Flash, Flex and AS3' Category
Recently while trying to capture a frame from my webcam in Adobe Air, I realize the captured image is always smaller than the height or videoHeight from the Video object. The BitmapData documentation revealed that the BitmapData.draw() operation does not respect any matrix transformation applied on the Camera or Video object, so we need to do the scaling ourselves. A quick and dirty way would be:
The BlackBerry OS SDK currently only supports Flash Builder 4.0.1, not Flash Builder 4.0. When following steps described in BlackBerry’s own Getting Started Guide to launch your app in the simulator, users of Flash Builder 4.0 will get an internal error:
An internal error occurred during: "Launching [your project name]".
com.adobe.flexide.launching.air.ApolloLaunchConfiguration.getAIRProfile()Ljava/lang/String;
To overcome this, either download the 261MB patch from adobe, or use the command line packager which comes included with the BlackBerry OS SDK.
Using the command line packager
In essence, there is only one command that you’ll need, the syntax is:
blackberry-airpackager -package output_bar_file_name -installApp -launchApp
project_name-app.xml project_name.swf any_other_project_files
-device IP_address
What you’ll need: your project name, your BlackBerry simulator’s IP address, the .swf of your project which is compiled by Flash Builder using the normal tools (Project->Build Project or export release build). And remember the output_bar_file_name must end with the extension .bar. If you forget this, however, the error describes it quite plainly to you. For me, a working command looks like (where “AirTest” is my project name):
blackberry-airpackager -package AirTest.bar -installApp -launchApp AirTest-app.xml AirTest.swf -device 192.168.92.128
(If you are not familiar with running commands in windows, you need to add the path to blackberry-airpackager.bat in your system’s “path” environment variable.)
Do I have to run that manually everytime?
Fortunately, you don’t. The command can be configured as a builder in Flash Builder 4.
- Go to Project->properties, and under Builders, click on the “New” button to add a new builder. Select type Program, give a name to the builder (any will do, I named mine “BBLauncher”).
- Enter the path to your blackberry-airpackager.bat in the location field. Mine was:
D:\Program Files\Adobe\Adobe Flash Builder 4\sdks\blackberry-tablet-sdk-0.9.0\bin\blackberry-airpackager.bat - Enter the path of your project in the working directory (the folder where you find your main .as file, likely your current “src” directory).
-
And Lastly, in Arguments, enter the options of the command:
-package AirTest.bar -installApp -launchApp AirTest-app.xml AirTest.swf -device 192.168.92.128
Move this builder to after “Flex” and “AIR application.xml Builder”, and you are done. From now on you can launch the app in the simulator by doing a Project->Build project.
Posts that helped me: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Getting-Internal-Error-When-Attempting-to-Debug/td-p/621952/page/2
Users of 64bit windows might get frustrated installing the new BlackBerry Tablet OS SDK if you are not using the 32bit Java Development Kit (JDK). When you run the .exe from BlackBerry, an error claims that “Win64 not supported. The author of the package you are installing did not include support for this platform.” The solution is trivial:
Unzip “BlackBerryTabletSDK-Air-Installer-0.9.0-Win.exe” and you should see 2 folders, “InstallerData” and “Windows”. Go into the Windows folder and find the .lax file.
Open the file in a text editor and change this line
lax.nl.current.vm=
to
lax.nl.current.vm=[your path to java.exe]
If you are not sure where is your JDK installation, check your C:/Program Files (x86)/Java folder for a folder named like jdkx.x.x_xx. Open it and look for the bin folder inside, your java.exe should be inside. For example, my path would be:
lax.nl.current.vm=C:/Program Files (x86)/Java/jdk1.6.0_22/bin/java.exe
Save the file and run the .exe in the same folder (BlackBerryTabletSDK-Air-Installer-0.9.0.201010221500.exe) to start the installation.
If you do not have your JDK yet, get it at http://www.oracle.com/technetwork/java/javase/downloads/index.html
The new version of easySwap (beta 2.0) is out! The NTU Student Union has volunteered to host it on their server (and provide the manpower to maintain it, so I had to change the name to uSwap as well, to be in line with their branding.
Find it at http://su.ntu.edu.sg/uswap
Unfortunately, I still did not have time to implement the other features that I had wanted to, especially the email notifications. High priority in my list is also to implement caching of the results so that it wouldn’t be so taxing on the server when the “refresh rate” is high.
Part of me also wanted to port the project over to plain html/php so that its supported on the iPhone/iPad (probably with jQTouch), but… that’s for next time.
Put together a simple transform manager for a friend’s project. Supports dragging and single click scaling and rotating. Source provided after the jump.
After suffering a laggy Flash CS4 for nearly 6 months, I finally decided maybe it was an issue with the software and not my file. I feel stupid for not considering this possibility - an update which fixes the problem have been existing for over a year now.
Download it at: Adobe Flash CS4 Professional Update (10.0.2)
30MB (140 for Mac) and doesn’t require a restart.
Control particles by positioning affectors around the screen to solve puzzles. Play the game at http://www.playauditorium.com/
The graphics don’t look like much, but its a cool flash rendition of the classic Powers of Ten – except that now you control the accelerator and brakes. The scale is pretty impressive too, from quantum foam up to the whole universe, check it out at New Grounds.
Was researching a while ago for a whiteboard style app and came across Andy Woodruff’s implementation for bezier curves.
http://www.cartogrammar.com/blog/actionscript-curves-update/

