flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: No access to MX:SWFLoader "content" after dynamic loading a SWF file
Date Tue, 02 Dec 2014 01:16:46 GMT
Sounds like AIR Security Model stuff.  See “Adobe Air sandbox” in this
article [1].  A commonly used workaround is to use byte array as described
in the first answer here [2].

HTH,
-Alex

[1] 
http://www.adobe.com/devnet/flashplatform/whitepapers/runtime-security.html
[1] http://s.apache.org/AdobeAIRRuntimeSecurity
[2] 
http://stackoverflow.com/questions/2713865/how-to-run-an-external-swf-insid
e-a-flex-application
[2] http://s.apache.org/ByteArraySWFLoader

On 12/1/14, 3:43 PM, "Jerry Hamby" <jerryhamby@vdex.com> wrote:

>I have in my Flex app (Apache SDK  4.12.1):
><mx:SWFLoader id="loader1" creationComplete="swfLoaded(event)"
>complete="contentLoaded(event)"/>
>
>I use the code below to find the SWF file: (this seems to work for both
>the desktop and on my Android device)
>var theFile_ApplicationStorageDirectory:File =
>File.applicationStorageDirectory.resolvePath("/swfs/welcome_16_9.swf");
>var thePath:* = theFile_ApplicationStorageDirectory.nativePath;
>loader1.load(thePath);
>
>this works fine now after hours of research but the problem is that I
>can't get access to "loader1.content", it is always null.
>I need it so I can do an addEventListener:
>loader1.content.addEventListener("MessageFromFlash", doSomething);
>
>I get the "swfLoaded" event but not the "contentLoaded" event.
>
>Any clues on why the loader1.content is NULL?
>
>Jerry

Mime
View raw message