-
Experts can you help?
i would like to know how i can put a link or button into my flash movie that when clicked on , sets my site as the users home page, if anyone knows i would be very grateful.
Cheers
Acestu
-
Senior Member
You can do this,
first add this javascript function in between the opening and closing head tags of your page,
Code:
<script type="text/javascript">
function setHome() {
if (document.getElementById && document.all) {
var obj = document.getElementById('home');
obj.style.behavior='url(#default#homepage)';
obj.setHomePage(location.href);
}
}
</script>
next somewhere in the body of your page add a link like this,
<a href="#" id="home"></a>
since there is no link text, this won't be visible to the user but it can be used by the javascript to create the object it needs.
finally in your movie add a button with the script.
code:
on (press) {
getURL("javascript:setHome();");
}
hope this helps
edit - there shouldn't be a space in the word javascript, it gets added by the board.
Last edited by catbert303; 04-30-2003 at 06:02 PM.
-
Thanks!!
Thanks for the info Catbert303 I will give this a try, just wondering if you know if it works on all browsers?.
Cheers Acestu
-
Senior Member
no, its only internet explorer (probably only on windows too, but I don't have a mac to test on).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|