View Full Version : Can Flash CD ROM jump to an image?
holdaway
02-26-2008, 11:48 AM
Hi,
I am making a short splash page in CD ROM format. At the end of the splash animation, a photo is displayed for the client, read from an XML file.
What I am wondering....upon hitting the 'quit' button, is it possible to make the Explorer (PC) or Finder (Mac) window jump to where the photo is located on the CD?
Or, perhaps as an alternative, can I make it so that the photo is saved on the Desktop for easy access?
northcode
02-26-2008, 03:50 PM
This an FAQ item from FK that I created. It's not quite the same as your question but it's pretty close.
Q: How can I add a button to my projector that opens an Explorer Window (not a browser) at the drive where my projector was launched from, even when it's launched from a CD?
A: Windows
Put this bit of ActionScript in your button on(release) action and it will open an Explorer window at the root of the CD. Once you know the drive letter you can extend the path after the ":" to any folder on the CD that you want to target.
drv = _url.substr(8,1);
getURL(drv + ":");A: Apple
The following AppleScript will do the job on the MAC and will open Finder at the location where ever the script is located.
tell application "Finder"
open folder of (path to me)
end tell
With only minor surgery you can add a path to the argument of the getURL call in the Windows version to open the folder that contains your image. The Apple solution is probably going to be a bit trickier.
holdaway
02-28-2008, 11:49 AM
Wow, thanks. I don't get the substring code but I'll see what I can do with this. So basically if the image is in a folder called 'assets' I just change the code to:
drv = _url.substr(8,1);
getURL(drv + ":assets/");
....or something more?
northcode
02-28-2008, 03:39 PM
The substr gets the drive letter out of the _url string "file://d:/whatever" (d is the 8th character).
You have to use a valid path so put a / after the : like you would if you were typing in on a command line or in explorer.
getURL(drv + ":/assets"); // == d:/assets
holdaway
03-05-2008, 07:15 PM
Thanks a lot. I guess I will burn a few CDs and get testing. You're the best!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.