I've been writing a lot of getters and setters lately (and spending way too much time doing that...), so I googled for some sort of plug-in for Eclipse/Flex Builder and found a great resource called Project DashHere's a nice script to use with Dash to generate getters and setters for your variables
Inside FlexBuilder goto Help->Software Updates->Find and Install (if you ran into an error about retrieving "feature.xml" delete the site.xml file in your Flex Builder directory)
I've been gathering some guidelines to writing proper class documentation in Actionscript. This is so basic stuff but anyway it helps to have it written down somewhere. Here's what I have so far as general guidelines:
Use ASDoc block comments (Ctrl+Shift+D in Flex Builder).
Write in English.
Use a $Id$ svn/cvs keyword so everyone knows directly who did the last change on the file.
If importing to COM, write an example of usage.
Favor the use of getters and setters instead of public vars/const.
In the source code use the following order to keep things organized:
The flash.system.System class in Flex 3 SDK beta 3 has a new gc() static method that forces the garbage collection process (it works for Flash Player debugger version only). Previous to this method the only known way to force the garbage collection was the localConnection hack so this is good news.
Just saw the news about the new Flex Builder public Beta 3 and I must say I'm anxious to get my hands on it. I've been working with the previous beta 2 and suffering from the slow compile/refresh times that others have also observed. But since it was a Beta we couldn't really complain, could we?
This will be the last beta prior to the launch of Flex Builder 3 and Adobe promises an overall quality and performance improvement. The Matt Chotin's beta feature overview article is the place to go to read about what's new and I'm not saying anything else until I get my hands on this baby.
If you've been out of the loop or simply too busy to check it out, Flex Builder is basically a commercial programming environment for Actionscript programming that has been growing in both popularity and features.
Ted Patrick published on his blog two serials to give you an extension on the trial period of Flex 3. Word has it that it should be enough until the final version comes out.
Here they are:
MAC extension serial #: 1307-0059-4523-4261-9974-9828
WIN extension serial #: 1307-1052-9498-6822-0041-4602
Today a milestone in the internet world was achieved, Papervision 2.0 Alpha codename GreatWhite is out
So here's a little demo on the new Phong shader :) As soon as i have the time tonight i'll put on a much nicer one. This is just to show that altough PV3d just got a new whole set of features it's still easy to use
Following my last post on 9-Slice items, here comes another nice one on Bitmap.draw() and the security sandbox.
Many people know the solution to this one, but i just found myself looking for it for too long, so here it goes
If you want to take a snapshot of a running Video object, you can't, you'll be alerted by the flash player that you are violating
the sandbox security. So how do we do it?
Easy as pie
video.attachNetStream( null );
bitmapData.draw( video );
video.attachNetStream ( myNetStreamObject );
Three very simple lines of code but that are hard to come by.
Have you ever tried to take a snapshot using bitmap.draw() of a movieclip that has 9-slice enabled?
//my9SliceEnabledMc is a 40 by 40 9-slice enabled movieclip on stage
my9SliceEnabledMc.width = 200;
my9SliceEnabledMc.height = 300;
var myBitmapData = new BitmapData(200,300);
myBitmapData.draw(my9SliceEnabledMc);
addChild(new Bitmap(myBitmapData));
So what you'd expect to happen above is to have a new bitmap that looks the same as my9SliceEnabledMc,
but what you get instead is the original 40x40 movieclip.
This doesn't make sense at all, i have no idea what Adobe was thinking when they let this one through.
This was driving me crazy for a while now, and today i finally found the answer, as simple as it seems,
putting the my9SliceEnabledMc inside another sprite corrects the issue!!
//my9SliceEnabledMc is a 40 by 40 9-slice enabled movieclip on the library
var myContainer = new Sprite();
var my9SliceEnabledMc = new my9SliceEnabledMc();
myContainer.addChild(my9SliceEnabledMc);
my9SliceEnabledMc.width = 200;
my9SliceEnabledMc.height = 300;
var myBitmapData = new BitmapData(200,300);
myBitmapData.draw(myContainer);
addChild(new Bitmap(myBitmapData))
Also i should add that this is a major issue with PV3D since you cannot directly use a 9-slice item as a texture.
Our Goals
+ 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!