2 Replies Latest reply on Feb 25, 2009 7:24 AM by SiHoop

    Problem loading a component into a swf

    SiHoop Level 1
      I'm having trouble loading a component created in Flex into a swf created in Flash. The Flex file loads into the Flash swf, but the component does not work and generates an error when selected. The code below is in 2 parts and illustrates the problem. Part 1 is placed in Flash on frame 1 of the main timeline. Part 2 is in Flex. Both files must be saved in the same folder and Part 2 must be created before Part 1. Why won't the component work and how can I correct the problem. Thanks!
      Part 1:
      var request:URLRequest = new URLRequest("Practice.swf");
      var loader:Loader = new Loader()

      Part 2: File name Practice.mxml
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      import mx.collections.ArrayCollection
      [Bindable]private var comboBox0:ArrayCollection = new ArrayCollection([{label:"Semester"}, {label:"Fall"}, {label:"Spring"}]);
      <mx:ComboBox dataProvider="{comboBox0}"/>