Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
finecur #1
draw line on top of bitmap
Hi, I am trying to draw bitmap on canvas and then lines on top of the
bitmap. My code is attached. I found that the lines is alwasy
underneath the bitmap and thus not visuable. How can I fix it?
Thanks,
var loader:Loader = Loader(event.target.loader);
var image:Bitmap = Bitmap(loader.content);
var bitmapHolder:UIComponent = new UIComponent();
var mySprite:Sprite = new Sprite();
mySprite.addChild(image);
bitmapHolder.addChild(mySprite);
canvas.height = image.height;
canvas.width = image.width;
canvas.addChild(loader);
canvas.graphics.lineStyle(2, 0xff0000, 1);
canvas.graphics.moveTo(-100, -100);
canvas.graphics.lineTo(200, 200);
finecur Guest
-
Draw line using Acrobat SDK
I want to draw line on pdf page. I have x,y coordinate depend upon that i want to draw line on page. Thanks in advance -
draw line as a Component
hi all, I have a Cancas A, then I want to display a line as A's display child but not a A's graphic child, how can I do it? thanks steve -
Flag for permitting bitmap.draw permission
Justin Everet mentioned in his blog that you can set a flag in FMS3 which permits the bitmap.draw() function on a video object connected to an rtmp... -
3D Draw Line?
Hi, I'm very new to 3D so I'm not sure if this is basic or not. I've created 2D hierarchical tree-structures in the past in using flash and I'm... -
draw a line
is it possible to draw a simple line from one point to another. i only want to use two points. i think that the #wire mode will not do the job... -
Munkii #2
Re: draw line on top of bitmap
What I did to solve this problem was make the background of my
Drawable Component transparent, and then position it on top of another
canvas with the desired background colour.
This works nicely, and means you can use your drawable component to
draw over anything aswell.
There is a sample application and sample code on my blog:
[url]http://www.munkiihouse.com/?p=4[/url]
Hope that helps
Tony
On Sep 27, 3:23 am, finecur <fine...@yahoo.com> wrote:> Hi, I am trying to draw bitmap on canvas and then lines on top of the
> bitmap. My code is attached. I found that the lines is alwasy
> underneath the bitmap and thus not visuable. How can I fix it?
>
> Thanks,
>
> var loader:Loader = Loader(event.target.loader);
> var image:Bitmap = Bitmap(loader.content);
> var bitmapHolder:UIComponent = new UIComponent();
> var mySprite:Sprite = new Sprite();
> mySprite.addChild(image);
> bitmapHolder.addChild(mySprite);
> canvas.height = image.height;
> canvas.width = image.width;
> canvas.addChild(loader);
>
> canvas.graphics.lineStyle(2, 0xff0000, 1);
> canvas.graphics.moveTo(-100, -100);
> canvas.graphics.lineTo(200, 200);
Munkii Guest
-
baberuth #3
Re: draw line on top of bitmap
On Oct 5, 2:43 pm, Munkii <tfend...@gmail.com> wrote:
Wow! What a simple and useful tool. Any idea about how to save that> What I did to solve this problem was make the background of my
> Drawable Component transparent, and then position it on top of another
> canvas with the desired background colour.
>
> This works nicely, and means you can use your drawable component to
> draw over anything aswell.
>
> There is a sample application and sample code on my blog:[url]http://www.munkiihouse.com/?p=4[/url]
>
> Hope that helps
> Tony
>
> On Sep 27, 3:23 am, finecur <fine...@yahoo.com> wrote:
>>> > Hi, I am trying to draw bitmap on canvas and then lines on top of the
> > bitmap. My code is attached. I found that the lines is alwasy
> > underneath the bitmap and thus not visuable. How can I fix it?>> > Thanks,>> > var loader:Loader = Loader(event.target.loader);
> > var image:Bitmap = Bitmap(loader.content);
> > var bitmapHolder:UIComponent = new UIComponent();
> > var mySprite:Sprite = new Sprite();
> > mySprite.addChild(image);
> > bitmapHolder.addChild(mySprite);
> > canvas.height = image.height;
> > canvas.width = image.width;
> > canvas.addChild(loader);> > canvas.graphics.lineStyle(2, 0xff0000, 1);
> > canvas.graphics.moveTo(-100, -100);
> > canvas.graphics.lineTo(200, 200);
drawing as an image or swf with the click of a button. I am working
on a social network and would like to allow users to draw a logo for
themselves. I would like to add flash like drawing and text
features. With the powerful actionscript 3 classes, I bet this
wouldn't be terribly difficult. Can someone try to implement these
features?
baberuth Guest
-
Munkii #4
Re: draw line on top of bitmap
In Flex3 you can do this through the ImageSnapshot class. This is a
convenience class to capture the appearance of any control
In Flex2 this is a little more complicated. You have to create a
BitmapData class, and then call draw function on the bitmap data
object to get an image of the control. From there you can turn it
into an image or save it out to a server etc
Munkii Guest
-
basava #5
Re: draw line on top of bitmap
var loader:Loader = Loader(event.target.loader);
var image:Bitmap = Bitmap(loader.content);
var bitmapHolder:UIComponent = new UIComponent();
var mySprite:Sprite = new Sprite();
mySprite.addChild(image);
bitmapHolder.addChild(mySprite);
canv.height = image.height;
canv.width = image.width;
canv.addChild(loader);
Property loader not found on mx.controls.Button and there is no default value . i got this error on a button clickbasava Guest



Reply With Quote

