I have a text field of references, like so ...
<A HREF='asfunction:_root.addStory, _root.arrStorys[0]'>
<b>BULLETIN:SPECULATION HOUNDS SEAMARK</b></A>
<A HREF='asfunction:_root.addStory, _root.arrStorys[1]'> <b>HEADLINES
OCTOBER 31, 2005</b></A>
<A HREF='asfunction:_root.addStory, _root.arrStorys[2]'> <b>FORBES SEES<br
/>FUTURE IN THE TUBE</b></A>
<A HREF='asfunction:_root.addStory, _root.arrStorys[3]'> <b>KEATING SEES<br
/>FUTURE IN WIRELESS INTERNET</b></A>
and clicking on any of them triggers addStory(). If I click on "FORBES SEES
..." the text area which is supposed to display the story,
displays this instead:
_root.arrStorys[2]
At least it's displaying something!! I really need the contents of the
array, however.
I know that asfunction passes the parameter as a string, how do I convert
it so the contents of that array element display? In other words, so that
it's a pointer rather than a label, to put it another way.
Here's what I have for the function:
function addStory(stryElement:Array):Void{
// assign contents of passed array element to text control.
txtNews.html = True;
txtNews.text = stryElement;
txtNews.refresh;
}
I also tried passing just the number of the desired array element,
assembling it like so:
txtNews.text = "_root.arrStorys[" + stryElement + "]";
but all it displayed was the name of the element, eg _root.arrStorys[2],
not what that element contains.
String, Array and Object have all been tried for the type of stryElement.
FoxPro had a macro command, so that you could, in a situation like this
where the name of the variable rather than its contents displays, force the
contents, like so: &stryElement.
Guidance and suggestions will be most welcome.
Thanks - Miles Thompson
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders