1 Reply Latest reply on Feb 12, 2007 8:54 AM by frenchi30

    SWFLoader + Drag

    frenchi30 Level 1
      Hi All,

      Hoping someone can help me in the right direction here. I have an area where I load a swf file and I want to be able to drag and zoom it. It works fine, except a few bugs... When the loaded swf is zoomed in, the swf is clipped to the boundaries of the SWFLoader (which is good), the drag also works fine. However, when the loaded swf is dragged from the initial loaded state (which is fitted inside the window) it is not clipped, and drags all over the stage.
      Basically what I am asking is: How can I have Flex automatically clip the SWFLoader content when it is dragged outside the SWFLoader boundaries??
      Will I have to create a mask?
      When it is zoomed... it is clipped and there are no problems for dragging afterwards, but for the initial state it is not clipped. Seems to me in the backend, I will end up with 2 masks, which seems redundant.. or am I way off base here?

      This is my set up:

      <mx:HBox id="myHbox"
      autoLayout="false"
      width="100%"
      height="100%"
      verticalAlign="middle"
      backgroundColor="white"
      horizontalScrollPolicy="off"
      verticalScrollPolicy="off"
      horizontalAlign="center">

      <mx:SWFLoader id="mySwfLoader"
      width="100%"
      height="100%"
      source="mySwfFile.swf"
      verticalAlign="middle"
      horizontalAlign="center"
      mouseDown="mySwfLoader.startDrag();"
      mouseUp="mySwfLoader.stopDrag();"
      useHandCursor="true"
      showBusyCursor="true"
      buttonMode="true"
      mouseChildren="false"/>

      </mx:HBox>

      Thanks in advance