26Jun

Image Gallery - Part V - Full Screen

No comments

Full screen capabilities with the click of a button, added a new class FullScreenButton.as and modified Main.as. ( Don’t forget the ALLOWFULLSCREEN parameter in your html document needs to be set to TRUE - you can toggle this capability in your Publish Settings as well ) - just click the grey rectangle to toggle fullscreen [...]

25Jun

Image Gallery - Part IV - XML File Loading

3 comments so far

So far we have our image gallery, now I want to put all the image location url’s within an xml file for ease of use. The limitation here is that I originally just have 2 categories and the function that controls the toggle to each category has to have the same name as the page [...]

03Jun

Parsing an XML File with Attributes

No comments

Coincidently I had a new class to load in XML files and I had a comment/request to demonstrate how to read an XML file that has attributes. Not much of a demo, so here are just the class files and the xml file… I used these classes for an mp3 player that I constructed.
The XML [...]

25Apr

Actionscript 3 Carousel Animation for Menu

1 comment so far

So, after reviewing the Carousel videos from gotoandlearn.com, I revised the code and adapted it for Actionscript 3 for a new project that I will be working on. Here is a demo.. for now the only type of control of the carousel is the left and right direction, won’t stop for now.
[kml_flashembed movie="/projects/flash/Carousel/Carousel.swf" height="550" width="700" [...]

10Jan

[AS 3] Parsing an XML file with XML and XMLList Classes

1 comment so far

Full documentation: XML Class, XMLList Class
Here is my imagedisplay.xml file contents:
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<website>
<page>
<image>shark</image>
<client>Charlesbridge Publishing</client>
<caption>lorem ipsum</caption>
</page>
<page>
<image>elephant</image>
<client>Weybridge Publishing</client>
<caption>cool xml stuff</caption>
</page>
</website>
.. and here is my Actionscript file to parse the above xml file:

package
{
import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.xml.XMLDocument;

public class LoadXML extends Sprite
{
private var xml:XML;
private var captionList:XMLList;

public function LoadXML()
{
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, xmlDisplay);
loader.load(new URLRequest(”xmldisplay.xml”));
}

private function xmlDisplay(e:Event):void
{
xml = new [...]