View Full Version : ScrollTo
cazzon
07-31-2001, 06:06 PM
on (press) {
getURL ("javascript:ScrollBy(0,100); return=false", "_parent.MAIN_TARGET");
}
on (press) {
getURL ("javascript:ScrollBy(0,-100); return=false", "_parent.MAIN_TARGET");
}
Where's the error?
This is an action for a flash button that scrolls the contents of a html document loaded within an iframe (labeled "MAIN_TARGET") held on the parent page; evidently, it doesn't work.
Why?
zekebru
08-01-2001, 01:40 PM
I know this might not be much help, but here goes . . .
If you don't need to change which iFrame is scrolled, why don't you just hardcode that into your Javascript? As far as I know, that's the only iffy part of your code.
Luck,
cazzon
08-01-2001, 03:49 PM
Ive tried this
In the Flash movie:
on (release) {
getURL ("javascript:Scroll();");
"MAIN_TARGET"}
And in the html page (the same one that contains the Flash movie!):
<script language = "javascript">
<!--
function Scroll(){
ScrollTo(0,40);
return(false);
}
-->
</script>
but it doesn't work.
I can say just this; the swf resides within an iframe parented to the parent page, while MAIN_TARGET is nested within a div also parented to the parent page.
So, how to?
zekebru
08-01-2001, 04:57 PM
I would first try to make sure your scrolling code works (by calling the scroll function from a button, for instance). Once that works, then this *Flash* forum can answer your question about how to get Flash to work with it.
As for the actual call from Flash:
on (release) {
getURL ("javascript:Scroll();");
"MAIN_TARGET"}
-- I don't know how careful you were with your code, but that doesn't look like correct syntax. What I meant was to use code such as the following.
on (release){
getURL ("javascript: Scroll();")
}
Then, hardcode "MAIN_TARGET" into the javascript. The javascript portion of the code really isn't within the scope of this forum, but there should be some other forum somewhere that could help you out with that part.
cazzon
08-01-2001, 07:18 PM
ok, please let me know about.
I'll try parallel researches meanwhile.
atb,
c.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.