Applying borders to object handles

14 views
Skip to first unread message

Ashi

unread,
Nov 24, 2009, 4:08:30 AM11/24/09
to Flex ObjectHandles
Hi Guys ,

I am trying to apply border to object handles with image as a child.
The border is not applied properly, my image shrinks and the border is
applied outside the handle !


The code is like this

var Obh:ObjectHandles= new ObjectHandles();
Obh.rotateFromCenter=true;
Obh.alwaysMaintainAspectRatio=true;
Obh.allowRotate=true;
var img:Image = new Image();
img.source = "images/testImage.jpeg";
img.maintainAspectRatio = true;
img.setStyle("completeEffect",fadeIn);
img.percentHeight = Obh.height*2;
img.percentWidth = Obh.width*2;
Obh.addChild(img);

Obh.setStyle("borderStyle","solid");
Obh.setStyle("borderColor",''0x000000");
Obh.setStyle("borderThickness","20");


Help anybody :)

Thanks
Ashi

Ashi

unread,
Nov 25, 2009, 1:18:26 AM11/25/09
to Flex ObjectHandles
Hi guys, pl try the code. Its really important for my project to get
through the bug ! :)

Gregory Tappero

unread,
Nov 25, 2009, 3:35:54 AM11/25/09
to object...@googlegroups.com
Try applying the style to image not the OH ?
> --
>
> You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
> To post to this group, send email to object...@googlegroups.com.
> To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/objecthandles?hl=en.
>
>
>

Ashi

unread,
Nov 25, 2009, 8:03:22 AM11/25/09
to Flex ObjectHandles
Hiya !

I tried doing that too. If i apply border to the image it does not
apply border at all. Any other alternatives please ?

Thanks
Ashi :)

On Nov 25, 1:35 pm, Gregory Tappero <cou...@gmail.com> wrote:
> Try applying the style to image not the OH ?
>

abid reha

unread,
Nov 25, 2009, 10:59:48 AM11/25/09
to object...@googlegroups.com
var Obh:ObjectHandles= new ObjectHandles();
Obh.rotateFromCenter=true;
Obh.alwaysMaintainAspectRatio=true;
Obh.allowRotate=true;
var img:Image = new Image();
img.source = "images/testImage.jpeg";
img.maintainAspectRatio = true;
img.setStyle("completeEffect",fadeIn);
img.percentHeight = Obh.height*2;
img.percentWidth = Obh.width*2;                                                                                                              img.setStyle("borderStyle","solid");                                                                                                         img.setStyle("borderColor",''#000000");                                                                                                                Obh.setStyle("borderStyle","solid");
Obh.setStyle("borderColor",''#000000");

Obh.setStyle("borderThickness","20");
Obh.addChild(img);

Ashi

unread,
Nov 30, 2009, 5:57:28 AM11/30/09
to Flex ObjectHandles
Hey Thanks for the help. But it still doesn't work. I am changing the
border size dynamically with the numeric stepper. It still pushed my
image to the left of the object handle and keeps on decreasing its
size till the image disappears.

Some other try please?

On Nov 25, 8:59 pm, abid reha <abidr...@gmail.com> wrote:
> var Obh:ObjectHandles= new ObjectHandles();
> Obh.rotateFromCenter=true;
> Obh.alwaysMaintainAspectRatio=true;
> Obh.allowRotate=true;
> var img:Image = new Image();
> img.source = "images/testImage.jpeg";
> img.maintainAspectRatio = true;
> img.setStyle("completeEffect",fadeIn);
> img.percentHeight = Obh.height*2;
> img.percentWidth = Obh.width*2;
>
>  img.setStyle("borderStyle","solid");
>
>   img.setStyle("borderColor",''#000000");
>
>   Obh.setStyle("borderStyle","solid");
> Obh.setStyle("borderColor",''#000000");
> Obh.setStyle("borderThickness","20");
> Obh.addChild(img);
>
> > objecthandle...@googlegroups.com<objecthandles%2Bunsu...@googlegroups.com>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/objecthandles?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Flex ObjectHandles" group.
> > To post to this group, send email to object...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > objecthandle...@googlegroups.com<objecthandles%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages