PDA

View Full Version : Air Sucks: Can't type cast loaded child to Interface


Flash Gordon
03-23-2009, 12:38 AM
Attached is an example of the problem. It works fine if all files are in the sample directory, but if they aren't that's when AIR can not type cast the loaded object to the Interface of which it is. I'm thinking it's a global security setting but I can't find anyway to change it like I can in a SWF by the Global Settings Manager. I also can't find anything on Google about this...darn.

AIR SUCKS! Help?????

EDIT: oh...i think it has something to do with using the full hard drive path. That's seems to be what kills it....DOH!. still need help though.

Keywords: Adobe AIR, interface, superclass, parent, child, interface, typecast, type, cast, swf

fx.barrett
03-23-2009, 09:26 PM
Yeah, it seems to be something with the path... maybe different security features are applied when you are giving full hdd path, no idea. I hope you know that development in Flash sucks ?

Flash Gordon
03-24-2009, 01:36 AM
yeah, and Flex sucks too! :p

still clueless how to get around this. I can't even type it as a generic object and make calls on it...sad :(

evride
03-24-2009, 06:04 AM
nevermind

fx.barrett
03-24-2009, 08:10 AM
yeah, and Flex sucks too! :p

still clueless how to get around this. I can't even type it as a generic object and make calls on it...sad :(

As a generic object? You mean youObj.loadSWF() ? Because I tried that and it was working fine if you leave it as MovieClip and don't cast it to ISWF.

Anyway, when using AIR, it's recommended to use the or the application directory, or the application storage directory, or a temp dir or wherever you want to store stuff instead of having your own "crazy" path set up ( in case you are planning on distribution then don't forget that nor Mac and Linux paths are not the same as Windows... so C:\... will be totally bad ). I'm not even sure what you are trying to do there...

Flash Gordon
03-24-2009, 08:40 AM
The example is just a stripped down version of the problem I'm having. It doesn't have to make a lot of sense past showing what isn't work. For my situation, I don't think I'll be able to move the files around. Where ever they are they are.

The problem is very similar to swf's in general when they are outside of the "trusted zone." There doesn't appear to be a trusted zone you can set for AIR....