Categories

XML Flash AS3. How to add facebook icon button

Ray Taylor February 22, 2012
No votes yet.
Please wait...

In this tutorial you will learn how to create a social media icon, like Facebook, in XML Flash templates with Action Script 3 (AS3)

After you have extracted the template package, locate and extract the sources_xxxxxx.zip file with a password, provided to you.

Open the main_cs3.fla file, from sources/flash folder in Adobe Flash program

Locate and open the ‘footer’ movie clip on the Scene. Usually called as ‘footer_main’ movie clip.

Create a new layer on the timeline (name it as you wish, in this example we named our new layer as “facebook”) and import an Image for your social icon to the flash Library: File->Import to library.

Select the newly created layer on the timeline and drag your social icon image to the Scene. Place it nicely on the position you want to display this icon.

Right lick on the image and select convert to symbol option.

On the convert to symbol panel, select Button type and click OK.

Click to select your new Symbol and navigate to the Properties panel. Give your Button symbol a name. In this case we named it as facebook.

We should now add an action script for this facebook button. Create a new layer on the time line and press F9 key to open the Action Script panel.

Add the following script and specify the button name:

facebook.addEventListener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void {
var request:URLRequest = new URLRequest("http://www.facebook.com");
navigateToURL(request, "_blank");
}

Publish your main_cs3.fla file to see the preview.

 

Feel free to check the detailed video tutorial below:

how to change Google Map location in WordPress
This entry was posted in Working with XML Flash and tagged button, Facebook, flash, social, XML. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket