• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

unable to load external image into iOS app with AS3

New Here ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

Just trying out Flash Builder for iOS app development and have run into a problem right off the bat with loading an external image into an iOS app.  The actionscript is very simple (this was basically my Hello World attempt), and I'm hoping someone here can explain where I'm going wrong.  This code works in Flash Pro, and works when launched on the desktop from Flash Builder, but doesn't work on my iOS devices.

 

Here's the code:

                              var container:MovieClip = new MovieClip();

                              addChild(container);

                              var imageLoader:Loader = new Loader();

       imageLoader.load(new URLRequest("http://www.google.ca/intl/en_ALL/images/logos/images_logo_lg.gif"));

                              imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, startListener);

  function startListener (e:Event):void{

                                             container.addChild(imageLoader);

                              }

Any thoughts on why this won't work would be greatly appreciated!

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2012 Mar 29, 2012

Copy link to clipboard

Copied

Did you try to load policyFile first?

Security.loadPolicyFile("http://www.google.ca/crossdomain.xml");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2012 Sep 10, 2012

Copy link to clipboard

Copied

LATEST

I had the same issue, and modified my domain policy file as specified  in http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html#_Configuring_URL_Meta-Polici... but the loader is not loading the file. Any ideas on how to fix this issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines