I have a project in adobe air that it is assumed that in the i can work with files using the File class but when I click on the button I get the following error:
VerifyError: Error #1014: The class was not found flash.filesystem::File.
at cubo_fla::MainTimeline/btnFrontClick()
I am playing the swf with flash player 10.
The following code is what has the button to be pressed.
function btnFrontClick(e:MouseEvent):void
{
var archivo:File=File.applicationDirectory;
var target=new File(archivo.nativePath + "\\TempImagesZoom");
archivo=archivo.resolvePath("image1.jpg");
var targetParent:File=target.parent;
targetParent.createDirectory();
target=target.resolvePath("small.jpg");
archivo.copyTo(target,true);
archivo=File.applicationDirectory;
target=new File(archivo.nativePath + "\\TempImagesZoom\\big.jpg");
archivo=archivo.resolvePath("image1Big.jpg");
archivo.copyTo(target,true);
trace("Archivocopiado.");
cube.visible=false;
btnFront.visible=false;
btnLeft.visible=false;
btnRight.visible=false;
btnBack.visible=false;
btnUp.visible=false;
btnDown.visible=false;
btnFront.enabled=true;
var i=new Loader();
this.addChild(i);
i.load(new URLRequest("lupa.swf"));
}
Thanks.