1 ActionScript 3.0 Lesson 25: Embedding Links and HTML on Flash Thu Sep 17, 2009 6:55 pm
danilodeleon
Administrative Team
https://www.youtube.com/watch?v=T1_PCD7swtA&feature=player_embedded
video tutorial
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
video tutorial
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
- 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 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 !!”);
Last edited by danz on Mon Oct 05, 2009 9:31 am; edited 2 times in total