Define JavaScript function in HTML page:
function coloritem(itemname,itemcolor)
{
itemname.style.color = itemcolor;
}
Assign ID to the object:
<h3 id="t1015" style="color:#000000;">How to invoke JavaScript function from a Flash file.</h3>
Call JavaScript function in Flash using OnClick action:
javascript:coloritem(t1015,'#FF0000');
Export Flash file ("File" > "Export Flash SWF File") to the same folder where HTML page is placed, and embed Flash animation in HTML using OBJECT and EMBED tags (generate the code with "File" > "View HTML Code" command)