1 Reply Latest reply on Oct 16, 2008 2:38 PM by Gregory Lafrance

    How to load network resource at runtime

    JZBAO Level 1
      I want to load this cartoon in my Flex app: http://www.bestanimations.com/Earth&Space/Earth/Earth-02-june.gif
      with the code below:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="610" height="124" backgroundColor="#AAAAD1" borderColor="#8CA9BD">
      <mx:Image source="@Embed(' http://www.bestanimations.com/Earth&amp;Space/Earth/Earth-02-june.gif')" scaleContent="true" autoLoad="true" id="logo" top="10" left="202" bottom="10" width="212"/>
      <mx:Label text="Earth, Moon." height="17" y="107" width="212" x="202" fontSize="10"/>
      </mx:Canvas>
      </mx:Application>

      The errors I got are
      Unable to transcode http://www.bestanimations.com/Earth&Space/Earth/Earth-02-june.gif
      Network resource can not be embedded at compile time; Please use local file or load the resource at runtime