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

  • Home
  • SEARCH
  • 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 6250639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:27:46+00:00 2026-05-24T13:27:46+00:00

When I start a drag operation I would like to be able to highlight

  • 0

When I start a drag operation I would like to be able to highlight the possible valid Drop objects. For this I need to know when the drag operation starts and which items are being dragged. I am trying to do this using the dragStart, but the event.dragSource is null on this event.

I have this list:

<s:List
    width="100%"
    height="100%"
    id="productsListing" 
    dragEnabled="true"
    dataProvider="{products}"
    dragStart="dragStartHandler(event);"
    dragComplete="dragCompleteHandler(event);"
    itemRenderer="views.productListed" />

And I have the listener as:

public function dragStartHandler(event:DragEvent):void {
    var itemsVector:Vector.<Object> = event.dragSource.dataForFormat('itemsByIndex') as Vector.<Object>;
    //Verify Items
    //Highlight appropriated dropZones
}

Anyone have a good sugestion how to overcome this?

  • 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-05-24T13:27:47+00:00Added an answer on May 24, 2026 at 1:27 pm

    The problem here is that your dragStartHandler is taking higher precedence than the List components internal dragStartHandler – which is where the drag operation is started and the dragSource property created.

    Suggestion, manually add your dragStartHandler with a lower precedence than the List components dragStartHandler method – looking at the code this needs to be less than -50.

    MXML Code:

    <s:List width="100%" height="100%"
            id="productsListing"  
            dragEnabled="true"   
            dataProvider="{products}"
            initialize="productsListing_initializeHandler(event)"
            dragComplete="productsListing_dragCompleteHandler(event)"
            itemRenderer="views.productListed"
            />
    

    AS Code:

    protected function productsListing_initializeHandler(event:FlexEvent):void
    {
        // Needs to be handled AFTER the List component has handled the event and attached the dragSource data, hence priority is -51
        this.productsListing.addEventListener(DragEvent.DRAG_START, productsListing_dragStartHandler, false, -51, true);
    }
    
    protected function productsListing_dragStartHandler(event:DragEvent):void
    {
        // Your code here...
    }
    

    I hope you find that useful.

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

Sidebar

Related Questions

When I start a drag and drop using a right click in WPF it
Just want to start out by saying this seems like a great site, hope
I am supporting a drag-and-drop operation on an IKImageBrowserView. In my drag and drop
I need to implement drag and drop functionalities in a web application between elements
I wanted to recreate this widget drag and drop effect in DotNetNuke: http://templatebuilder.sitefinity.com I
I would like to set the start position when I click into the parent
Start with a series of MS Office extensions built in C++ as COM objects.
To start, I know there are two kinds of JSON serialization currently built into
/* I start with this: */ <Report> <prop1>4</prop1> <prop2>2255</prop2> <prop3>true</prop3> <prop4>false</prop4> <prop5>true</prop5> </Report> /*
I am trying to make a mobile app that would allow a drag and

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.