Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Flash button for 'Back to Top' of webpage..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi ppl..

Is it possible to use a Flash button (.swf) as a button on an HTML page to take the viewer back to the top of the page..

All I really need to know is the script (if it can be done) to do it. If not, I'll just have to use a standard graphic with a rollover but I'd like to use a Flash animated one..

Anyway, any help would be greatly appreciated..

Cheers,
Paul @ basepoint designz LTD..

basepoint designz LTD
 
You should be able to do it with getURL.

Code:
on(release){
   getURL("#anchorName");
}

Or you could insert a javascript into your html page:

Code:
function jumpToBookmark(bookmark){
   location.href="#"+bookmark;
}

and then call the javascript from your flash button:

Code:
on(release){
   getURL("javascript:jumpToBookmark('anchorName');
}

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top