Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2003, 08:27 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
Question Set this page as your homepage ?

Hi,

I need a button to set the site as the client's homepage.
In Javascript I would do:
PHP Code:
function makeDefault(element)
{
element.style.behavior='url(#default#homepage)'
element.setHomePage('http://www.mysite.com');
}



then call it with something similar to:
<
a href="javascript:history.go(0);" onClick="makeDefault(this);">blah blah </a


My customer asked me to port this in his flash movie, and I have no idea how to proceed. No need to tell you I'm a total newb in flash/actionscript.

Thanks in advance,
__________________
Saintaw

pending.

Reply With Quote
  #2  
Old December 10th, 2003, 09:19 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
Found it (Thanks JVD!)

Start off with this on yer page:
PHP Code:
<IE:HOMEPAGE ID="oHomePage" /> 



Add this JS on the page you're going to call the script
PHP Code:
<script>
browsername=navigator.appName;
browserversion=parseInt(navigator.appVersion);

function 
bookmark() {
    if (
browsername == "Microsoft Internet Explorer" browserversion>=4) {
        
window.external.AddFavorite('http://www.yoursite.com,'Site descrition');
    }
}

function homepage() {
    if (browsername == "Microsoft Internet Explorer" & browserversion>=4) {
        oHomePage.style.behavior='
url(#default#homepage)';
        
oHomePage.setHomePage('http://www.yoursite.com);
    }
}
</script> 


In your Flash button, just call the JS function with a getURL("javascript:yourfunction();");

Voila

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Set this page as your homepage ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT