scot
10-10-2005, 09:35 PM
is it possible to call a actionscript function inside the textArea Component like <A HREF="asfunction:aHrefCall">Activate Function</A>
here some code I cant get it to work ........
// func for HREF to call
function aHrefCall() {
trace("HYPERLINK CLICKED in Flash");
}
//
// put a txt component on stage and load style and data
this.createClassObject(mx.controls.TextArea, "txtArea", 10);
txtArea.html = true;
txtArea.wordWrap = true;
txtArea.multiline = true;
txtArea.label.condenseWhite = true;
txtArea.setSize(300, 300);
//load CSS
txtStyle = new TextField.StyleSheet();
txtStyle.load("css.css");
txtArea.styleSheet = txtStyle;
//load XML
xmlCont = new XML();
xmlCont.ignoreWhite = true;
xmlCont.load("xml.xml");
xmlCont.onLoad = function(success) {
if (success) {
txtArea.text = xmlCont;
txtArea.vPosition = 0;
}
};
xml looks like this.....
<?xml version="1.0" encoding="iso-8859-1"?>
<header>this is a test to see if a href is working properly <A HREF="asfunction:aHrefCall">Activate Function</A></header>
any ideas ..... .or does this only work from textFields ????????????
here some code I cant get it to work ........
// func for HREF to call
function aHrefCall() {
trace("HYPERLINK CLICKED in Flash");
}
//
// put a txt component on stage and load style and data
this.createClassObject(mx.controls.TextArea, "txtArea", 10);
txtArea.html = true;
txtArea.wordWrap = true;
txtArea.multiline = true;
txtArea.label.condenseWhite = true;
txtArea.setSize(300, 300);
//load CSS
txtStyle = new TextField.StyleSheet();
txtStyle.load("css.css");
txtArea.styleSheet = txtStyle;
//load XML
xmlCont = new XML();
xmlCont.ignoreWhite = true;
xmlCont.load("xml.xml");
xmlCont.onLoad = function(success) {
if (success) {
txtArea.text = xmlCont;
txtArea.vPosition = 0;
}
};
xml looks like this.....
<?xml version="1.0" encoding="iso-8859-1"?>
<header>this is a test to see if a href is working properly <A HREF="asfunction:aHrefCall">Activate Function</A></header>
any ideas ..... .or does this only work from textFields ????????????