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 03-06-2008, 10:23 AM   #1
Ricardinho
Registered User
 
Join Date: Nov 2007
Posts: 6
Default Adobe Air Security Issue??

So ive just really got to grips with AS2 then AS3 kicks me right in the balls!!

Im trying out a Air app where you simply drag and drop a jpg onto the app and it loads the jpg.. its from a flv tut from gotoandlearn.com.

the problem im having is i want to drag and drop jpgs from a browser window and have it load. Its weird because the process works in the .swf format but when published in Air it cant pick up the Url/path anymore???

(desktop drag and drops work fine as it can find the path)

Heres the code:
Code:
import flash.desktop.NativeDragManager;
import flash.events.NativeDragEvent;
import flash.desktop.ClipboardFormats;

var imageLoader:Loader = new Loader();
dropBox.addChild(imageLoader);



this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, onDragEnter);
this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onDragDrop);

function onDragEnter(e:NativeDragEvent):void{
	var fa:Object = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT);
	
	if(fa[0].extension=="jpg"){
		NativeDragManager.acceptDragDrop(this);
	}
}

function onDragDrop(e:NativeDragEvent):void{
	var fa:Object = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT);
	
	imageLoader.load(new URLRequest(fa[0].url));
	//trace(fa);
}

what do i need to do to alter:

imageLoader.load(new URLRequest(fa[0].url));

to make it get the correct path? or is this simply a security problem/issue?

Why does the .swf work but not the Air app?

And finally i tried to trace the issue but how can i trace when publishing in Air?

Any help would be great. Thanks!
Ricardinho 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
Security Issue Loading External Files lloydmav Components 18 08-19-2008 06:59 AM
Adobe AIR Beta 2 has been released today! CyanBlue AIR (Apollo) 7 10-05-2007 05:59 PM
Flash Security issue with LoadVars marrek ActionScript 2.0 5 03-14-2007 09:16 PM
Flash / XML security / access issue... daveystew Other Flash General Questions 0 04-08-2006 10:03 AM
Security Questions & Issue TeitanErim Server-Side Scripting 3 07-14-2005 07:43 PM


All times are GMT. The time now is 07:41 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.