| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
She Bangs! She Bangs!
Join Date: Jan 2003
Posts: 475
|
Anyone have any trouble with getURL working with projector files on Mac OS X? Specifically in Firefox? I can only get it to work if I set my default browser to Internet Explorer.
|
|
|
|
|
|
#2 |
|
theSWAK
|
im having the same issue. i can get IE to pop relative getURL's but firefox you have to click it once which brings an empty page than a 2nd time for it to actually load.
|
|
|
|
|
|
|
|
|
#3 |
|
~*^_^*~
Join Date: Sep 2005
Location: Sydney
Posts: 2
|
I've been looking for information about it too.. it seems like if you use getURL to load a relative document in a projector, if you have firefox as your default browser it won't work unless you already have firefox open somewhere in the background.
If firefox is open, getURL works fine... if the projector actually has to open the program to bring up the link, for some reason it sticks an http:// in there which means it can't find the file. Annoying. IE doesn't seem to have the same problem. Can anyone shed any light on that?? |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Sep 2005
Posts: 1
|
This seems to come down to requiring absolute system URLs for the particular files you're trying to access using getURL. This isn't very flexible but would work in those cases where you can feed an install path to flash or know for certain where a single user or small set of users will install or run your projector from.
ActionScript Code:
I believe that IE, with its file system Explorer hooks, is able to figure out the location from the projector location but Mozilla/Firefox needs the local absolute file paths otherwise it assumes it's a URL and fails. Having used the absolute path I've also noticed that in my case the projector always launches IE rather than my default browser Firefox. I'm actually having a heck of a time just trying to figure out a consistent way to launch all links from my projector in a new browser window. Should be a simple: ActionScript Code:
But because it is a projector, when I make IE my default browser for testing purposes, IE simply replaces the current browser window content with the getURL destination. Javascript window.open solutions seem to be even more complicated and cause problems with XP Service Pack 2 etc. and [object Window] blank window errors. Projectors and dealing with swfs outside of HTML seem to have an entirely different set rules for many behaviors. I wish I could find a FAQ on this and other items including limitations, browser interaction and more recent Windows and Flash security issues. |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Oct 2005
Location: Houston, TX
Posts: 3
|
All:
A friend of mine who knows ActionScript pretty well has written a function which generates an absolute path from a relative path if utilized in the "getURL" function. Example: getURL(makeAbs("somepath"somefile.html"),"anewwind ow") It does this by grabbing the file path of the Projector file and then stripping off the filename of the projector. I'm testing this right now and will post if there's interest. My friend also made it cross-platform: if it detects a ":" (colon) in the directory name it assumes a Mac platform, otherwise it leaves the pathname alone. Anyone find another potential solution? Charlie Last edited by clindahl; 10-07-2005 at 10:11 PM.. Reason: Changed the title from "getAbs" to "makeAbs" |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Oct 2005
Posts: 2
|
Hello Charlie,
please would you be so kind to post your friend's makeAbs-function here? This Firefox-getURL-problem is driving me crazy since weeks. There is the same issue with flash-projector-files (.exe) on Windows-PCs. Best regards Otto. P.S.: Could you send me this makeAbs-function by e-mail, too? Mailto: info@lernspiele.at |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Oct 2005
Posts: 2
|
I have just programmed the following Work-around:
on (press) { poslastslash = this._url.lastIndexOf("\\"); if (poslastslash == -1) { poslastslash = this._url.lastIndexOf("/"); } folderurl = this._url.substr(0, poslastslash+1); poscolon = folderurl.indexOf("|"); if (poscolon<>-1) { folderurlstart = folderurl.substr(0, poscolon); folderurlend = folderurl.substr(poscolon+1); folderurl = folderurlstart+":"+folderurlend; } targeturl = folderurl+"mywanted.html"; getURL(targeturl, "_blank"); } Just replace "mywanted.html" with the requested filename! I have successfully tested this work-around on the web and locally on my Windows-PC: It works fine on both, the IE and Mozilla Firefox, and it covers all the possibilities to start the flash: via .swf, .html and .exe Could anyone test it in a projector-file on a Mac, too? If so, please tell me the results. Best regards Otto. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Oct 2005
Location: Houston, TX
Posts: 3
|
Here's the absURL.as so far.
ActionScript Code:
It STILL doesn't work well on the Mac. Works with Safari, but NOT with Mozilla or FireFox or Mozilla or IE on the Mac; haven't tried it on the Pee Cee yet. Another weirdness: the original function my friend sent me (similar to the other solution posted in this thread) yielded: file:///<volume-name>/<toplevel-directory>/index.html And it NEEDS to be file:///Volumes/<volume-name>/<toplevel-directory>/index.html So that's in the function I've got so far. I am going to have to find another approach I think. One thing I'm playing with is: 1) Detect that I'm on a Mac (OSX). This is a standard actionscript function 2) Invoke an Applescript to fire off the browser. To use absUrl.as : 1) Created a dummy keyframe, named it "script". 2) Used a "#include absURL.as" 3) Put the "absURL.as" in the same directory as the "swf" movie. 4) When I generate the Projector it'll automagically include the function in the resultant executable. Good luck. I'll keep working on this 'cuz it is the last thing keeping me from finishing this CD project (oh, yes, that's another wrinkle to my problem). |
|
|
|
|
|
#9 |
|
Memetic Engineer
|
Thank You Dr. Otto!
Your advice and the accompanying script was brilliant! I was having the same problem getting a local link to load from an exe into Mozilla. I had burned a CD with an autorun.inf calling the projector, which loads the menu.htm with the getURL and then the exe does an fscommand-quit while the web page loads from the CD Bless you!!! Bless your house, and your ride, and the people in them too. Thanks for showing my applications "the True Path". Peace, R Scarbrough Memeticist |
|
|
|
|
|
#10 |
|
She Bangs! She Bangs!
Join Date: Jan 2003
Posts: 475
|
So what's the final verdict with using getURL on projector files to open URLS on the web in a browser?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|