Actionscript 3 :: Set Bitmap Image In Canvas Background?

Nov 18, 2010

I have image as Bitmap:

var bitmapImage:Bitmap=getDefaultImage();

I need to set this bitmap as canvas backgroundImage.

I find method myCanvas.setStyle("backgroundImage",url); But i dont need url. Whent i do this:

myCanvas.setStyle("backgroundImage",bitmapImage); I have an error.

How to set bitmap image in canvas background?

View 1 Replies


Similar Posts:


Flex :: How To Set Bitmap Grid As Background For Canvas

Jun 12, 2009

I've got a canvas in my app which I want to be backgrounded with a grid. I suppose, I need to create a DisplayObject with a single grid cell drawn on it and set it as a repeated bitmap fill for the canvas, but I can't figure out how to do that.

View 2 Replies

ActionScript 3.0 :: Choosing Background Image From File On Server As Canvas

Nov 28, 2010

I need the exact simple application but the ability to choose a background image from a file on the server as the canvas and I want to save the created image on a server file instead of on the client machine. The ability to change the pencil drawing size would be an additional plus. I work with php and mysql so I would like to use them to store the file parameters, even as a blob in mysql, along with some additional user (server) defined variables (I can do the php/mysql side if I can get the file there, I understand there is an swf to png ByteArray class that might be able to save on server. The project is for an opensource group so the final product would need to remain as such, I would be able to pay for the modifications mentioned above. The source files are available at the links below. [URL]

View 1 Replies

Actionscript :: Using Bitmap And BimapData To Load A Background Image In Flash CS5?

Nov 9, 2010

I'm making a flash movie and I'd like to load a background image into my SWF and paint it to the stage using the Bitmap and BitmapData classes. Am I approaching this properly? What code gets the image from the Loader to the BitmapData? Also, how do I get the image to show in the background? I've never understood the BitmapData/Bitmap metaphor, explanations, code samples and tutorial links.

View 1 Replies

Flex :: Skin A Canvas With Image And Scale It To Size Of Canvas In It?

Apr 9, 2011

I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...

View 2 Replies

Flash :: Use The CS4 Tool's On A Bitmap Image After Tracing The Bitmap Image And Applying My Settings?

Aug 7, 2009

Use the flash CS4 tool's on a bitmap image after tracing the bitmap image and applying my settings?

View 10 Replies

Actionscript :: Capturing Canvas Bitmap With Dynamically Placed Elements

Jul 6, 2010

I'm attempting to find overlap between elements on a flex canvas, an adaptation of Url...The attempt here is to place some text and figure overlap with previously placed text. [code]do not seem to capture the elements placed on the canvas dynamically. [code]

View 1 Replies

Actionscript :: Retriving Alpha Value Of Canvas Background?

Oct 19, 2011

Can we fetch the alpha value from a canvas( i have a canvas in flex, setting background color with alpha, can i read the alpha from the canvas directly again later ? ) for example we can read the background color like canvasId.getStyle(backgroundColor) same way, any method for alpha as well?

View 1 Replies

Flex :: Why Do DragOver / Enter Events Require A Background On Canvas

Dec 10, 2009

I have a canvas which I want to accept drags on. I have added a dragOver and dragEnter event listeners to the canvas, but they only work if I drag over something inside the canvas (another child element). I realised that if I set the canvas' background colour to black it works. So I have set it's background transparency to 0, which works... buy is there a better way to work around this apparent need for the canvas to have something inside it to accept dragEvents.

View 1 Replies

Saving Image Of Canvas?

Jul 19, 2009

I am trying to make a flash application that can save (to the user's local hard drive) a screen shot of the canvas (or more accurately part of it).I've dabbled with Quasimondo's Bitmap Exporter which did some funky stuff to render an image, ship it to a php script on the server, and bounce it back to the client. But not only is that inefficient it also has two other major flaws:

1) it's written in actionscript 2 so I can't use any actionscript 3 abilities.

2) it breaks as soon as one of the images on the stage is defined as a variable brought in through $_GET rather than hard coded. (the image comes in fine but then the rendered finished product is a blank white image)

View 6 Replies

Javascript :: Video With Transparent Background On Page Above Image Background?

May 2, 2010

I want to embed some video into my HTML page. As background I want to use big picture. And above it I want to insert loop video with (i.e.) walking man.So, can I embed video (without flash and any player controls) in page?Can I decode video with transparent background? Is there any codecs which support transparent background (alpha-channel)?

View 1 Replies

ActionScript 3.0 :: Use Bitmap As Background With DrawRoundRect?

Jul 26, 2011

I'd like to use an image as the background on some dynamic movieclips..Here is my code :-
 
var sTab:MovieClip = new MovieClip();
sTab.graphics.beginFill(0x007FC7);sTab.graphics.lineStyle(1, 0xFFFFFF);sTab.graphics.drawRoundRect(0, 0, 81, 50,

[Code]....

View 3 Replies

ActionScript 3.0 :: Place An Animated Background (.swf Or.flv) Instead Of A Bitmap?

Mar 15, 2011

I know how to place a fullscreen bitmap background using the BitmapData class but i have yet to find a tutorial about how to place a fullscreen flash animation in the background while keeping the aspect ratio.I've looked around the web to find a tutorial about this but i did not find anything except a few threads with no responses.

View 1 Replies

Edit Bitmap, Remove Background In Flash CS4?

Sep 16, 2009

I tried to drag in from Photoshop a layer with an image and transparent background, but it turns white in Flash, so I imported the image from psd. However, the black background is interfering with the placement of the image. In OLD flash, there used to be a magic wand and the ability to select areas of the bitmap and delete, but it seems that the feature is now missing or hidden in new flash.  I turned the image into bitmap and I don't want to trace it, because it is a photo. So, without tracing, how do you now edit the image as I'm trying to do?

View 2 Replies

AS3 :: Flex Masks With Black Background From Png Bitmap

Apr 30, 2010

What I am trying to achieve might be trivial, however I am loading a PNG mask which does not have a transparent background, but rather a black background, with the shape defined on top in white (the actual mask which needs to be applied). Apparently Flex expects me to provide a mask with a transparent background for it to work, or am I missing something?

If that's the case, could I transform the bitmapData which I am loading so that it treats black color as transparent?

View 1 Replies

ActionScript 3.0 :: Save Image Out Of Flash (whole Canvas)?

Dec 15, 2009

I'm creating a flash fun thing where you dress up a character by just dragging and dropping little images, everything is working fine.

I want to add an option to save the image you have created, I can do this but the problem is you have to set a movie clip to capture, the thing i want to capture is a few movie clips layered on top of each other(the finished character).[code]...

View 3 Replies

ActionScript 3.0 :: Adding Image To Canvas Won't Start At 0 (but Img.y Says 0)

Sep 9, 2011

I am going nuts! I have a canvas which I am trying to add a background image to. I am not setting the Y position, but after I add it to the canvas it always starts about 40 px down. If I trace the Y position it still says 0, even after a timer. I have tried to move it to the parent canvas and got the same results.

View 1 Replies

Flex :: Put An Image Inside A Canvas Without It Overflowing?

Aug 13, 2009

I have an Image nested inside a Canvas.

<mx:Canvas>
<mx:Image source="@Embed(source='assets/library.swf', symbol='Waves')" />
</mx:Canvas>

I'd like the Image not to overflow the bounds of Canvas. But when I set width and height on the Canvas, my Image disappears. Canvas also doesn't seem to respect horizontalScrollPolicy.

Seems easy enough, but as the official Flex documentation is down at the moment, I thought I'd turn to SO.

View 2 Replies

Flex :: Adding Selectable Image On Canvas

Dec 24, 2009

I am new to flex, and do not know how to add an image (or other ui component) to canvas, so user can select it (and see that it's selected), also I want to add a possibility for example to click backspace and remove selected image from scene. How to do that?

View 1 Replies

Flex :: Dropped Image Be Rotated In Canvas?

May 25, 2011

this is the code for 3d rotation [code]i want to rotate the image after dropping them in the canvas.i am able to rotate them in the panel.

View 1 Replies

Flex :: Saving Canvas And Dropped Image

Jun 10, 2011

I have an image loaded from an url and added to canvas as child. Then I am drag and dropping another image on it which also uses the senocular transform so the image can be transformed on the canvas. I have coded in such way that the transform handles shows up only after it's dropped on canvas. The image shows up correctly. But I am trying to save the result image (that is the main image and the dropped image on top of it), I only end up with the main image that was loaded earlier. The dropped image doesn't show up.

Below is the code for handleDrop() that is fired on dragDrop event and prepares the final image.

[Code].....

View 1 Replies

Flex :: Dynamically Add Different Items To ThumbContent Canvas And Use Scroller Canvas To Scroll

Jun 5, 2009

I have the following code in my flex project.

[Code]...

I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.

View 1 Replies

Flex :: Place An Image In Specific Coordinates On Canvas?

Nov 30, 2009

I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.

View 2 Replies

Actionscript 3 :: Flash Upload Image To Drawing Canvas

Jul 18, 2011

im trying to create a online business card editor to learn flash again, one of the functionality im trying to achieve is being able to upload an image (jpg,png etc) and place said image onto a drawing canvas and then being able to scale the image and rotate the image and move the image around. can some one direct me to a decent tutorial for this kind of functionality.

View 1 Replies

ActionScript 3.0 :: Unable To Make An Image As An Object On The Canvas

Apr 30, 2010

I have an app wer i drag and drop images onto a canvas and then move them on the canvas to arrange them appropriately. After that i shud be able to click on those images and draw connectors between them as the user seems required. But after dragging and dropping the images on the canvas and arranging them, when i click on the image i am getting a typeerror 1009 error, i.e, "cannot access a property or method of a null object reference".

Actually after arranging the images, i add an event listener to the image(proxy) on the canvas:

image.addEventListener(MouseEvent.CLICK, mouseClickk);
image.addEventListener(MouseEvent.DOUBLE_CLICK, mouseUpp);
MouseClickk Function:

[Code].....

View 0 Replies

Image As Background / Resizing / Scalable Background

Jul 24, 2009

I am relatively new to Flash CS3 and i have been learning Action-script 3 over the past week. I have come quite a long way and i have made a site in flash but i just have a question.I have been using an image as my background and i am happy with the way flash automatically scales all the objects in my file but the background image does not scale. Is there a way to do this? I have found out things online which show me how to add auto-resizing to the background but this knocks off the flash auto scaling/resizing for everything else.

View 4 Replies

Actionscript 3 :: Convert Text Into Bitmap Or Movieclip With Transparent Background?

Feb 13, 2011

how to convert text into a bitmap or a mocieclip with transparent background. i could convert the text into bitmap but it has got a white background..

View 1 Replies

ActionScript 3.0 :: Infinite Scrolling Bitmap In Background With Random Direction?

Jun 6, 2010

For a fullscreen AIR app, I want to have a tiling image (JPEG, PNG or whatever) in the background. The app is displayed on large screens in a public building, and to achieve a cool effect I want the background image to "scroll" infinitely, with the direction of scrolling changing with an interval in time. The background must be tiling and always filling the screen. Performance is of importance.What would be the best approach for this? I am thinking toward pixel-level bitmap manipulation. I have no experience in this field and I can't find any good examples/tutorials online.

View 2 Replies

ActionScript 3.0 :: Saving BitmapData In Image Component And Clear Canvas

Feb 10, 2009

I made a program in Flex that uses the actionscript 3 drawing api. I am drawing on a Canvas and on every mouseUp event I save the bitmapData in an Image component and clear the the Canvas. That works great, but the problem appears if I want to add a background to the paint that was drawn.

Here are the mxml components:
Code:
<mx:Canvas id="_backgroundColor" width="100%" height="100%" x="0" y="0" />
<mx:Image id="_image" x="0" y="0" mouseEnabled="false" />
<mx:Canvas id="_paper" x="0" y="0" />

And here it is the function I have on the Canvas (_paper) mouseUp
Code:
private function onSaveModifications(evt:PaperEvents):void{
var bmpData:BitmapData = new BitmapData(this._paper.width,this._paper.height,true,0x00FFFFFF);
bmpData.draw(this._paper);
this._image.source = new Bitmap(bmpData);
this._paper.graphics.clear()
}

I want when I set the _background Canvas background color to see it, but I cannot because the Image component(_image) where I save the bitmap is masking it.

This is how I set the background
Code:
this._background.setStyle("backgroundColor",0xff0000)
Do you know how can I make the pixels of the bitmap that weren't drawn to be transparent?

View 2 Replies

ActionScript 3.0 :: Bitmapcanvas - Add Shadows To All Objects - Background Bitmap (won't Change During Level)

Oct 21, 2010

I'm working on a tile based game, inspiredb by tutorials from the book "the essential guide to flash games". Please have a look at [URL] -- edit: by the way, the game idea is by no means mine, but i want to replicate the old game "sensitive" from the c64 [URL] for learning purposes I want to add shadows to all objects that stand in the water. However, since I want to keep my sprite count to a minimum, I have put all objects that don't do anything in a background bitmap. The best solution I can think of is to have:

1) a background bitmap (won't change during level)
2) a background shadows bitmap (won't change during level)
3) a sprite layer
4) and a sprite shadow layer at every screen, but this seems like a lot of work for just shadows.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved