Flash content on iPhone and the likes

7 10 2009

Finally, Flash developed content can be viewed on iPod, Android, Blackberry, and many more such devices. The new version of Flash Player – 10.1 will have support on a broader set of devices.

Read announcement from Adobe MAX.





New name for FlexBuilder

29 05 2009

Interesting news!! FlexBuilder is being rebranded to a new name – FlashBuilder. I feel this is more intuitive than earlier. Basically FlexBuilder is a tool for creating flash applications only. Whether you use Flex SDK or just plain actionscript, that’s upto you.

Check this article by Lee Brimelow.






Access properties of loaded SWF file in Flex

13 04 2009

I had a requirement of loading a Flash CS3 SWF file into my Flex application and access its properties. I tried to follow the recommended way using the SystemManager class by Adobe.

This did not work for me. The file loaded but when I tried to access the properties of the loaded SWF, it always gave me an error.

I discussed this with my colleague, Sumant Mishra. He gave me a simple hack which actually worked like charm. Check out the code below:

private function onSWFInit(e:Event):void
{
	var fl:FlexLoader = e.target.getChildAt(0) as FlexLoader;
	var loadedSWF:* = fl.getChildAt(0);
	loadedSWF.init(); //init() funciton is on the main timeline of loaded SWF
}
<mx:SWFLoader id="previewLoader"
                complete="onSWFInit(event)"/>




Flex and Flash workflow integration

27 02 2009

This is good news! We can use some of the exclusive Flex SDK classes in a Flash project using Flash CS4. All we need to do is:

  1. create a library project (SWC) in Flex
  2. in the library class constructor create an object of the class you want to use in Flash ( example:  new StringUtil() )
  3. create a new Actionscript 3.0 file in Flash CS4.
  4. goto Publish Settings > Flash > Settings… > Library Path tab.
  5. click the red icon button and browse to the SWC file and add it to library path. You can also add multiple SWC files.

There you go. You can use the required Flex SDK class in Flash CS4. Though, not all of the classes can be used this way, esp. the framework classes (controls, containers, etc.) Still looking for the exact list of classes that can be used. I was successful with StringUtil but could not utilize my favorite ArrayCollection this way.

Check out Tareq AlJaber’s blog for a detailed tutorial…

http://flashauthoring.blogspot.com/2009/02/using-class-stringutil-in-flash.html





BitmapData effects

23 12 2008

Recently there was an actionscript competition at The Flash Blog – 25 lines that would impress Einstein. You need to create something innovative using only 25 lines of code. The absolutely fantastic  results were declared on Dec 18. It’s amazing to see what people can do with only 25 lines of code in Flash. Check out the top entries here…

http://theflashblog.com/?p=503

I noticed one common thing being used to create some of these effects is the BitmapData class for manipulating bitmap objects. Here, I will share a very basic example to show what can be done using this object.

1. Create a new file (actionscript 3.0) in Flash CS3 IDE.

2. Change the stage dimensions as 400 x 200 and frame rate as 24 fps.

3. Select frame 1. Copy the following code in code editor:

//import bitmap classes
import flash.display.Bitmap;
import flash.display.BitmapData;

//create a BitmapData object
var myBitmapDataObject:BitmapData = new BitmapData(400, 200, false, 0x00FF0000);

//create a random number which will be used for setting the seed for adding noise to the bitmadata object
var seed:Number = Math.floor(Math.random() * 100);
//set up a channel with a mix of  three main colors - red, blue, green
var channels:uint = BitmapDataChannel.GREEN | BitmapDataChannel.BLUE | BitmapDataChannel.RED
//create a new bitmap with the bitmapdata object
var myBitmap:Bitmap = new Bitmap(myBitmapDataObject);
addChild(myBitmap);
//use enterframe event for animating the bitmap effect
addEventListener(Event.ENTER_FRAME, updateImage);

var velo:int = 10;
function updateImage(e:Event):void
{
	if (velo >= 200)
	{
		velo = -Math.abs(velo);
	}
	//add noise with baseX and baseY properties set to var velo which is constantly changing
	myBitmapDataObject.perlinNoise(velo++, velo++, 6, seed, false, true, channels, false, null);
}

4. Publish the file.

There  you go. You will see a colorful animated cloud being zoomed in and zoomed out.

ColoredCloudEffect.swf

Bitmap Cloud Effect

Bitmap Cloud Effect





Adobe Flash Catalyst – Coming Soon

6 12 2008

One grievance that Flash designers have about the evolution of Flash IDE is that it has become more developer oriented than (as originally intended) designer friendly. Earlier designers could easily add interactivity using the menu driven coding. The Expert Mode for the code editor was a secondary option (Flash 4 and 5 .)

Well, Adobe is certainly an organization which is very sensitive towards its core customers (i.e. designers.) and have announced a new product called Adobe Flash Catalyst (earlier codenamed Thermo.) Catalyst is a tool targetted for designers who want to add interactivity to their design. The result is that we can create a UI in Catalyst and then just convert graphics into dynamic content by selecting objects and specifying actions from menus. No coding required. Output the file as a SWF or AIR. You can easily build a RIA prototype.

Catalyst will be launched very soon. Read more about it here…

http://labs.adobe.com/technologies/flashcatalyst/





Flash SEO

26 10 2008
Flash seo is the one big disadvantage that flash has over AJAX. However, recent developments with adobe partnering with google and yahoo in this direction is good news for the flash/flex community.

Dominic Gelinieau has done some extensive research regarding flash seo, how google indexes flash content. These are very interesting findings… 

Hope google and yahoo add more power to flash/flex content search in the future.