View Full Version : How to jump to anchor in HTML
tstefan
November 20th, 2002, 04:01 PM
This is a problem:
I want to have a flash movie on my web page, it will have some buttons with animations.
Is there posiblle to jump somewhere in the same web page (anchor) if I press button in flash.
How can I make button like that.
:( :(
lostinbeta
November 20th, 2002, 04:10 PM
Same way you would in HTML. Just put the code within a getURL tag.
tstefan
November 20th, 2002, 04:30 PM
Thanks but I havent done that in HTML yet so please would you explane it to me.
lostinbeta
November 20th, 2002, 04:34 PM
First create your anchor in the HTML page where you want to jump to.
<A NAME="jumpHere"></A>
Now use a URL to jump to that area....
on (release){
getURL("#jumpHere");
}
Untested of course, but I don't see why it wouldn't work, a getURL serves just as well as the A tag in HTML.
tstefan
November 20th, 2002, 05:00 PM
I will try it, thanks.
lostinbeta
November 20th, 2002, 05:01 PM
No problem :)
tstefan
November 20th, 2002, 05:11 PM
It doesn't work, it just reloads the page .
Try ti.
:( :(
reverendflash
November 20th, 2002, 05:12 PM
I think you have to use the full url...
in other words:
http://www.yoursite.com/yourfile.htm/#jumphere
I think...
Rev:elderly:
lostinbeta
November 20th, 2002, 05:13 PM
That might be it, but Rev, when you do that, there is no slash before the # so it would be
http://www.yoursite.com/yourfile.htm#jumphere
tstefan
November 20th, 2002, 05:23 PM
Yes now it works but not in the way I need.
When I klick on the published movie it opens the html page and jumps on the anchor.
But if I open the page in which I have embeded the swf it only reloads the same page and dont jump to anchor, puf pant.
:*(
lostinbeta
November 20th, 2002, 05:30 PM
Hmmmm, no clue then :-\
reverendflash
November 20th, 2002, 05:30 PM
thanks lostinbeta...
I am soooo lazy with my HTML... :evil: my bad
Rev:elderly:
senocular
February 6th, 2003, 04:21 PM
getURL("javascript:location.href=location.pathname + \"#top\";void(0);");
top, or whatever your anchor name is
zammzamm
June 5th, 2004, 03:53 PM
getURL("javascript:location.href=location.pathname + \"#top\";void(0);");
top, or whatever your anchor name is
Hey, that works great but it only work one time when you try to click the anchor button several times it opens up a new window. Any suggestions?
:luigi:
zammzamm
June 5th, 2004, 03:54 PM
Hey, that works great but it only work one time when you try to click the anchor button several times it opens up a new window. Any suggestions?
:tb:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.