Binding to selected objects geometry

Skip to first unread message


Apr 24, 2012, 10:38:58 AM4/24/12
to Flex ObjectHandles
Hi there....

I started looking at ObjectHandles a few weeks ago, because I need a
similar functionality in an upcoming project.

I haven't seen an example or been able to figure out how I can bind to
the selected item (single selected item, multiple not allowed)

What I am trying to accomplish is somewhat similar to the top bar in
InDesign, where you can both read and change 4 spinners with regards
to W, H, X, Y

Anyone been able to bind to the selected object and can provide a
simple example


Maurice Mullens

May 6, 2012, 3:43:22 PM5/6/12
to Flex ObjectHandles
Hi Allen,

what you need to do is create an extra function in the object which
you put on the stage ( i use a singleton class for that) and in that
function you assign the new x, y and w and h values to the datamodel

After that dispatch the following events:

dispatchEvent(new ResizeEvent("container_resizeHandler"));


ObjectHandles.dispatchEvent(new ObjectChangedEvent(null,
ObjectChangedEvent.OBJECT_RESIZED, false, false));
(i add a parent reference in every child object to the singleton

This makes your object change by the values you input in your

Its all a bit complex but try the singleton approach, it could work
for you as well.

Good luck
Reply all
Reply to author
0 new messages