|
ObjectHandlesUsage
Here are some projects that use ObjectHandles, feel free to send in more.
IntroductionHere are some projects that use ObjectHandles, feel free to send in more. Projects
Here's a video of an example using ObjectHandles in some non-standard ways. It's:
|
Sign in to add a comment
good~
thanks,very usefull for me!
thanks and it is very use full. and i need one help on this that while adding a text area in the object handle control i am not able to write in that textarea can i access that with objecthandle resize and move.
Hi. Ill be using ObjectHandles? on an educational software (educational object editor). It is going to very usefull, thanx a lot!
great!
thanks and it is very use full. and i need one help on this that while adding a text area in the object handle control i am not able to write in that textarea can i access that with objecthandle resize and move.
i meet the same probleam.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" >
<mx:Script>
-
</mx:Script></mx:Application>
I tried with text, images and shapes, but its working fine only with images for rest its throwing error.
I have a need to scale a text control within the component so that the text dynamically scales as the user drags the boundaries of the ObjectHandle? component. Does anyone have an example of how to do this?
to kanukukreja You can try Lable instead of TextField? and it works. The only problem is that it's only resizing the oh container itself, not the text .... :(
i need the exact same thing cshreffler needs. how can i do that with a text ?
i found the way to do that:
<Script> var originalWidth : int, originalHeight : int; function init() : void { // save original width and height which match scale 1 originalWidth = this.hnd.width; originalHeight = this.hnd.height; } function onResize(event : ObjectHandleEvent) : void { // rescale width and height based on the new size this.label.scaleX = (this.hnd.width * 100 / this.originalWidth) / 100; this.label.scaleY = (this.hnd.height * 100 / this.originalHeight) / 100; } </Script> <ObjectHandles id="hnd" objectResizingEvent="onResize(event)" .... <Label id="label" text="asdasd" ..... </ObjectHandles>Fixed aspect ratio bug fixed
Hi and thanks for this great component.
I've made a quick mod the ObjectHandles?.as file to correct the behaivour of the left hand handles when fixed aspect ratio is sellected.
if( (wasResized && alwaysMaintainAspectRatio ) || (wasResized && ( isCorner && cornerMaintainAspectRatio) ) ) { desiredSize.x = aspectRatio * desiredSize.y; if (isResizingLeft && isResizingUp) { desiredPos.x = originalPosition.x + (originalSize.x - desiredSize.x); desiredPos.y = originalPosition.y + (originalSize.y - desiredSize.y); } if (isResizingLeft && isResizingDown) desiredPos.x = originalPosition.x + (originalSize.x - desiredSize.x); }Hope this help
Cheers James
First of all...Great Component!
I'm trying to use the "alwaysMaintainAspectRatio" attribute, but get different results based upon when it is enabled in the tag. For example:
1) If I initialize the tag with alwaysMaintainAspectRatio="true" and allowRotate="true", only the four corner handles show up and I don't get a rotate handle to rotate my text.
<oh:ObjectHandles id="oh1" resizeHandleImage="{resize_handle}" rotateHandleImage="{rotate_handle}" allowRotate="true" alwaysMaintainAspectRatio="true" objectResizingEvent="onResize(event)" > <mx:Text id="txt1" text="Graphical Handles" /> </oh:ObjectHandles>2) Now, if I initiate the tag this time with alwaysMaintainAspectRation="false" and allowRotatate="true", I will now get all eight resizing handles and my rotation handle. I can then perform some sort of action (like a button click) to reset alwaysMaintainAspectRation="true", and all eight of my resizing handles will remain, as well as my rotation handle.
<mx:Button label="Maintain Aspect Ratio" click="oh1.alwaysMaintainAspectRatio=true" x="10" y="100"/> <oh:ObjectHandles id="oh1" resizeHandleImage="{resize_handle}" rotateHandleImage="{rotate_handle}" allowRotate="true" alwaysMaintainAspectRatio="false" objectResizingEvent="onResize(event)" > <mx:Text id="txt1" text="Graphical Handles" /> </oh:ObjectHandles>It seems to display in two different ways depending on how it is initialized. What I would like to do is initialize it with alwaysMaintainAspectRatio="true", but still keep all eight drag handles and the rotation button so the user can taggle the alwaysMaintainAspectRation on and off. Does anybody have any ideas how I might be able to accomplish this?