Re: [flexcoders] Tempermental URLLoader.load()

2012-03-25 Thread claudiu ursica
Can you paste the whole class?
I did experience issues with Sound.load() this week , so I went and load the 
sounds via URLLoader. I found it odd at least sound load failed to provide any 
feedback sometimes. Yet wit URLLoader I always got something whether complete 
or error. 


C




 From: Alex Harui aha...@adobe.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com 
Sent: Sunday, March 25, 2012 5:32 AM
Subject: Re: [flexcoders] Tempermental URLLoader.load()
 

  
Maybe you are adding listeners to the wrong thing?  Because you should get 
those events when it does work.


On 3/24/12 4:00 PM, nagaofthesea nagaofthe...@yahoo.com wrote:



 
 
   

Howdy All-

PROBLEM:
Strange URLLoader.load() behavior: sometimes it works; sometimes it doesn't.  
Can't step through airglobal.swc to see what's wrong.

DETAILS:
I am using the latest SDK in several versions of an AIR project.  The core 
code is identical across versions of the project.  Most changes are just in 
the presentation of the data.

I am a Cairngorm nut and I have extended it to suit my coding style.  I have a 
master AbstractCommand that addresses everything including listener 
add/remove, SQLite management, remote services, and File reading/writing.  I 
just override certain functions as needed.

In this project I read RSS beginning with the following:

override public function execute(event:CairngormEvent):void
{
 trace(LoadFeedCommand.execute() called);

 var rsso:RSSObject = LoadFeedEvent(event).feedObject;
 var urlRequest:URLRequest = new URLRequest(rsso.url);

 loader = new URLLoader();
 addListeners(loader);

 try
 {
 loader.load(urlRequest);
 trace(loader.load() called);
 }
 catch(error:Error)
 {
 trace(problem with loader.load());
 }
 
 tModelLocator.displayModel.selectedRSSObject = rsso;
}

In some of the projects URLLoader.load() works as expected.  In others with 
IDENTICAL code it does not. URLLoader.load() fails into nothingness.  The 
catch clause does not throw an Error.

I have added the following listneres in overrided .addListeners() and nothing 
gets called!

override public function addListeners(target:Object):void
{
 target.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
 target.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, onHTTPStatus, 
false,0, true);
 target.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
 target.addEventListener(Event.OPEN, onOpen, false, 0, true);
 target.addEventListener(ProgressEvent.PROGRESS, onProgress, false, 0, true);
 target.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, 
false, 0, true);
}

Any insight on this would be wonderful.

Thanks,
-Naga

 
   



-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
 
 

[flexcoders] flash.desktop.NativeDragManager.isDragging remains true

2012-03-25 Thread eugene_se
The problem occurs when I'm dragging an object from one AIR window to another 
AIR window and the drag is not accepted by the target window.

isDragging remains true, causing all further drag operations to fail.

The problem doesn't occur when a component in the target window accepts the 
drag  drop.

- Is there any way to set isDragging to false?

I already tried this, but that didn't work.

import mx.core.mx_internal;
use namespace mx_internal;
DragManager.mx_internal::endDrag();

- I also wonder how many DragManagers are involved if you have an AIR 
application and a number of spark Windows (defined using s:Window). I suspect 
that there is a DragManager for the application an one for each Window. If this 
is true, then somehow the communication between the DragManagers seem to fail 
if a drag operation is not accepted.

Anybody an idea?