Hello people!
I really need your help!
The scenario is:
An HTML frameset with 2 frames. I need to create a button in Actionscript 3 (and put it in the top frame) in order to scroll down the content of the main frame. I thought of Javascript. I end up writing a script that works but when I call the Javascript function in Actionscript nothing happens. Maybe a silly mistake maybe not…
If you want to test it, download my files: http://www.mediafire.com/file/hokzzzwy1rt/scrolltest.rar
My source code is:
The Javascript in the html of the top frame:
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
function pageScrollDn()
{
top.mainFrame.scrollBy(0,15);
timeID = setTimeout('pageScrollDn()',100);
}
function stopScroll()
{
clearTimeout(timeID);
}
//-->
</SCRIPT>
The actionscript for the button:
button.addEventListener(MouseEvent.MOUSE_OVER, pageScrollDn);
button.addEventListener(MouseEvent.MOUSE_OUT, stopScroll);
function pageScrollDn(e:MouseEvent):void{
ExternalInterface.call("pageScrollDn");
}
function stopScroll(e:MouseEvent):void{
ExternalInterface.call("stopScroll");
}
I would really appreciate any ideas…