Articles in the ActionScript 2.0 Category
AIR, ActionScript 2.0, ActionScript 3.0, Design, Flash CS4, Flex »
Preloaders are much needed for Flash/Flex RIA’s.
Here some of the free preloader animations created by me this morning.
Idea of preloader is indicating the user that some assets are being loaded, and making them to wait.
But we should keep in mind that the user may lost their patience, so keeping the Flash assets filesize minimal is much important while making Flash websites or Flash applications.
ActionScript 2.0, ActionScript 3.0 »
We can send mail directly using SMTP+Actionscript3.0 but here we are going to discuss about simple form of “mailto” function that just opens the default mail application with the supplied subject and body content.
Difficulty:
Beginners – intermediate
Version:
AS2 and AS3
Here we are going to see how to use mailto function in AS2 and AS3.
Actionscript2.0
Step1:
Open New Flash Document (File > New) from menu or (CTRL + N) shortcut
key.Select Flash File (Actionscript2.0)
Step2:
select the first keyframe on the layer1.
Step3:
Press F9 (Function key) or open the Actions Panel under the Windows menu.
Step4:
Paste the below code
getURL(”mailto:designscripting@gmail.com?subject=Test Message&body=Site …
ActionScript 2.0, ActionScript 3.0, Design »
The launch of new search engine for Actionscript developers has made the life easier for the developers to search code snippets easier.
HexoSearch – The world’s first search engine dedicated for actionscript.
HexoSearch is aiming to provide the best actionscript search experience which we believe is to offer a best solution for any specific topic.
To achieve that, actionscript developers are able to vote for the link that they find useful. Given enough time, links that provide useful information will be pushed up to save everybody’s time.
ActionScript 2.0, ActionScript 3.0 »
We can trace as many variables or Objects with single trace statements in both Actionscript 2.0 and Actionscript 3.0 without concat operator ‘+’
Actionscript 2.0
var one:Number = 1;
var two:String = “two”
trace([one, two]);
Actionscript 3.0
var one:Number = 1;
var two:String = “two”
trace(one, two);
one difference is that no need to use square brackets in AS3.0
ActionScript 2.0 »
In my project there was a need to create unique alpha numeric value + to act as a substitute for session variables.
I serached internet and got this Class GUID.
It has one drawback that it always create GUID of length 40. So i made some change to generate GUID of specified length.
Version of Actionscript:
Actionscript 2.0
Here is the usage of the Class GUID
trace(GUID.create(40))
Note:
Make sure that GUID resides in the same folder.
ActionScript 2.0, XML »
In this version2 of Dynamic slide show i have added preloading support and opening links on clicking the image..
Here you can have look t previous version
Nothing complicated from the previous version… just need to update the swf and xml
in xml
image url=”Images/image1.jpg” gotoURL=”http://www.designscripting.com” target=”_blank”
gotoURL = webpage to be opened on clicking
target = _blank | _self
_blank opens the link in new page;
_self opens the link in same page.
Next in slideshow is Fader Classes in AS3 with that its possible to Fade back to back images, wait till preloading, load animated swf …
ActionScript 2.0, ActionScript 3.0 »
In my project i was passing array to another class(passing by reference). And i was editing the items there in another class(Composition). I was in a situation to resset the array. Then i suddenly reinitialized the array(arr = new Array() or arr = []).
That will create some error in application. Bcoz the reference will end there.
So its advisable to delete items alone. When passing the array references accross several Class.
var Num_arr:Array = new Array();
Num_arr.push(1)
Num_arr.push(6)
Num_arr.push(2)
Num_arr.push(4)
Num_arr.push(9)
trace(”–”+Num_arr+”–”)
arr.splice(0,Num_arr.length)
trace(”–”+Num_arr+”–”)
Happy coding
ActionScript 2.0, ActionScript 3.0, Flash CS4 »
Flash player 10 is in beta … its time to check the Flash player version installed in your system and upgrade to latest Flash player..
There are some easy ways to check the player installed..
Follow the link and check the version
kb.adobe.com
duber.com
playerversion.com
Â
Dont have Adobe Flash Player….
Install Adobe Flash Player
ActionScript 2.0, XML »
This tutorial shows how to create dynamic slideshow by fetching the data from XML and the slideshow.
This tutorial covers reading XML using XPathAPI, Conditional operator, MovieClipLoader, setTimeout.
XpathAPI:
The native XPathAPI class allows us to search the XML nodes and attributes within XML that €™s loaded in to flash.
To know more about using XPathAPI click here
Conditional Operator:
Using conditional operator is similar to if else statement.
Example:
var test_boolean : Boolean = true
if(test_boolean)
trace(”I am True”);
else
trace(”I am False”);
//output:I am True
Same Logic using the conditional operator
var test_boolean : Boolean = true
test_boolean == true ? trace(”I am True”) …
ActionScript 2.0, XML »
XPath API:
XML used to make our flash applications more dynamic.
The native XPathAPI class allows us to search the XML nodes and attributes within XML that €™s loaded in to flash.
Simple XML Structure:
Loading XML:
The basic actionscript code for loading XML in actionscript 2.0
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function( isLoaded:Boolean )
{
if(isLoaded)
{
// here this refers to the xml object. Instead of this we can also use xml there.
trace( this );
//trace( xml );
}else
{
…
