Possible ways to manipulate dynamically drag Proxy

Hello,
i'm trying to use drag&drop manually over a custom Image class: i can drag it's position or drag to resize, handling form the corner.
I'm even using a custom proxy, deep copying the same image. It works fine for dragging the image around, but i can't see how to
resize the proxy while i drag to resize.
Is there something i don't do in my updateDisplayList?
     override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);
            square.graphics.clear();
            square.graphics.lineStyle(2, 0x00ff00);
            square.graphics.drawRect(0, 0, this.width, this.height);
or should I write something to access the proxy while occours dragOver? but how can i access the proxy?
private function dragOverHandler(event:DragEvent):void {     
     if (event.dragSource.hasFormat("drag"))
          trace("coordinates: " + event.dragInitiator.x + "," + event.dragInitiator.y + " " + event.currentTarget.mouseX + "," + event.currentTarget.mouseY);
     if (event.dragSource.hasFormat("resize"))
          trace("size: " + (event.currentTarget.mouseX - event.dragInitiator.x) + "x" + (event.currentTarget.mouseY - event.dragInitiator.y));
I googled around but i couldn't find anything useful
Message was edited by: maestro91

Alex, at the moment i have an extended component UserImage with some support for
hilighting when clicked, drawing a rectangle over the image in updateDisplayList
showing a different cursor when clicked, one for the usual dragging, another for resizing when it's near the bottom-right corner
change the proxy showing using the dragged image
change the proxy showing using the resized image (this is not working)
So you say to treat the drag phase different from the resize phase, using dragmanager for the first and simple mouse events for resizing?

Similar Messages

  • Is there any way to add dynamic parameter in sql without breaking Server Behavior

    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    For example:
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    will become something like this:
    $additionalSQL=", article.articleName_en";
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc $additionalSQL FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    this is just an example, my real scenarion is far more complicated than this... however this kind of approach break the server behavior and force to do hand-coding...
    i would like to know if there's better way to do such thing like this...

    viktor.iwan wrote:
    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    Server behaviors are simply bits of boilerplate code automatically generated by Dreamweaver. Editing the code doesn't "break" it (unless your edits are badly written). However, once you edit the code, Dreamweaver no longer recognizes it, so you lose the ability to drag recordset results from the Bindings panel.
    If you want to edit server behavior code, the best way to handle it is to lay out your page as you want, using the Bindings panel. Once everything has been done, only then edit the server behavior code.

  • What is the best way to manipulate text?

    What is the best way to manipulate text in Photoshop?  Let's say I need to edit an "A" and I want to stretch out the bottom corners of the letter, while not moving the upper portion (wide bottom, skiny top)... what is the best way to do this?  I know the "skew" function somewhat moves corners, but I want to take the binding boxes (while in the skew function) and move them individually so it doesn't affect another corner. Is this possible (or am I just crazy?!?!)?

    Not sure I get all the nuances of what you want, but have you tried invoking Free Transform, (CTRL+T) then holding down CTRL while clicking/dragging a corner handle?

  • Is there any possible ways to get the MAC address?

    Hi guys:
    I am writing servlets on the server side. Is there any possible ways to get the MAC address when a HTTP request come in? Thank you very much for any helps.
    all the best!

    It is usually impossible to get the MAC address of the maker of a HTTP request in any programming language or system.
    At best, you can get the MAC of the closest intervening router, firewall, whatever.
    Are you sure you mean the MAC address? MAC looks like this: 8:ab:f0:0:71:bb:90 (Ethernet), or 01-23-45-67-89-ab (Token Ring), etc, depending on your network type.
    In contrast, an IP address looks like this: 209.249.116.195. If you want the IP address, check out the javadoc for HttpServletRequest and ServletRequest. Caveat: load balancers, web caches, proxy servers, etc will mask the "true" peer's address. Don't do anything silly like try to use the IP address for security or authentication.

  • Possible ways to address Warranty Functionality

    Hi Experts,
    What are possible ways to provide solution for Warranty functionilty for procured Materials.
    Ramesh

    It is usually impossible to get the MAC address of the maker of a HTTP request in any programming language or system.
    At best, you can get the MAC of the closest intervening router, firewall, whatever.
    Are you sure you mean the MAC address? MAC looks like this: 8:ab:f0:0:71:bb:90 (Ethernet), or 01-23-45-67-89-ab (Token Ring), etc, depending on your network type.
    In contrast, an IP address looks like this: 209.249.116.195. If you want the IP address, check out the javadoc for HttpServletRequest and ServletRequest. Caveat: load balancers, web caches, proxy servers, etc will mask the "true" peer's address. Don't do anything silly like try to use the IP address for security or authentication.

  • I  have  purchased   british library  apps.  but  unable  to  access   the  collection   even  i  bought one month  subscription.   done  all  possible   way .  .

    i  am  facing  a  real trouble  to use   British Library apps ,  i have  done   all possible  ways  to    rectify  but invain.  i  bought   one  month subscription as well.

    Well I got something going on here.   I opened Parallels > Windows 7.  Turned on and registered iTunes in Windows.  It asked for an Airplay pin number.   I put one in and I was able to pull up my iTunes library.   But the one in Windows was empty, so I dragged about a dozen movies over from my iMac iTunes into the movie library of the Windows iTunes.  And then I could watch the movies on my TV using ATV from Windows.   For the next couple of hours I kept messing with both iTunes, loosing Apple TV connection to my computer a couple of times.   Now, in order to see my IMac iTunes library, I have to open my iMac iTunes program, then open Parallels>Windows7>iTunes in order to view the videos in my iMac iTunes folder. What is this all about?  Pretty convoluted way to see a movie.
    Also, I cannot figure out how to see my iMac desktop (or drives) on Parallels, so I really don't understand the connection with the two iTune libraries.  Both Libraries do show up on my TV under Apple TV> Computers.
    When I open the Windows iTunes windows, a SHARED section opens  up in my Imac iTunes, on the sidebar.  When I close the Windows iTunes Window, it goes away.  How can I get it to stay on, without using the Windows partition?
    Why didn't the iMac iTunes ask for an Airplay pin?  What is that? 
    Didn't remember seeing anything like this in the Apple Support Communities.

  • Whats the best way to manipulate  data using a Form ??

    I have a few forms and basic navigation and data manipulation I find are rubbish - cos I am rubbish at making it any better.
    I have a customer form (layout style of form) and table, I set up 2 buttons (enter_query & execute_query) to retrieve specific details based on customer ID input by the user. If the specified ID is for the wrong customer I want a button or buttons that will navigate through the IDs one by one until the right customer is found. If it was a tabular form I could do it but can I manage this if the form is not ?
    Once the data is retrieved what is the best way to manipulate and save it ? Can I create a button that has PL/SQL code to UPDATE that particular record or do you guys and girls use the SAVE icon ?
    Finally, I can't work out how to get the right side of the form displayed it seems to miss off an inch or 2. The canvas editor shows the form properly, the window size is just a smidge bigger than the canvas. When the form is run, how can I make the display area for the R/H/S bigger ?
    Thanks in advance.

    Sorry - I had to read up on what a base table block was.
    I think I am. In this particular form I have one block - a customer block which has its items pulled in from the customer table, no problems there, it works fine.
    My problem is I need to make it as user friendly as possible, if the user inputs the wrong customer ID (or does not know their name) I want them to be able to scroll through the customer list using an up or down button.
    When do you have the commit_form statement run, (the OK button) after every change or after a block of changes ? Commit writes the changes to the database giving other users access to that data right ?! How often should it be used ?

  • How to Move from CSV to Table in Physical layer in Best possible way

    We had a project which had the source (physical Layer) as CSV. Now there are moving from CSV to a Table in the Database.
    Can anyone guide through the best possible way to complete the task
    With Regards!
    Steve

    Create a new Database node in the Physical layer with connection pool, create a schema folder and drag your CSV object into the new database - All your BMM mappings and hence Presentation objects will move over seamlessly.
    Might be an idea to simply reverse engineer / import any object from your database to initially create your database connection / tree then simply drag the CSV into it.
    Hope this helps,
    Alastair

  • Having a constant Y position for the drag proxy

    hi,
    is it possible to constrain the image used in the drag proxy
    to just one axis when it is being dragged?
    In other words, I'm trying to create a slider-type effect
    that slides along a numberline.
    the only form of control that i can see relating to
    positioning is 'yOffset':
    quote:
    public static function doDrag(dragInitiator:IUIComponent,
    dragSource:DragSource, mouseEvent:MouseEvent,
    dragImage:IFlexDisplayObject = null, xOffset:Number = 0,
    yOffset:Number = 0, imageAlpha:Number = 0.5, allowMove:Boolean =
    true):void
    any help is appreciated
    finty

    this is how I've approached this (I adapted sample code from
    the documentation):
    (any recommendations are appreciated)
    <?xml version="1.0" ?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    //Import classes so you don't have to use full names.
    import mx.managers.DragManager;
    import mx.core.DragSource;
    import mx.events.DragEvent;
    import flash.events.MouseEvent;
    import mx.controls.Image;
    import mx.containers.Canvas;
    import flash.events.Event;
    //Variables used to hold the image's location
    public var xOff:Number;
    public var yOff:Number;
    // Embed icon image.
    [Embed(source='assets/10c.png')]
    public var globeImage:Class;
    private var imageProxy:Image;
    // Drag initiator event handler, called by
    // the image's mouseMove event.
    private function dragMe(event:MouseEvent,
    img1:Image,format:String):void {
    var dragInitiator:Image=Image(event.currentTarget);
    var ds:DragSource = new DragSource();
    ds.addData(img1, format);
    // The drag manager uses the image as the drag proxy
    // and sets the alpha to 100 (opaque),
    // so it appears to be dragged across the canvas.
    imageProxy = new Image();
    imageProxy.source = globeImage;
    imageProxy.height=globeImage.height;
    imageProxy.width = globeImage.width
    imageProxy.addEventListener(Event.ENTER_FRAME,
    onEnterFrame);
    draggin = true;
    DragManager.doDrag(dragInitiator, ds, event, imageProxy, 0,
    0, 1.00);
    //Function called by the canvas dragEnter event; enables
    dropping
    private function doDragEnter(event:DragEvent):void {
    DragManager.acceptDragDrop(Canvas(event.target));
    draggin = false;
    imageProxy.removeEventListener(Event.ENTER_FRAME,
    onEnterFrame);
    // Function called by the canvas dragDrop event;
    // Sets the image object's position,
    // "dropping" it in its new location.
    private function doDragDrop(event:DragEvent, target1:Canvas,
    format:String):void {
    draggin = false;
    myimg.x = target1.mouseX - xOff
    // myimg.y = target1.mouseY - yOff
    // Helper function called by the dragged image's mouseMove
    event,
    // as the image drags across the canvas.
    // The function updates the xOff and yOff variables to show
    the
    // current mouse location.
    private function myoffset(img:Image):void {
    xOff = img.mouseX
    yOff = img.mouseY
    public var draggin:Boolean = false;
    public function onEnterFrame(event:Event):void{
    if(draggin == true){
    myimg.x = event.currentTarget.mouseX - v1.x -
    (myimg.width/2);
    ]]>
    </mx:Script>
    <!-- The Canvas is the drag target -->
    <mx:Canvas id="v1" width="500" height="500"
    dragEnter="doDragEnter(event)"
    dragDrop ="doDragDrop(event, v1, 'img')" borderStyle="solid"
    backgroundColor="#DDDDDD">
    <!-- The image is the drag initiator and the drag proxy.
    -->
    <mx:Image id="myimg"
    source="@Embed(source='assets/10c.png')"
    mouseMove="dragMe(event, myimg,
    'img');myoffset(myimg);"/>
    </mx:Canvas>
    </mx:Application>

  • Correct way to manipulate data form

    Hi expert,
    i need to ask you something about the correct way to manipulate the data in a system form.
    I need to Create a New Quotation Form and to fill "CardCode" and "Project" field.
    What is the correct way to do that?
    Actually, I made these steps:
    1) Open a New Quotation form from a button using SBO_Application.ActivateMenuItem("2049");
    2) Connect to "CardCode" Item using oCardCode = (SAPbouiCOM.EditText)oQuotationForm.Items.Item("4").Specific;
    3) Change the value of "CardCode" using oCardCode.Value = sCardCode;
    I ask you: is possible to create an object containing this data and bind the object to the Form instead of create a Form and manipulate data from it?
    Thanks for your answers.
    Jonny Cortonicchi

    hi.
    you said that  for copying the cardcode
    this is good..
    oCardCode = (SAPbouiCOM.EditText)oQuotationForm.Items.Item("4").Specific;
    ok u r asking for project code under Accounging
    As per my knowledge no need to click account tab ..ok
    exactly like this way...
    oCardCode = (SAPbouiCOM.EditText)oQuotationForm.Items.Item("4").Specific;
    dim project as string= "your_desird_project_code"
    oform.items.item("157").specific.value= project..
    plz check it...
    i think currect..
    just try..
    if u get any problem update me..
    other wise wait for expert suggestion..
    maximum it will work no need to click on account tab..
    if the item is not focused also does not the matter.. it will past  the value..
    just try..

  • New way to do Dynamic Icons in Flex

    Hi All,
    I figured out another way to make dynamic icons in Flex:
    Flex Code:
    In the container mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
    paddingLeft="2" paddingRight="2" horizontalGap="2">
    <mx:Script>
        <![CDATA[
       import mx.core.Application;
      [Bindable]
      [Embed(source="common/swf/dynamicIcon.swf") ]
      public var isDynamicIcon:Class;
            ]]>
    </mx:Script>
    <mx:Image id="ico_mag_sm" source="{isDynamicIcon}" />
    <mx:Spacer width="1"/>
    <mx:Text id="_name" text="{data.ApplicationName}"
    paddingLeft="5" selectable="false"/>       
    </mx:HBox>
    In the Applicaton mxml:
    <mx:Script>
        <![CDATA[
        i// ActionScript file
            import inc.ApplicationProperties;
            //NOTE: do NOT type the commonPath variable. Typing it to String breaks the code.
             public var commonPath = ApplicationProperties.COMMON_PATH;//this is the url to the server where the icons are located.
            ]]>
        </mx:Script>
    dynamicIcon.swf AS 3.0 code:
    stop();
    var iconFolder:String = "inc/icons/";
    var  parentArray:Array = new Array();
    //find the highest display container
    function getIconName(myObject){
          while (myObject.parent){
             myObject = myObject.parent;
              var topParent = myObject;
             var objectName:String =  myObject.name;
             parentArray.push(objectName);
        // for some reason I can't just set the iconName equal to the myObject.name. The only way I could get it to work is to push
       //it onto an array first and then access it in the array.
          for(var i:Number=0;i<parentArray.length; i++){
              if(parentArray[i].indexOf("ico_")==0){
                 var  iconName:String = parentArray[i];
                 break;
         var myURL:String =  topParent.getChildAt(0).application["commonPath"];
         var  loadPath:String = myURL+iconFolder+iconName+".png";
         var loadit =  new Loader();
         addChild(loadit);
         loadit.load(new  URLRequest(loadPath));
    getIconName(this.parent);
    BUT, I am new to Flex and AS 3.0 and I know this code is uglier than it needs to be and have the following two issues.
    1) In the AS 3.0 code, to determine the parent application, I should be able to just reference the parent application directly rather than have to iterate through .parent.  Since I am using the Image tag and not using a loader, the only way I could figure out how is to iterate thought .parent. Is there a more direct way to get the parent or more specifically, the COMMON_PATH attribute of the ApplicationProperties class?
    2) In the AS 3.0 code, for some reason, I could not just stick the retrieved myObject.name in into the iconName variable and add it to the URL string. Just out of desperation, I pushed it onto an array first and then accessed it and it worked.
    Anyone got any ideas on either or both item 1 or 2 above?
    TIA,
    Steve

    I should have been more clear. This largely based on I am Link's method to create dynamic icons in a datagrid:
    http://blog.tygate.com/?p=359
    I just took it a step further.

  • Is it possible to display only dynamically selected fields in the out put?

    Is it possible to display only dynamically selected fields in the out put? i need to display set of columns in the selection criteria, but in the output i have display only input given fields. because i need to convert it into .csv file. So i have to display selected fields from internal table. In oracle they are using"execute immediate". is there any equivalent in SAP?
    thanks in advance.

    Hi Remya,
    Are you talking about dynamic programming in ABAP ?
    If yes, there are concepts like RTTS which facilitates it.
    Yes, the select query also supports dynamic selection of fields. ( Please care about ( ) in dynamic sql ).
    Do more research on Field Symbols and statements like ASSIGN COMPONENT OF.
    Regards,
    Philip.

  • On my iCloud account I can see an alternate email ID which can be used to login to my account, this email ID does not belong to me so I need to delete it. Please advice the best possible way as it does. It show any option to delete that ID

    On my iCloud account I can see an alternate email ID which can be used to login to my account, this email ID does not belong to me so I need to delete it. Please advice the best possible way as it does. It show any option to delete that ID

    Do the alternate e-mail address ends with me.com or icloud.com?

  • Okay I have an apple IPod touch 4g 8gb and it will not turn on or charge or even show that the ipod needs to be charged so I am wondering if my IPod needs to be sent in to be fixed or if I should get a new one or if there is a possible way to recover it??

    This is the first time it shut off and would not charge what so ever. The battery was charging and then it went blank and now it has been blank for awhile is there any possible way that the ipod itself can be turned on or even show up the needs to charge screen I do believe that the battery has gone bad and would like to know if this would cost to be replaced sense its not within the one year warenty????
    If it does cost me I would like to know how much and where could I get it replaced at or have it referbished??????

    Try here:
    iOS: Not responding or does not turn on
    Apple will exchange it for a refurbished one for this price.
    Apple - Support - iPod - Repair pricing

  • I have a earphone with mic but it doesn't work on my iPod 4G. Could there be a possible way to fix it. Please help :)

    I have a earphone with mic but it doesn't work on my iPod 4G. Could there be a possible way to fix it. Please help.
    -Reyner

    Hi chrissyfromrenton,
    you just have to close completely you Ipod (push 5-10 seconds on the button to open/close you ipod and slide the turn off) after open the ipod and it suppose to be correct I hope I answer to your question!
    Annie

Maybe you are looking for

  • How do I get my calendar on my ipad (3) to sync with my calendar on my iphone 4s? Please help driving me nuts!!

    Whenever I enter a calendar date into my iPad, it does not update on my iPhone or icloud.  However, if I make the calendar entry on my phone or icloud, it updates on my iPad.  I've tried everthing that I'm supposed to (at least I think so) using prev

  • Pefect display for Mac Mini, recommendations sought

    I'm thinking of upgrading. I currently have a pair of 17" G5 iMacs and I'm considering my options. I'm leaning towards Minis for a few reasons: 1. The spec is good enough for what I want. 2. The new iMacs are just too big for where I want to put them

  • Urgent: Advice needed for buying my first RAID

    Hi, I am looking to place an order today as I have a pile of editing to get through - so I would love to hear your recommendations! First of all I am a networking and RAID newbie so don't go all acronym and geek-speek-tastic on me or I won't have a c

  • Inner Join in oracle 10g

    Is it possible to use inner join in oracle 10g?

  • Miro with reference to PO

    hi, i have 2 scenario for credit memo and subsequent credit which is referenced to PO. the item purchased is based on moving average price. 1) when vendor invoice comes in, quantity difference, say missing 5 box (original 20 box). i will create the i