loading assets using SWCs (in Actionscript projects)

17 06 2009

Found a good article and discussions on using asset SWCs using Flash IDE:
http://www.airtightinteractive.com/news/?p=327





How to include Flash code packages (SWC) in Flex Builder (3)

10 06 2009

I like combining gs.TweenLite and fl.transitions.easing.* to do most of my animations. Here is how you can include the Flash AS3 library SWC in the Actionscript project library path. Step-by-step instructions are as following and also illustrated in the screenshot.

[+] In Flex Builder (3), select the Actionscript project you need to use the Flash AS3 library SWC in and edit its properties by right-click the name of the project.

[+] Select Actionscript Build Path and then the Library path tab.

[+] Click on the button that says Add SWC.

Refer to the screenshot. (I am on a MAC. the path to your SWC might be a little different.)

Enjoy.





ANT basics (used to compile Flex projects)

1 04 2009

Found a good reference of ANT’s abc. More reference towards the end of the slideshow.





How to use Flash component (SWC) in Flex (3)

10 11 2008

It is fairly easy to import Flash components into Flex projects. The trick is to include the SWC in the Flex project library path. Step-by-step instructions are as following and also illustrated in the screenshot.

[+] In Flex (3), just select the Actionscript project you need to use the Flash SWC in and edit its properties.

[+] Select ActionScript Build Path and then the Library path tab.

[+] Click on the button that says Add SWC.

Refer to the screenshot here. (I am on a MAC, the path to your SWC might be a little different.)

Enjoy.





Change default background color in Flex compiler

15 06 2008

to do this once and for all, instead of having to add the code in every project. The trick is to add additional compiler arguments in compiler property. (Note the orange box).
Change background color in Flex





Flex-built Flash editor – everyone can make sushi in 2 minutes

8 05 2008

Ever since Aviary made its first appearance, it has caught the attentions of thousands of web users’ and reviewers. In my opinion, what is great about the tools Aviary has to offer is that they are created by Adobe programs (Flex, Flash, etc) but to some extend they are becoming competitors to Adobe programs (Photoshop, Illustrator, etc). So… my biggest question was, will Aviary (or anybody else) release something that will become competitor(s) to Flex or Flash?

Admittedly, I was half joking when I asked that question. There is no way you can create a Flash IDE built with Flash technology, right? That didn’t make any sense to me.

However my jaw dropped when I saw a online Flex-built Flash editor. The tool is called Wix. Basically you can create a simple-structured page-based web site or widget using Wix’s web-based editor. Read the review, or even better, get an account and check it out yourself. (Find the button “CLICK HERE TO GET INVITED” on the page.)

OK. Let’s step back. It is not a Flex-built Flash authorizing tool per se. I still don’t think that is possible yet. At least not now. But think about Wix, it is opening many doors to all the Web 2.0 users.
[+] It publishes Flash sites, thus is taking advantage of all the benefits Flash player has to offer. It is the most widely-distributed plug-in, it is cross-platform, cross-browser. It can be multi-media. It offers powerful interface. It’s RIA.
[+] It solves an issue common Flash sites (at least most of them) encounter – SEO.
[+] It is free (for now). For people who want to build simple Flash sites, but don’t want to spend $700 on Flash IDE, this is great.
[+] It is easy to use. The UI is beautifully-designed. It hides the confusing Flash IDE’s timeline and library from the users, instead users have in-context tool boxes. I think it won’t take long before anybody could manage to make a website in Wix, compared to a pretty big learning-curve in Flash IDE.
[+] Better than Flash IDE, it comes with ready-made clip-arts and pre-built slideshow and video players for laymen. You can also embed media from popular sites such as Flickr, Youtube, etc. Soon, the entire www will be your library.

Wix is an easy-to-use web-content editor. It is great for:
[+] people, especially pre-college teenagers, who want to make good looking and multi-media presentations, but cannot afford (time- and money-wise) expensive IDEs.
[+] small businesses that want to build quick online portfolios to show case their work.
[+] personal albums and newsletters, especially when you are already sharing content on social networking sites such as Flickr, youtube, etc.

Wix is not for me, or any professional Flash designer/developer. What I cannot live without in my Flash websites includes:
[+] Scalability with dynamic content. I have been using XML as my data layer in almost every project I do, be it small or big project. I enjoy the MVC paradigm.
[+] customized transitions between clicks. To me, nothing on a webpage should pop in/out. That is a big differentiator between RIA and (most) HTML sites.

To sum up, I will use the following video of this Sushi machine as my comment to Wix. Hats off to Wix.





Full Screen mode – AS3 Flash Player 9

29 01 2008

[UPDATED] sample site that I used the fullscreen mode: http://my-magic-circle.com.

[UPDATED] sample code added. See below.

Just came across the full-screen issue in AS3. It turned out to be pretty easy to deal with. I am stoked Flash Player 9 has this feature. Developers need to do both of the following 2 things to make this happen.

[Step One] Actionscript

package{

	import flash.display.StageDisplayState;
	import flash.display.Sprite;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;

	public class Main extends Sprite{
		public var _fullScreen_btn:MovieClip;

		protected function handleMouseUp(me:MouseEvent):void
		{
			if (stage.displayState == StageDisplayState.NORMAL) {
				try{
					stage.displayState=StageDisplayState.FULL_SCREEN;
				}
				catch (e:SecurityError){
					//if you don't complete STEP TWO below, you will get this SecurityError
					trace("an error has occured. please modify the html file to allow fullscreen mode")
				}
			}
		}
		public function Main(){
			_fullScreen_btn.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp,false,0,true);
		}
	}
}

[Step Two] html script (the code which embeds the .swf file in the page)

In short, you need to update the value of the param “allowFullScreen” to be “true”.

If the html script was published by Flash IDE, you need to
update two instances of “allowFullScreen” , both from “false” to “true”.

If the html script was published by Flex IDE, you need to add the param
“allowFullScreen” with the value “true” at four places.

My references:

http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html
http://www.flashxpress.net/forum/showthread.php?t=64585

Thanks to my friend Will Carpenter‘s help.