-
need some code re: CD ROM
hi there. i'm looking for some code which would allow me to upload a flash site on my mac to a cd rom. i have found the autorun code for a pc, but it doesn't work for mac. essentially, i would like to create a cd rom which when put in the computer starts up automatically, without having to open any files. i would ideally like to know how to have the autorun capability on one cd for both mac and pc. anyone have any suggestions? or could you point me in the right direction?
thanks, julie
http://www.juliehimel.com
http://www.juliehimeldesign.com
-
Senior Member
Please please please!
Read the FAQ before you post; your exact question is answered in quite a lot of detail in there.
It's at the top of the forum: http://www.flashkit.com/board/showth...hreadid=375198
Sam
-
SJT,
I checked out your link to the post containing questions and answers to very pertinent questions. Thank you.
I tried the technique of " how to open a document with a FScommand" for a mac (2 ways one using applescript) I tried both ways and neither does anything. Does this really work?? I must be doing something wrong ??
Thanks.
-
Senior Member
Hmm, they do work...could you go into more detail about how you used them?
Make sure you've changed the variable in the applescript to the name of your document, or even post your code here.
Sam
-
SJT,
for the simpleast code. I just placed this into the first frame of my test file:
fscommand"exec","icons.eps"
(the file 'icons.eps' is in the root folder)
and for the apple script I used your code like this :
--set the name of the file to open
property fileName : "icons.eps"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--ie if there's no file here by this name, it will quit.
return quit
end try
tell application "Finder"
open file targetFile
end tell
_I must be doing something wrong_I would love for this to work. I'm also trying to download files directly from a CD to the user's desktop_anything for this ???
Thanks.
Last edited by steve1312; 11-14-2002 at 11:08 PM.
-
Senior Member
fscommand is written like this:
fscommand("exec","icon.eps");
In the case of the applescript you need to use fscommand to run it, so:
fscommand("exec","myscript");
Sam
-
Sorry - That's how I wrote it in Flash -
Forgot the parenthesis -
Still doesn't work -double checked.
-
Senior Member
Just rememberd, if you're using Flash MX you should read this:
http://www.macromedia.com/support/fl...ctors.htm#Exec
Sam
-
SJT -
OK - thanks for keeping with me. That works now.(I see that it must be an application and not a specific file from within an app.
One more small thing :
Would you know how to download a file to the user's hard disk from the CD (on a MAC) ???
Thanks.
-
Senior Member
I might be able to come up with a script, but it's 5 in the morning where I am, so i'm going to bed!
Sam
-
OK thanks for your time :
I'll bother you at some other time .
Thanks again.
-
Senior Member
This is what you're looking for:
Code:
--set the name of the file to copy
property fileName : "ADSL.doc"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--ie if there's no file here by this name, it will quit.
return quit
end try
tell application "Finder"
move file targetFile to desktop
end tell
Sam
-
SJT,
Wow -Thanks -That looks great--I'll try that.
What code would I place into my Flash File to reference that script ?
I'm assuming:
fscommand(exec, "myscript")
-
SJT -
YOU ARE THE MAN !!!
both of your apple scripts work -I can now download files and launch files. MUCH THANKS !!!
-
frustrated
I can't get this to work. I am trying to download a file called test.jpg from the same folder as the standalone movie and the applescript. I created a button and gave it this code:
on (release) {
fscommand ("exec", "testscript");
}
I created a script using the applescript editor like this
--set the name of the file to copy
property fileName : "test.jpg"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--ie if there's no file here by this name, it will quit.
return quit
end try
tell application "Finder"
move file targetFile to desktop
end tell
Can anyone tell me what my problem is?
Thanks in advance
-
Senior Member
There's three things I can think of.
First, you need to make sure your script is compiled as an application so it can be run by exec,
Second, it has to be in a folder called fscommand as of Flash MX and above for security reasons.
Third, if you're in Mac OS X, you need to append .app to the end of the script as that's it's full name as an application, so myscript.app
Sam
-
AWESOME... almost there.... i can taste it.
It works! I can get my pdf file to launch, and move a jpg from a folder to the desktop. One more wish: instead of saying "Press Run to run this script, or Quit to quit." can the user be prompted to choose his desination folder?
-
Senior Member
You can easily adapt the applescript to show a dialogue for users to choose a destination.
I don't have time to write the stuff for you at the moment, I'd suggest searching the applescript forums at www.apple.com
Sam
-
when you have time can you please help
I've checked the boards at apple and can't locate an example of what I need. I see stuff that might be close and if i knew how to script I could probably get it to work, but I don't. I will spend my evening working on this, completion date is friday and I don't have a working app yet, so any help you can provide I would greatly appreciate it.
Thanks for your time and generosity.
-
I GOT IT!!!
--set the name of the file to copy
property fileName : "jpgs:test.jpg"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
set destination to choose folder with prompt "Please choose a destination folder." -- Select work folder on the hard drive
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--ie if there's no file here by this name, it will quit.
return quit
end try
tell application "Finder"
copy file targetFile to folder destination
end tell
Man, I really am enjoying my second day of applescripting. Very powerful stuff. Who needs third party apps when ya have this much control?
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
|