2 Replies Latest reply on Nov 16, 2006 11:23 AM by dallaswebb

    Loading multiple swfs crashing browser

    dallaswebb Level 1
      I'm attempting to 'replicate' Jesse Wardens Captivate player in Flex. It's not that I don't like your player Jesse...but our users can't seem to figure out that they need to click a drop down to select new sections. Your player rocks.;)

      Here's what it looks like so far:

      I'm loading a XML doc using HTTPservice (myRequest.send(); gets called on app init).
      <mx:HTTPService id="myRequest" useProxy="false" fault="faultHandler()" result="resultHandler()" />

      private function resultHandler():void {
      myDG.dataProvider = myRequest.lastResult.captivate_playlist.swf; }

      Then I'm using a datagrid component to display available captivate movies.

      <mx:DataGrid x="10" y="10" width="100%" height="100%" id="myDG" change="onDataGridChange(event)">
      <mx:DataGridColumn dataField="name" sortable="false" headerText="Title" />

      When a user clicks a datagrid row, call onDataGridChange() which does this:
      private function onDataGridChange(event:Object):void {
      swfDisplay.source = myDG.selectedItem.src; }

      Which updates the source value of mx:image
      <mx:Image width="100%" height="100%" maintainAspectRatio="true" scaleContent="true" id="swfDisplay" />

      There are no complie or runtime errors. When clicking through the datagrid grid many times..(which users will
      do) the browser crashes...IE, Firefox, Safari, [MAC or XP].

      Maybe instead of change the swfDisplay.source I should be using a AS function using the loader class????? If so, I'm having a heck of time make that work...or even make since.

      The way I set this up made since to me, but I'm a brand new Flex coder. Any insight is appreciated.