Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7953633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:12:12+00:00 2026-06-04T03:12:12+00:00

I work with TileList to display image like a gallery. At start, I activate

  • 0

I work with TileList to display image like a gallery.
At start, I activate only drag option.

<mx:TileList xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         columnWidth="120"
         rowHeight="150"
         paddingLeft="2"
         paddingRight="2"
         paddingTop="2"
         paddingBottom="2"
         itemRenderer="fr.ui.display._43Imagerie.TileUnit2"
         doubleClickEnabled="true"
         dragEnabled="true"
         dropEnabled="true"
         dragMoveEnabled="true"
         verticalScrollPolicy="on"
         >

Now I try to add multiple selection possibility.

ItemRenderer is :

<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" 
       verticalScrollPolicy="off" 
       horizontalScrollPolicy="off"
       width="120"
       height="150"
       borderVisible="false"
       xmlns:s="library://ns.adobe.com/flex/spark"
       creationComplete="onEvent()"

       >
<mx:Script>
    <![CDATA[
        import fr.util.imageTransform;

        import mx.controls.Image;
        import mx.core.UIComponent;
        import mx.events.DragEvent;
        import mx.managers.DragManager;

        import org.osmf.utils.URL;

        import spark.effects.Rotate;

        [Bindable]
        [Embed(source="icon/imagerie/rotate.png")]
        private var rotationArrowClass:Class;

        private var _file:File;
        private var _selected:Boolean;
        private var _sauvBMD:BitmapData;
        public var wasScaled:Boolean = false;
        public var deleted:Boolean = false;
        private var bgCenterX:Number;
        private var bgCenterY:Number;
        private var _dragDownPt:Point;

        [Bindable]
        public var angle:int = 0;

        private var dragBitmapData : BitmapData;

        private function onEvent():void
        {
            // iconCanvas.addEventListener(MouseEvent.DOUBLE_CLICK, onDoubleClick);
            // double click gere ds wPlanchePhoto3

        }








        private function rotationImage(e:MouseEvent):void
        {

            var rot:Rotate = new Rotate();
            rot.angleBy = 90;
            rot.duration = 1000;
            rot.autoCenterTransform = true;
            rot.target = iconCanvas;
            rot.play();

        }

        private function radiansToDegrees(radians:Number):Number {
            var degrees:Number = radians * (180 / Math.PI);
            return degrees;
        }

        private function degreesToRadians(degrees:Number):Number {
            var radians:Number = degrees * (Math.PI / 180);
            return radians;
        }

        public function set image(im:BitmapData):void
        {
            this._sauvBMD=im;
        }

        public function get image() :BitmapData
        {
            return this._sauvBMD;
        }



        protected function iconCanvas_mouseDownHandler(event:MouseEvent):void
        {

            // on enregistre la point de départ 
            _dragDownPt = new Point(mouseX,mouseY); 
            // puis on écoute l'éventuel déplacement de la souris 
            this.addEventListener(MouseEvent.MOUSE_MOVE,_onMouseMoveDuringDrag);


        }

        private function _onMouseMoveDuringDrag(evt:MouseEvent):void {
            // astuce pour s'assurer que la souris a vraiment bougee volontairement 
            if(Math.abs(_dragDownPt.x - mouseX) <= 2 && Math.abs(_dragDownPt.y - mouseY) <= 2)
                return; 

            else{
                dragBitmapData = new BitmapData(iconCanvas.width, iconCanvas.height,true, 1);
                dragBitmapData.draw(iconCanvas);

                var transfert:Clipboard = new Clipboard();
                transfert.setData(ClipboardFormats.BITMAP_FORMAT,Bitmap(iconCanvas.content).bitmapData);

                // only allow the file to be copied
                var dragOptions:NativeDragOptions = new NativeDragOptions();
                dragOptions.allowMove=false;
                dragOptions.allowCopy = true;
                dragOptions.allowLink = false;

                // begin the drag
                NativeDragManager.doDrag(this, transfert, dragBitmapData, null, dragOptions);
            }
            // dispatch de l'event depuis le parent pour pouvoir écouter cet event dans l'application 
        }



    ]]>
</mx:Script>

<s:BorderContainer
                   id="bcImage"
                   width="120"
                   height="99%"
                   borderVisible="true"
                   borderColor="#FFFFFF"
                   borderWeight="1"
                   cornerRadius="6"
                   backgroundAlpha=".4"
                   backgroundColor="#5f5f5f"
                   >




    <mx:Canvas id="cvsImage" width="100%">
        <mx:SWFLoader id="rotationArrow" source="{rotationArrowClass}" height="18" width="18" x="3" y="3" visible="true" click="rotationImage(event);" alpha=".5"/>
        <s:Label x="23" y="3" width="82" fontSize="11" fontWeight="normal" text="{data.imDate}"
                 textAlign="right" color="#000000"/>    


        <mx:Image id="iconCanvas" x="10" y="20" width="99" height="99" horizontalAlign="center"
                  maintainAspectRatio="true" scaleContent="true"
                  source="{data.imURL}" 
                  verticalAlign="middle" mouseDown="iconCanvas_mouseDownHandler(event)"
                  >

        </mx:Image>
    </mx:Canvas>

    <s:VGroup width="100%" y="124" height="25" bottom="1" left="3" right="3" paddingBottom="0" paddingTop="4" gap="0">
        <s:Label text="{data.imType}" height="50%" fontSize="10" paddingBottom="1"
                 fontWeight="normal" width="99%" textAlign="center" color="#000000"/>
        <s:Label text="{data.imStade}" fontSize="10" textAlign="center" paddingTop="1"
                 fontWeight="normal" width="99%" color="#000000"/>  

    </s:VGroup>

</s:BorderContainer>

If this option is true (allowMultipleSelection), drag stop to work, do you know why?

Thanks for helping.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:12:14+00:00Added an answer on June 4, 2026 at 3:12 am

    Adding allowMultipleSelection=”true” worked just fine for me. I am running on a Mac with latest version of Flash Player. It seemed a bit flaky at first but after refreshing the page it worked just fine. Only thing I didn’t have in my project was your data provider and item renderer. I really doubt your item renderer would cause an issue unless you are doing something crazy in there. Check to see if you have the latest Flash Player.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Work on the following website: http://cetcolor.com The masthead graphic with the Read About It
I work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit
I work on code something like this ... HEADERS ... int *var; void child()
Work on Asp.Net C# VS08 I would like to assign a value to Session
My work has over 24 pages in Latex. I need only the abstract and
At work, I have a large table (some 3 million rows, like 40-50 columns).
I work for an audio recorder app and would like to add gain control
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.