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 138395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:15:26+00:00 2026-05-11T07:15:26+00:00

Please, anyone can guide me how to do this stuff. I have a pannel

  • 0

Please, anyone can guide me how to do this stuff.

I have a pannel and a box, The pannel is my component pannel(inside component pannel is eg. image, TextArea, Video) and Box is my target Box for my component creation. The user can select a component he/she want to create (dynamic creation) and drag it to target Box(drag and drop event). Then after creating the component the user can drag the component that he/she created and place anywhere on target Box and also the user can resize the component that he/she created(runtime resize).

i have this code for drag and drop and it seems this code works only on image

//-----action script-----//         private function dragIt(event:MouseEvent, value: String, objParent: String, objName: String):void          {                        var dragInitiator:Image = event.currentTarget as Image;                 var dragSource:DragSource = new DragSource();              dragSource.addData(value,'value');             dragSource.addData(objParent, 'parent');             dragSource.addData(objName, 'objname');               var dragProxy:Image = new Image();             dragProxy.source = event.currentTarget.source;               DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);         }           private function dragEnterHandler(event:DragEvent):void          {             var dropTarget:Box=event.currentTarget as Box;             dropTarget.setStyle('borderThickness', 5);             DragManager.acceptDragDrop(dropTarget);         }          private function dragExitHandler(event:DragEvent):void         {             var dropTarget:Box=event.currentTarget as Box;                             revertBoxBorder();                         }               private function revertBoxBorder():void         {             targetBox.setStyle('borderThickness', 1);                         }          private function dragDropHandler(event:DragEvent):void          {             var value:String = event.dragSource.dataForFormat('value') as String;             var objParent:String = event.dragSource.dataForFormat('parent') as String;             if(value == 'mp3')             {              //do something                  }             else if (value == 'image')             {                 if (objParent == 'panel')                 {                     var imgView: Image = new Image;                                      imgView.x = event.stageX;                     imgView.y = event.stageY;                      addChild(imgView);                     imgView.name = String(getChildByName(imgView.name).parent.numChildren-1);                          imgView.addEventListener(MouseEvent.MOUSE_MOVE,  function(e:MouseEvent):void                      {                     dragIt(e, value, 'box', Image(e.target).name);                 });                     imgView.source = ImgInsert;                 }                 else                 {                     var objName:String = event.dragSource.dataForFormat('objname') as String;                     getChildByName(objName).parent.getChildAt(int(objName)).x = event.stageX;                     getChildByName(objName).parent.getChildAt(int(objName)).y = event.stageY;                 }              }             else if (value == 'textarea')             {                 //do something                               }          }  //-----mxml code------// <mx:Panel x='0' y='37' width='91' height='417' layout='absolute' title='Component' borderColor='#8DA5AB' color='#345860' borderStyle='outset'>     <mx:Image x='7' y='43' width='21' height='18' source='{TxtAreaInsert}' mouseMove='dragIt(event,'textarea','panel','')'/>     <mx:Image x='36' y='43' width='21' height='18' source='{ImgInsert}' mouseMove='dragIt(event,'image','panel','')'/>     <mx:Image x='36' y='80' width='21' height='18' source='{Mp3Insert}' mouseMove='dragIt(event,'mp3','panel','')'/>     <mx:Image x='7' y='80' width='21' height='18' source='{VdoInsert}' mouseMove='dragIt(event,'video','panel','')'/> </mx:Panel> <mx:Box id='targetBox' y='37' width='589' height='417' borderColor='#8CC2E8' backgroundColor='#D5DBEE'     dragExit='dragExitHandler(event)' dragEnter='dragEnterHandler(event)' dragDrop='dragDropHandler(event)' left='99'> </mx:Box>; 

How to move thus non image component like TxtArea? How to resize the component inside target box? (This is like GUI of flex when creating component) Thank you..

  • 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. 2026-05-11T07:15:27+00:00Added an answer on May 11, 2026 at 7:15 am

    check out Rogue-Development.com’s Object Handles I’ve used this with pretty good success for moving / resizing components.

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

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You would want to create a base class, and keep… May 11, 2026 at 3:13 pm
  • added an answer Lazy allocation simply means not allocating a resource until it… May 11, 2026 at 3:13 pm
  • added an answer Just type it literally: REG This will only match REG.… May 11, 2026 at 3:13 pm

Related Questions

I want to develop an Online Reminder service in ASP.NET 2.0 (C#) and SQL2005.
I am still learning the whole WCF thing, so please bear with me here.
Can anyone explain how compilation works? I can't seem to figure out how compilation
I hope someone can guide me as I'm stuck... I need to write an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.