| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Senior Member
Join Date: Mar 2007
Posts: 247
|
I have this code:
var iconFile:File = File("C:/Documents%20and%20Settings/jisaacks/Desktop/autopro-7.exe"); which produces an error saying: Error #1034: Type Coercion failed: cannot convert "C:/Documents%20and%20Settings/jisaacks/Desktop/autopro-7.exe" to flash.filesystem.File. I am confused what I am doing wrong. I typed the path into run> and it opened it just fine so I know that path is valid.
__________________
Visite my site: Altoona Design |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar 2008
Posts: 15
|
Hi,
Deed you try it with other files, like jgp, gif etc.. and not.exe?? |
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Mar 2007
Posts: 247
|
Quote:
Thanks!
__________________
Visite my site: Altoona Design |
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2007
Posts: 247
|
OK I opened a new Flash CS3 air document and pasted put this in the timeline:
ActionScript Code:
and I get the same error. but If I use File.desktopDirectory.resolvePath("testfile.txt"); it works and if I then output the file path it is exactly the same as the string I used above. I dont want to have to use desktopDirectory though because I am trying to make a drag and drop feature, and a user can drag things from any file folder. THANKS!!!
__________________
Visite my site: Altoona Design |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash to PHP & PHP to Flash | awdio | ActionScript 2.0 | 2 | 11-08-2006 05:09 PM |
| how do I make a clip wait before loading? | shoodogg1977 | ActionScript 1.0 (and below) | 4 | 09-01-2006 02:08 PM |
| array from external text file loop problems | shrinkwrapped | ActionScript 2.0 | 4 | 07-17-2006 11:59 PM |
| how to open pdf file from projector file in acrobat reader | sohailfx | ActionScript 2.0 | 2 | 06-24-2005 06:54 PM |