Показать сообщение отдельно
Старый 04.01.2011, 11:09
alatar вне форума Посмотреть профиль Отправить личное сообщение для alatar Найти все сообщения от alatar
  № 7  
Ответить с цитированием
alatar
 
Аватар для alatar

блогер
Регистрация: Dec 2008
Адрес: Israel, Natanya
Сообщений: 4,740
Записей в блоге: 11
А чего там сложного?
Код AS3:
protected var file:File;
protected var destination:File;
 
protected function button_clickHandler(event:MouseEvent):void
{
    file = File.applicationDirectory.resolvePath("mysnd.mp3");
    destination = File.applicationDirectory.resolvePath("mysnd.mp3");
    destination.browseForSave("Save As");
    destination.addEventListener(Event.SELECT, selectHandler);
}
 
protected function selectHandler(event:Event):void
{
    var dir:File = event.target as File;
 
    file.copyTo((event.target as File), true);
}