0 Replies Latest reply on Feb 15, 2007 10:10 AM by Xyan_Wert

    Swapping problem

    Xyan_Wert
      Hi there, the thing is that i have a problem swaping the Z-index betwen an Imagen Object and a Dropdown list from a combobox...

      i mean i have something like this..

      <mx:Application creationComplete="recordScreen()">
      ...
      <mx:Script>
      ...
      private function swapCursor(o:DisplayObject):voiid
      {
      ...
      this.parent.swapChildren(o, this.imageCursor);
      ...
      }

      public function recordScreen():vouid
      {
      //start record
      }

      public function playRecordedActinos():void
      {
      ... //some stamets
      swapCursor (DisplayObjecy(obj.dropdown)) ;// this object makes reference to the dropdrown list within the combobox
      ..,//more stuff
      }
      </mx:Script>
      <mx:Canvas id="canvasID">
      <mx:Combobox id ="cboxid">
      <dataprovider>
      <item1>
      <item2>
      </dataprovider>
      <mx:Image souce="images/cursor.png" />
      </mx:Canvas>
      <mx:Application>

      The basic idea is record in a few arrays the actinos of the screen the reproduce em, ok, the real problem is im using an "cursor image" to simulate the mouse.. but when my cursor image goes by the DropDown list of the combobox its under the list not in front of it, like i want, i tried the swap thing but its not working because the dropdown list its acually not a children of the Canvas object its looks like it not even children of the Application object.. the parent of the dropdown list is the same parent of the application (wierd.., i think thats bc is redrawed in realtime...?_? ), so.. how can i solve this.. ? how can i swap the z-index of a image with a z-index from a DropDown list?

      any ideas?