dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Open Dialog Box

  1. #1
    Junior Member
    Join Date
    Sep 2002
    Location
    Venezuela
    Posts
    9

    Open Dialog Box

    Hi everyone!

    I wonder if there is a way to call an "Open Dialog Box" using ActionScript.

    Thanx a Lot!!!

    Alejandro

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    An 'open dialog box'??
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  3. #3
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    Flash badly needs file management support for saving files locally on a user's machine. I have noticed many topics of client side file management, and I have made a small and incomplete description of a File() object for Flash 7. It's very similar to Java, Cocoa, and Objective-C.

    Code:
    onClipEvent(load) {
    	myFile = new File();
    }
    onClipEvent(enterFrame) {
    	showOpenDialog("Save", openFilePath);
    	theFile = myFile.open(openFilePath);
    	
    	myFilePath = myFile.path;
    	if(myFile.path == undefined) {
    		fileUnspecified = true;
    	}
    	myFile.addData(txt, start) = //An object, array, variable/where to add
    	myFile.dataType = plainText        //TYPES: ASCII, Binnary serialized, PlainText, or XML
    	myFile.extension = ".flashTxt"
    	function Save() {
    		theFile = myFile.save(saveFilePath);
    	}
    	function SaveAs() {
    		showSaveDialog("Save", saveFilePath);
    		myFile.save(saveFilePath + myFile.extension);
    	}
    }
    
    /*
     File.dataType
     File.path
     File.extension
     File.open
     File.close
     File.save
     File.name
     File.onOpen
     File.opened
     File.saved
     File.onSave
     File.onClose
     File.parse
     File.addData
     File.dataType
     File.showOpenDialog
     File.showSaveDialog
     File.removeData
     File.toString
     File.toXML
     File.getBytesLoaded
     File.getBytesTotal
     File.lines
     File.toArray
     File.serialize                 --ASCII & Binary serial only
     File.unserialize
     File.encode                    --Special Flash file type
     File.uncode
     File.toObject  
    */
    From here to infinity,
    A J I N F I N I T Y

  4. #4
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    Did I confuse any non-Mac OS X programmers of Cocoa?
    From here to infinity,
    A J I N F I N I T Y

  5. #5
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    Originally posted by VAYKENT
    An 'open dialog box'??
    Leave him alone, that's a good idea! HTML has one, so why can't the more advanced Flash have one? And how come there's no 'Duh!' smilie ?
    From here to infinity,
    A J I N F I N I T Y

  6. #6
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    Humm... maybe there wasn't a smile 'cause I wasn't smiling - I was genuinely confused. I didn't know what an 'open dialog' box was... I guess I should have thought about it a bit more - he must have meant an 'open' dialog box... for files as you suggested... I thought that since this was an XMLish (read XMLSocket) forum, he might have been asking for a command to 'open a chat dialog' box...

    Sorry... I was confused.

    As to why/when Flash will have local file manipulation ability. I'd say never. Flash is web-based, and that's a security issue.

    I agree that Flash should have something like this.. but I would also want MM to stay VERY far away from anything that could give it a bad image... and even without local file access there have already been 'virus' programs... <sigh> So while I agree that it would save a lot of pain to have it built into Flash.. I don't think it will ever happen... it'd be cool if they could work it out though...
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  7. #7
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    In the Flash player settings panel, it says stuff about allowing a particular Flash movie to store data on a client's computer, and allowing the Flash movie to access the client's microphone, camera, etc. Those privacy settings scared some people. Flash should at least have flie reading and uploading. For example, somebody has a Flash site building tool in Flash and clients can upload files quickly and easily via a special File.upload action inserted by the developer.
    From here to infinity,
    A J I N F I N I T Y

  8. #8
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    Yup. I agree Flash should have it. But it probably won't.

    I also agree that MM could have handled the 'settings' dialog a little better... even though it clearly wasn't a security problem.
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center