ActionScript 3.0 Video Lesson 25: Embedding Links and HTML on Flash

Tue, Sep 1, 2009

ActionScript

Links are useful to lead the user to a destination. On this Flash ActionScript 3.0 High Definition (HD) tutorial we show how to embed links and HTML from a text file and make them clickable on a dynamic text box using the htmltext property in ActionScript.

HERE IS THE SOURCE CODE

//Embedding Links and HTML on Flash
//by AVRAHAM SALTOUN
// solutions at say-web dot com
// FREE TO USE AND DISTRIBUTE

/* To load text we will need to create
two variables:
1) URL Request – with text location
2) URL Loader, that will contain the text, after loading */

var req:URLRequest = new URLRequest(“Secret.txt”) ;
var loader:URLLoader = new URLLoader();

// We are supposing the TEXT file is in the same folder
//as the FLA File….

// The Loader Event Listener:

loader.addEventListener(Event.COMPLETE, fileLoaded);
/* This will fire after loading is complete, the
fileLoaded function, that we will soon create. */

loader.load(req);
//This will place the text into the loader.

function fileLoaded(event:Event):void {

// Let’s Append some text using the append text method
external_txt.htmlText= loader.data;
external_txt.appendText(” Here is my appended text !!”);

// Sweet and easy
// Thanks for watching!

}

Related Articles:

, , , , , , , , , , , , , , ,

27 Responses to “ActionScript 3.0 Video Lesson 25: Embedding Links and HTML on Flash”


Trackbacks/Pingbacks

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


1,260
Unique Visitors
Previous 30 Days
Powered By Google Analytics