Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:37:28 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  Best Practice, OOP & MVC Frameworks (Moderators: flexy, Jan K, James)
| | |-+  About Canvas and Images
« previous next »
Pages: [1] Print
Author Topic: About Canvas and Images (Read 2478 times)
IgorThiesen
Newbie FD
*
Posts: 2


« on: 17 Dec 2008, 20:15:42 UTC »

Hello guys, I'm new here but I'm working Adobe Flex about 3 months. Now I have an strange problem (or Flex issue, I don't know yet):

My components works bassically with Canvas and Images, I have one component called ViewComponent that is bassically a Canvas and another called ImageComponent that is a Image. Both have Flex Components (mxml) and ActionScript classes.

Ok, for now is all ok, the problem starts when i add ImageComponent in ViewComponent, the Image don't respect Canvas size and get bigger then the Canvas! I solved this adding a Canvas inside ImageComponent class and then Image on it and worked properly but I can't do this to my application because:

1st - It's not an good Oriented Object practice.
2nd - I need to implement control for image and canvas, sometimes moving, scaling and I need use "this" code because it extends RotatableScalable class.
3rd - Bassically I don't wanna change any Canvas properties, only image at this time

Any idea?

Thx for all.
Logged
IgorThiesen
Newbie FD
*
Posts: 2


« Reply #1 on: 17 Dec 2008, 20:18:22 UTC »

ahhh, sorry but i think i did it on wrong place  Roll Eyes can someone move it for me? thx
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #2 on: 06 Jan 2009, 18:15:21 UTC »

So just set width and height properties for your Canvas, that way child objects won't be able to push it out any larger.
Logged

Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC