This tutorial will cover one of the most interesting and powerful Variable Types in Actionscript,"The Arrays. Well to get this Simple for you , the Array is an Object that lets you save, access and manipulate the content of the Arrays. The Array is an object whose properties are identified by a number representing their position in the array, this Number is referred by "index", All Array starts with the Index 0. and there is no better than example to clarify this, I will Create an Array Called ourArray.
Now let's discuss what we can do with this Arrays, Normally Arrays stores a lot different data from Strings , Integers , Complex object to Arrays , which means that you can create a multi-dimension Array by inserting an Array into another. This is an Array holding a different type of Variable.
//lets create ourArray var ourArray = new Array("I am String into my our Array" );
//lets create myArray myArray[0] = "I am a String"; myArray[1] = 5; // I am a number. myArray[2] = ourArray ; // I am an Array
trace(myArray[2][0]); // The output will be "I am String into my our Array".
The Array Object has several method for manipulating the array. Array.concat : Concatenates the parameters and returns them as a new array. Example:
Slideshow is really kinda rare at the internet , I tried to look at some ready Slideshow that need just some modification and here we are ready , but it seems that I can't find what I want, that why I want to write this tutorial to help some people like me that are interested in a slide show .
This slide show is made with Flash 8 and ActionScript 2, and Will use the XML File .
The XML File "filelist.xml" would look like something like this :
This Snippet of Code will load the xml file , and will launch the function ChangeClip() with an interval of 10 seconds , which means that the function will be repeated each 10 seconds and will change the picture.
function ChangeClip(XMLValue) { element = XMLValue.firstChild;
easeType = mx.transitions.easing.Regular.easeOut; var begin = 20; var end = 100; var time = .5; var mc = ourMovieClip;
ballTween = new mx.transitions.Tween(mc, "_alpha", easeType, begin, end, time, true);
counter++;
}
This Snippet of code is a function that will load the image or the Movie Clip in the Stage and will increase the value of the counter
the Transition that was used here is a type of transition that wasn't documented in the flash class documentation , there is a lot different method for doing this kind of transition , so you can have a different type of transition.
Flashflickr is an application builded by Flex/Actionscript2 which uses the API flickr services, the application allow the users to browse their picture , and it implemente the authentification for the registred users , so the users can post comment for the pictures and add tags .... The application is opensource , you can download it for free , and for to be able to use , you need a flickr API key. http://www.flickr.com/services/api/
Creating photo Galleries with Adobe photoshop or photoshop element 2 was always an easy task , but nowdays with the use of Photoshop element 5 and hotoshop Lightroom, Adobe introduces a new generation of Flash-based web galleries that deliver an engaging user experience and provide many styling and customization options.
Photoshop Elements and Lightroom ship with a single SWF file containing the gallery program, which users can customize extensively using the authoring interface in those programs.
Michael Slater and Trent Brown from Adobe , will explain different necessary steps for customizing web photo galleries in ActionScript
Adobe has published the Adobe Media Gallery code as open source, so you can modify it or learn from it to create entirely new galleries. To help get you started, this article provides an overview of how the Adobe Media Gallery works with the XML files. After you read this article, you should refer to the Adobe Media Gallery XML specification and the other resources listed at the end for more details.