Computer Science Canada

scrolling HTML pages with flash

Author:  ReN3g@de [ Fri Mar 19, 2004 1:09 am ]
Post subject:  scrolling HTML pages with flash

ok i found this javascript code on http://www.dynamicdrive.com and it allows ou to make links that are used to scroll an iframe.
check out this example...
http://dynamicdrive.com/dynamicindex17/iframescroll.htm

now i put this code in the page i want to scroll...
code:
<!--DO NOT REMOVE BELOW SCRIPT. IT SHOULD ALWAYS APPEAR AT THE VERY END OF YOUR CONTENT-->

<script language="JavaScript1.2">

//Scrollable content III- By http://www.dynamicdrive.com

var speed, currentpos=curpos1=0,alt=1,curpos2=-1

function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}

function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp

window.scrollBy(0,speed)
}

setInterval("initialize()",10)

</script>


here is an example of a link that would be used to make the iframe scroll...
code:
<a href="#" onMouseover="scrollspeed=-2" onMouseout="scrollspeed=0">Up</a> | <a href="#" onMouseover="scrollspeed=2" onMouseout="scrollspeed=0">Down</a>


how would i make the above links in flash using actionscript?? What commands do i use?

Author:  ReN3g@de [ Sat Mar 20, 2004 8:38 pm ]
Post subject: 

... or if anyone has any other methods of using a flash movie to scroll an iframe?


: