“FluidHtml is a text-based markup language (like HTML) that lets you dynamically generate Flash content. This is an extraordinarily powerful idea. It means that anyone can build highly animated websites, ads, media players and 3D animations quickly and easily.”
FluidHTML looks to be an innovative concept and may address current issues related to Flash content on the web. However, I believe web designers/developers who currently use HTML/CSS might find this much more attractive than Flash designers/developers.
I really like the concept of offering an extensible API and opening it up to developers, but is this going to be a viable markup language 5 years from now or is it just a phase. As ActionScript libraries that support browser-like functionality improve and as Google and Yahoo’s search engine’s begin to recognize the text within Flash files, does FluidHTML really fix anything that isn’t already steadily improving.
I believe FluidHTML does have potential however, I am not sure if Flash designers/developers will buy into the concept. Check out the introductory video below on FluidHTML. I’d love to hear how you guys feel about FluidHTML after viewing the video. Would you consider using it?
FlashVars is Flash answer to Query String. It’s a way to pass data or variables from html to a Flash movie. Variables passed via FlashVars will go into the _root level of the Flash movie.
Differences Between AS2 and AS3
The key difference between AS2 and AS3 is how to retrieve the FlashVars. The FlashVars are no longer available in the _root level of the movie. Instead, you must use the new LoaderInfo class object to access the FlashVars. The FlashVars is available in the parameters member of the LoaderInfo. This makes the AS3 solution much more dynamic and independent to each object that is created. See below for an example of both.
function loaderComplete(myEvent:Event)
{
this.flashVars=this.loaderInfo.parameters;
this.flashVarsLoaded=true; // set a flag to indicate that the FlashVars is loaded
}
I hope this post helped you understand the key difference between defining your FlashVars within AS2 and AS3. If your interested in learning more about FlashVars, check out the resources below as they will go deeper into the topic.
What ever happened to getURL within Actionscript 3.0?
If you wanted to create a link to another website in Actionscript 2.0, here’s what it would have looked like:
The command getURL used to a be very easy way to create an outbound link within Flash. This one line of code code easily fitted perfectly within a button onRelease event. Not so easy anymore.
Along with many other easy Actionscript 2.0 calls, getUrl has changed. It uses a couple more lines of code and has changed to navigateToURL. You might be asking why would the amount of lines increase for such a simple task. Craig Campbell just recently posted an in depth example and explanation to creating outbound links within Actionscript 3.0.
TweenMax builds on top of the TweenLite core class and its big brother TweenFilterLite, to round out the tweening family with popular (though not essential) features like bezier tweening, pause/resume capabilities, easier sequencing, hex color tweening, and more.
TweenMax can simply do anything TweenLite and TweenFilterLite can do plus more. TweenMax also introduces an innovative feature called “bezierThrough” that allows you to define points through which you want the bezier curve to travel.
This is simply a great upgrade to the existing model and I can’t wait to personally try it out. If you’re curious to see this in action check out the two examples below as they will demonstrate the new feature “bezierThrough” and color filtering. Check it out!
Creating drag and drop functionality in is Actionscript 3.0 quite different than in older versions. While still relatively straightforward, it can still be a little odd to those not really familiar with the new Actionscript 3.0 structure.
Drag and drop is a functionality that many Flash users, beginners and advanced, will learn to appreciate. Greg Lunn has created a perfect tutorial on how to take what you know already with drag and drop and apply it within Actionscript 3.0. See it for yourself.
If you are still scratching your head trying to grasp the concept and structure of Actionscript 3, then this tutorial will help you get your feet wet. This Flash tutorial is great for users looking to begin using sound with Actionscript 3.0. It touches on the basics of sound integration and breaks its functionality.
It will basically walk you through creating your music player then followed by adding a volume control slider. This walk through consists of two individual tutorials created by Craig Campbell.
Create the Music Player
Essentially, what you have here are two buttons, start and stop. The buttons control a remote music file that the music player is accessing via the new sound object within AS3. Note: This simple music player was built to handle any one mp3 at a time.
Overall, this is a nice start for beginner users of Actionscript 3.0. This music player can easily be added to a personal site, blog, and even a MySpace page. Use this to get you started, then see where that will take. Enjoy! Read the full story
As we all might know that Firefox is the way of the future. IE has it perks but the weight is being shifted over in favor of Firefox. Firefox’s great advantage is that you are able to install from an enormous amount of plugins.
Many of these plugins were originally geared towards HTML developers and designers, but more recently a number of great Flash-related Firefox plugins have begun to emerge. I personally take advantage of these plugins as they are very useful when needing to debug your Flash movies.
Here is a list of Flash-related Firefox plugins that might be of some good use.
FlashTracer a Firefox plugin which allows you to view the output of Flash ActionScript trace() actions from within your browser.
Flash Switcher allows you to switch immediately between different versions of the Plash Player plugin with just a few clicks.
HBXTracer is a sidebar that helps developers to test HitBox implementations on HTML pages and Flash content.
Load Time Analyzer allows developers to measure and graph how long web pages take to load in Firefox.
Server Switcher allows you to easily switch between your development and live servers.
A series of helpful Flash tutorials to get you feeling comfortable using Actionscript 3.0.
Getting Started with Understanding Paths Within AS3
As a Actionscript 2.0 programmer, one of the first hurdles to overcome when first using Actionscript 3.0 was _parent and _root. They’ve respectively changed to parent and root and they don’t entirely work as intended.
Currently, using parent the way it was used in Actionscript 2.0 will produce a compiler error as Actionscript 3.0 is a bit pickier about moving up paths. It uses class inheritance instead of the old prototype inheritance. It was designed to dispatch events, use listeners, pass variable that point to objects, all that other good stuff. However, that is not necessarily for everyone especially if you simply use Flash as an animation tool.
Here is a simple fix I learned from Bryan Grezeszak and it doesn’t involve complex event dispatching. Simply create a variable that stores the parent path and use that instead. By doing so, you are compromising the language and avoid getting wrapped up in a complete workaround only to find more bugs and errors. // declare a variable that is parent
var newParent = parent;
// apply that instead of just using the command parent itself
newParent.gotoAndStop(2);
I tried this and it works like a charm and you can apply the same thing to root.
If you found this post useful, I would love to hear from you. All suggestions are welcomed.
Craig Campbell just created a new Flash/XML music player. The design is loosely based on the old school iPod. The player is very easy to update using the supplied XML file that points directly to all you necessary files. For those of you hoping that this is built in AS3, sorry it is not. However, it is still a nice music player.
Here is the Flash/XML music player created by Craig Campbell.
Lately, I’ve begun dedicating my time towards learning Actionscript 3.0. I’ve been told that Actionscript 3.0 is a bit tricky, but very powerful once you get the hang of it. However, when I came across a simple button press, I realized this wasn’t going to be a walk in the park.
The simple button press is probably one of the most used features for Flash users. With Actionscript 3.0, this has changed quite a bit. This is why this tutorial will directly focus on just that.
Getting Started with AS3: Button Press
The AS3 code below will show you how to add interactivity to a button using ActionScript 3.0. It will also give you a glimpse of how the structure of ActionScript 3.0 has changed the face of ActionScript…for the better.
AS3 Code
//imports the necessary AS events
import flash.events.Event
import flash.events.MouseEvent;
//attaching mouse events to the button on stage
rssButton.addEventListener(MouseEvent.CLICK, rssClick);
rssButton.addEventListener(MouseEvent.MOUSE_OUT, rssMouseOut);
rssButton.addEventListener(MouseEvent.MOUSE_OVER, rssMouseOver);
rssButton.addEventListener(Event.ENTER_FRAME, onEnterFrames);
//Properly declaring variable
var box_color_play:Number;
//On mouse clicked function
function rssClick(event:MouseEvent):void {
eventNotice.text = "MOUSE CLICKED";
}
//On mouse out function
function rssMouseOut(event:MouseEvent):void {
eventNotice.text = "MOUSE OUT";
box_color_play = 0;
}
//On mouse over function
function rssMouseOver(event:MouseEvent):void {
eventNotice.text = "MOUSE OVER";
box_color_play = 1;
}
//Function in place used for on ENTER_FRAME event animation
function onEnterFrames(event:Event)
{
if ((rssButton.box_color.currentFrame != rssButton.box_color.totalFrames) || (rssButton.box_color.currentFrame != 0)) {
if (box_color_play == 1) {
rssButton.box_color.nextFrame();
}
if (box_color_play == 0) {
rssButton.box_color.prevFrame();
}
}
};