Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-22-2006, 12:45 PM
Junior Member
 
Join Date: Nov 2006
Posts: 2
Default Explorer and Firefox

Hi,

i have a problem with the browser. I have created an exe file with swfkit pro 3.0 and i call some url using the keyboard. the problem is that the default browser that is used from the application is internet explorer. i qould use Firefox. Someone could help me? Do you know if i can use a script or other? thank you very much.
Reply With Quote
  #2 (permalink)  
Old 11-23-2006, 03:04 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Explorer and Firefox

Yes, it will always open the default web browser unless you run the "firefox.exe" directly. To do this, you must first find where the "firefox.exe" is. The following actionscript function will return the path name of the firefox.exe:

Code:
import SWFKit.*;

function getFireFoxExePath() {
var keyName = "HKLM\\SOFTWARE\\Mozilla\\Mozilla Firefox";
var key = new RegKey(keyName);
if (key != null) {
var ver = key.getValue("CurrentVersion").data;
keyName = keyName + "\\" + ver + "\\Main";
key = new RegKey(keyName);
if (key != null) {
var pathName = key.getValue("PathToExe").data;
return pathName;
}
}

// this is for older versions of Firefox (eg, 0.8).
else {
keyName = "SOFTWARE\mozilla.org\Mozilla Firefox";
key = new RegKey(keyName);
if (key != null) {
var ver = key.getValue("CurrentVersion").data;
keyName = keyName + "\\" + ver + "\\Main";
key = new RegKey(keyName);
if (key != null) {
var pathName = key.getValue("PathToExe").data;
return pathName;
}
}
}
}

function onClick() {
Shell.run(getFireFoxExePath() + " http://www.swfkit.com");
}

btn.addEventListener("click", onClick);
Reply With Quote
  #3 (permalink)  
Old 01-27-2008, 10:13 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: Explorer and Firefox

This is interesting...

since im using form to publish a website... and this site has links... how to , when clicked on the link, make the link to open in firefox ??

now its opening links in new IE (even if my default browser is Firefox, few have been complaining about that) but i want it to open in FireFox
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:58 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.