Not able to get it working ... the objecthandles

Skip to first unread message

Arif Ali Saiyed

Oct 17, 2012, 11:28:30 AM10/17/12
to Flex ObjectHandles
Hi There,
I tried using Objecthandles by creating an independent
sample app.
I tried the approach that's mention in the example 2. the spirit
but it dint work for me.

.These are the steps i followed

1. created empty flex project- desktop app
2. added one UIComponent
3. created spirite and model class.
4. tried adding the object handles to it..

Here is the link to my tiny sample app ( flex project)

Marc Hughes

Oct 17, 2012, 1:45:07 PM10/17/12
Your display and model objects aren't connected in any way.

Perhaps something like this?

flexShape.model = flexModel;


objectHandles.registerComponent( flexShape.model, flexShape,handles,true);


You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Arif Ali Saiyed

Oct 17, 2012, 2:19:17 PM10/17/12
Hi Marc,
             Thanks you very much or this useful utility and thanks for responding so quickly. 
As you see in my attached project, I have two appraoch.

approach 1 :  makes uses of Sprit approach. 
approach 2:    makes uses of flex component approach.

Regarding you were correct  about  no conection between flexShape.  &  flexModel,  I made that change still approach 2 dint work. 
Did you check my appraoch 1 ? In that i already had the connection between spirit and the model but still it did not work.

Am i not suppose to add it to UIComponent ? Am is suppose to add display object ( Spirit or flexshape ) and object handles to canvas or something ? 


Maurice Mullens

Oct 18, 2012, 10:08:09 AM10/18/12

you have to register not the object itself but the parent in which it is placed.

so registerComponent(flexShape.parent, etc)


2012/10/17 Arif Ali Saiyed <>

Maurice Mullens

Oct 18, 2012, 10:11:42 AM10/18/12
I am sorry, that was no good! :-(

This is how i have my script working:

var p:photo = new photo;

var dataModel:SimpleDataModel = new SimpleDataModel;

dataModel.x = e.@objectx;

dataModel.y = e.@objecty;

dataModel.width = e.@objectwidth;

dataModel.height = e.@objectheight;

dataModel.rotation = e.@objectrotation

p.model = dataModel; (in my photo class i have a model object and a oh (objecthandles) object

p.oh.registerComponent(dataModel, p, hd);


Also i added a custom event to clear the handles that were active when you click on a photo object.

Hope this helps!


2012/10/18 Maurice Mullens <>

Arif Ali Saiyed

Oct 18, 2012, 3:12:06 PM10/18/12
Hi There,
             Thanks for your response, Hye i got it working myself , it did work  when i changed UIComponent to Canvas ...( strage but still it worked) 
so now in my mxml i have one canvas.... which is the container for objecthandles and displayobject aka flexshape. 

Reply all
Reply to author
0 new messages