Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-16-2008, 12:41 PM   #1
xwielder
Senior Member
 
Join Date: Aug 2007
Location: NE Ohio
Posts: 524
Send a message via AIM to xwielder
Default custom browseForOpen path

I have tried the following two (2) methods to get browseForOpen to open to a custom directory, but I just can't seem to get it to work. It's always opening to the logged in user's desktop directory. Is this something that's not allowed yet by Adobe, or am I just not coding it right?

Nope:
ActionScript Code:
var OpenExFILE:File = new File(); function browseForExFile (event:Event):void {     var testString:String = "C:\Documents and Settings\user\My Documents\test_folder";     OpenExFILE = OpenExFILE.resolvePath(testString);        var xmlFilter:FileFilter = new FileFilter("XML (*.xml)", "*.xml");     OpenExFILE.browseForOpen ("Open existing saved game file...", [xmlFilter]);     OpenExFILE.addEventListener (Event.SELECT, exFileSelected); }

Nope:
ActionScript Code:
var OpenExFILE:File = new File("C:\Documents and Settings\user\My Documents\test_folder"); function browseForExFile (event:Event):void {     var myFileString:String = (OpenExFILE.nativePath);     OpenExFILE = OpenExFILE.resolvePath(myFileString);     var xmlFilter:FileFilter = new FileFilter("XML (*.xml)", "*.xml");     OpenExFILE.browseForOpen ("Open existing saved game file...", [xmlFilter]);     OpenExFILE.addEventListener (Event.SELECT, exFileSelected); }
xwielder is offline   Reply With Quote
Old 01-16-2008, 02:23 PM   #2
xwielder
Senior Member
 
Join Date: Aug 2007
Location: NE Ohio
Posts: 524
Send a message via AIM to xwielder
Default Got it.

Got it.

ActionScript Code:
var OpenExFILE:File = new File(); function browseForExFile (event:Event):void {      var testString:String = "C:\\Documents and Settings\\user\\My Documents\\test_folder";      OpenExFILE = OpenExFILE.resolvePath(testString);      var xmlFilter:FileFilter = new FileFilter("XML (*.xml)", "*.xml");      OpenExFILE.browseForOpen ("Open existing saved game file...", [xmlFilter]);      OpenExFILE.addEventListener (Event.SELECT, exFileSelected); }
xwielder is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating separate classes for custom event frank grimes ActionScript 3.0 6 06-27-2009 11:55 PM
Do ALL Custom Events REQUIRE clone() and toString() overrides? frank grimes ActionScript 3.0 9 10-24-2007 02:30 AM
ColorTransform within custom class wmbenedetto ActionScript 2.0 2 05-12-2006 08:59 AM
Drag object along custom path Magsec4 ActionScript 2.0 1 01-22-2006 06:37 AM
Using a String aboslute path to a movieClip to check for mouse over and mouse down canstein ActionScript 2.0 1 02-18-2005 06:06 PM


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.