Download adobe flex 4.5.1 Sdk from here join Adobe Air 3 sdk downloaded from here.
Download Alternative 3d 8.12.0 SWC from here.
Create a Air project on Flex Builder 3, add “-swf-version=13 -static-link-runtime-shared-libraries=true” to additional compiler arguments on project properties . Add “<renderMode>gpu</renderMode>” below “<initialWindow>” on app.xml and you are ready to go. You can download here a simple example of a pac-man style game.
If you need to open an image file and save it with another resolution, let’s say open a 1000x500 jpg and save it with 500x250, you can do it with the help of as3corelib.
Flash doesn't correct floating point operations, so you end up with crazy stuff like 152.2*100 = 15219.999999999998.
I tried the following formula to get 2 decimal points precision int(152.2*100)/100 but that gave me the wrong result (151.9) so I found this little gem at actionscript-flash-guru.com that was a lifesaver
Recently I set myself to compile an Actionscript3 project by hand using the mxmlc tool on the command-line and wanted to share that in case you ever need to do something similar. It's no biggie and it might be useful for a number of things (making automatic builds, building on machines without the Flash IDE or Flash Builder, etc).
1. Open a console and go to the directory of your project
2. Export the PATH to include the flex sdk binaries, e.g. run:
Note: For those of you that don't know it already, the Flex SDK is a free of charge Actionscript3 library that allows the development of Flex & Actionscript 3-based applications, without the need to purchase Flex Builder/Flash Builder.
This week I finally had a project that involved 3D (about time too).
Since it involved interacting with 3D models, using Flash 10 was out of the question. So I opted to go with papervision, instead of away3D or alternativa3D, since this was the engine we where more accustomed to.
Sometime along the development of the application I came across the need to convert 3D coordinates into 2D screen coordinates and also the opposite. It's nothing new and it's already implemented in papervision, but since it took me a little while to find it, I decided to share it.
Getting the 2D Screen coordinates from a DisplayObject3D
Since papervision 2.0 that every DisplayObject3D has a property called "screen", that will return the coordinate of the object on screen. Whenever I tried to access the screen property the number3D I got back was always (0,0,0). Probably because it's an expensive operation and it's something you only need sporadically, papervision will not calculate this automatically. You need to ask papervision yourself to calculate this coordinates. To do so, just use the "calculateScreenCoords" of the do3d
myDisplayObject3D.calculateScreenCoords(camera)
Now when you try to access the "screen" property you will get the number3D with the screen coordinates for your DisplayObject3D.
Getting the 3D coordinates from a 2D point (x,y)
For this one I found a great post by zupko that tells you exactly what you need to do.
In a nutshell, you need to take your 2D coordinates (x,y) and convert them into a direction vector. Having the vector and the camera position you can create a ray (line) that will go from the camera into infinity. Next you need to specify the Z, or in another words, where do you want to stop on that line. Zupko uses a 3D plane to do that using the "getIntersectionLineNumbers"
Just remember papervision's 3D Zero (0,0,0) is at the center of the screen and not on the upper left corner like the 2D Zero (0,0)
A potential vulnerability has been identified in Adobe Flash Player 10.0.12.36 and earlier that could allow an attacker who successfully exploits this potential vulnerability to take control of the affected system. A malicious SWF must be loaded in Flash Player by the user for an attacker to exploit this potential vulnerability. Additional vulnerabilities have been addressed in this update. Adobe recommends users update to the most current version of Flash Player available for their platform.
More information about this security vulnerability is available at:
I start working on a photo library in papervision, so I look around I got an example from flashEnabledBlog, one of the problems was that the example was in flash cs3 and I need it in flex actionscript project, the other one was that the example was done with old papervision and tweener versions, so I had to port it. It’s a good start if you have to do something like it. I Include lasted versions of Tweener and Papervision in the zip file, you just have to run it.
+ Help the community
+ Explore the Flash platform
+ Create a better world
+ Research and play
Startups
We're looking for stories about startups using Flex/Flash technology. Drop us a quick e-mail or mention it to us via our Twitter account @dreaminginflash, thanks!