ActionScript 3.0 :: BitmapData Cuts Off MovieClip

Aug 11, 2009

I'm having this annoying proble with BitmapData. I try to turn a movieclip into a bitmap, but there is always white space to the right and bottom. At the top and left, it is obvious that part of the movieclip was cut off. However, the width and height of the bitmap are correct. In other words, white space takes up where the rest of my movieclip should go. About 30% of the bitmap is white.I have a method that creates a grid based on an array. The Wall class extends MovieClip. Each wall is a 70 x 70 movie clip that looks like a stone (its x and y are established within the class itself).[code]I have messed around with changing the registration using a class I found online, but it didn't fix anything. In fact, changing the registration made no difference. Also, I have called addChild(walls), and everything is displayed correctly. But for performance reasons, I need to make it a bitmap.

View 2 Replies


Similar Posts:


Actionscript :: MovieClip Replacement That Converts An Existing Imported MovieClip To A Sequence Of BitmapData

Jun 22, 2011

I've written a simple MovieClip replacement that converts an existing imported MovieClip to a sequence of BitmapData. This removes the requirement for Flash to render vector data in the MovieClip on each frame.

But BitmapData has a huge memory footprint. I've tried converting the BitmapData to a ByteArray and using the compress() method. This results in a significantly smaller memory footprint. But it has proven impractical. For each redraw, I tried uncompressing()'ing the ByteArray, then using SetPixels to blit the data to the screen, then re-compressing() the frame. This works but is terribly slow.

So I was wondering if anybody else has an approach I could try. In Flash, is it possible to compress bitmap data in memory and quickly blit it to the screen?

I wonder how native animated GIFs work in Flash. Does it uncompress them to BitmapData behind the scenes, or is frame decompression done on the fly?

View 1 Replies

ActionScript 1/2 :: MovieClip Pixel Manipulation With BitmapData

Jan 30, 2010

I have a MovieClip in the library exported for actionscript. How do i convert or attachMovie it to a BitmapData class so that i can manipulate its pixel data? I will need that so that i can distort the MovieClip.

View 3 Replies

ActionScript 3.0 :: Using BitmapData To Screenshot A Movieclip - Set The X And Y Position?

Sep 20, 2009

I am trying to snapshot a movieclip at X and Y by WIDTH and HEIGHT. All is fine, it snapshots fine and gets the width and height, but I can't adjust the x and y position for it to begin the snapshot at. I tried using a Matrix and its Matrix.translate() method, I tried moving the scroll beneath the draw method line. I don't understand how to get this thing to move.

[Code]...

View 7 Replies

ActionScript 3.0 :: Render Bitmapdata / MovieClip On Text

Jan 21, 2011

I got a requirement to render movieClip on text.URL...I need to replicate the beeded text part.

View 1 Replies

ActionScript 3.0 :: BitmapData.draw() And Embedded MovieClip?

Jan 26, 2011

I know half of the problem:the embedded movieclip is "content" of a Loader, and you can not draw Loaders directly with bitmapData.draw(aLoader);with a normal Loader, you could access the Loader.content and draw it but not in the embedded case.adobe forums could not give an answer to this and i searched for hours through the web ...

[Embed(source="aMovieClip.swf")]
private static var AMovieClip:Class;
//...

[code]....

View 3 Replies

ActionScript 3.0 :: Extract Bitmap Or BitmapData From MovieClip?

Jun 28, 2007

I've been looking for a solution for hours now. I have a movieclip which contains an image. Created by doing: put image on stage, convert to symbol, movieclip type, ok.I'd like to extract this bitmap because I want to use (somewhere else): graphics.begintBitmapFill(); but this method needs a BitmapData object and not a movieclip to create a repeating background (in my case).

So: how do I extract the Bitmap or the Bitmap data from a MovieClip?mind that attaching BitmapData as a base class to this symbol is NOT AN OPTION

View 11 Replies

Professional :: Webpage Cuts Off No Scroll Bar?

Jun 14, 2010

I'm trying to create a website for my wife.  Everything is completed and it looks great.  The only problem I'm having is that when my wife goes to view the websit on her computer (much smaller size).  The page cuts off and there's no scroll bar feature which I thought was like a fixture on websites.  I've been looking for hours on how to add a scroll bar to my entire website .. like the standard browser scroll bar but I can't seem to find it anywhere.
 
I have two files, one is the index.fla file which i used to create my page in using Flash CS5 and the other is the index.html file which I can edit in Dreamweaver.

View 9 Replies

ActionScript 3.0 :: Copy A MovieClip With Filters And Alpha To Bitmapdata?

Jan 19, 2011

I have a movieclip with an image that has transparency and filters applied to the movieclip.I know I can use "draw" to copy the movieclip to a bitmapdata object, but it doesn't seem to copy the filters and the transparency of the image. How can I copy these so the bitmapdata matches the original movieclip in appearance?

View 5 Replies

ActionScript 3.0 :: Use BitmapData Class To Capture An Animated Movieclip?

Jul 16, 2009

I'm trying to use BitmapData Class to capture an animated movieclip and adding it to the display list by using addChild, but it's causing my computer to bog down because it's adding a zillion children. what do I do to remove the old, or rather, update the current child with the new one?

View 1 Replies

ActionScript 3.0 :: BitmapData Mapping To Scaled Movieclip Then GetPixel?

Aug 18, 2009

I'm building an application where the user can upload a photo of their head, scale it and position it, and then pick a colour from the photo.The photo gets put into a movieclip called 'head'I'm stuck at the colour picker part and I just can't seem to work out the whole bitmapData thing. Here's my colour picker code -

ActionScript Code:
private function beginColourPick():void
{
_bmd = new BitmapData(head.width, head.height);

[code]...

This code kind of works, but not correctly.

Problem #1: The colour picker only works in the bottom right quarter of the image because I moved the head mc so the registration point is bang in the middle. So the problem here is that I can't figure out how to move the bitmapData in line with the head mc.

Problem #2: If the user scales the head mc (even a tiny bit) the colour picker stops working altogether. Now I'm thinking I've got to use a transform matrix - but I read up on it and haven't got anywhere.

View 7 Replies

ActionScript 2.0 :: Loading Image Into MovieClip Then Into BitmapData (Renamed)

Nov 6, 2006

I am trying to load an image into a movieclip and then draw the contents of the movieclip to a bitmapData object.

Below is some sample code.
target.jpg_mc.loadMovie(url);
target.createEmptyMovieClip("loader_mc", 100);
target.loader_mc.bmc = target.jpg_mc; // movieclip where to load original image
target.loader_mc.tmc = target.bmp_mc; // movieclip with smoothed image
target.loader_mc.onEnterFrame = function(){
[Code] .....

For some reason it always draws a white box rather than the image. Has anyone ever seen this happen with the bitmapData class?

View 4 Replies

ActionScript 2.0 :: Smoothing Images Using BitmapData And MovieClip.attachBitmap

Mar 12, 2007

When you load an image into a MovieClip then use that as the data source to draw() into a BitmapData object, the documentation says "Optionally, you can specify whether the bitmap should be smoothed when scaled. This works only if the source object is a BitmapData object." To me that implies that a second BitmapData object is needed in order for the optional [smooth:Boolean] parameter to work when set to true.

We found we didn't need to "double buffer" in this way when using MovieClip.attachBitmap() with the [smoothing:Boolean] parameter set to true. We did run into another problem though. This problem only manifests itself when you run the SWF as part of an HTML file running from a local web server like http://127.0.0.1. Here's the problem: images are loaded dynamically (URL's pulled from assets.xml) and the ones that are loaded locally from a directory on the same machine load and are smooth and distortion free. Other URL's point to a remote host. The images loaded via a remote source (example) do not "smooth nicely" running the exact same code as the local images. The remote images are shimmery and exhibit update artifacts. If you run the exact same page not via an http:// web sever i.e. - just loading the html page into the IE, then the remote images do get nice smoothing when animated.

Is there some magic to get BitmapData loaded from a remote source to smooth correctly when run from a local web sever? For our internal demo we removed any remote URLs so we could demonstrate that Flash does provide the ability for nice smooth animations but it would be a good problem to solve.

View 2 Replies

ActionScript 2.0 :: Use BitmapData To Capture A Movieclip That Has Been Created Dynamically?

Apr 23, 2007

I'm trying to use BitmapData to capture a movieclip that has been created dynamically.

Here's my code:

Code:
on(release)
{
import flash.display.BitmapData;

[Code]....

As u must have noticed, the movieclip i wanna draw, namely _root.VESSEL, itself contains several other clips (eg _root.VESSEL.db). The problem is that the clip doesnt get drawn at all! All i get is a white rectangle of the size i've created the bitmapData. But nothing of that movie clip has been captured.

is it that the BitmapData cannot capture the details of a clip if it has child clips?? Coz here, VESSEL itself was created empty, and all the new shapes are actually being placed as movie clips inside other empty clips that were created in VESSEL.

View 5 Replies

Media Server :: Streaming Cuts Out And VOD Restarts?

Mar 6, 2010

I just purchased and installed FMS for my music streaming service. I got the streaming set up fine so that it streams mp3s using the VOD application, but quite regularly the stream will just cut out and the VOD application in the administration section will just disappear and restart with 0 clients. It doesn't even happen when I have that many connected clients, at times it's happened with just 15 users, and i've had Red5 running over 200 clients at a time.

View 23 Replies

Flex :: Recorded Audio Playback Cuts At End

Aug 9, 2010

I'm writing a flex app, which must record an audio and then playback. It records just fine, I can hear the flv on the server, but when it comes to the playback it cuts the end a little bit, and each time I ask to reproduce again it cuts a little bit more. I guess it's something related to buffer management, but I don't know exactly.

Here's the code I'm using to playback. It is called from a mediator:
var streamPlayClient:Object = new Object();
this.stream.client = streamPlayClient;
streamPlayClient.onPlayStatus = function(infoObject:Object):void {
if (infoObject.code == "NetStream.Buffer.Flush") {
stopPlayback();
}} this.stream.play("flv:" + this.streamName);

View 1 Replies

Actionscript 3 :: Flex Tabnavigator Cuts Off Labels

May 18, 2011

I have a problem with the TabNavigator. The labels of the tabs are getting truncated and once the user places their mouse over the tab it redraws again. Is there anyway to redraw the label of the tab programmatically?

View 2 Replies

Flash - Flex Scroller Cuts Content?

Jun 16, 2011

got a little flex application where the content is zoomable.first of all some code

<s:Scroller verticalScrollPolicy="on" width="100%" height="100%">
<s:Group scaleX="{breite}" scaleY="{hoehe}"
id="mapView" > <!-- zum zoomen -->

[code]....

The zoom just works fine by changing the value from 1 up to 3 with a slider. Midpoint of the zoom is the center of the container (map).My problem: when i zoom, the scroller cuts a part of the groups. it zooms out of the window?!

View 1 Replies

Actionscript 3 :: Rotating A Bitmap It Cuts Corners Off?

Aug 5, 2011

I rotating some bitmap data in AS3. When ever I start rotating the bitmap the corners get cut off. I'm trying figure out what size the bitmap should be to fit the newly rotated bitmap.

[Code]...

View 1 Replies

ActionScript 2.0 :: Elastic Bg Cuts Off The Bottom Of Stage

Oct 8, 2010

I've attached some images for reference, but as I make my window larger the bottom of my stage gets cut off. I'm working off of a website template and am not particularly sure how the elastic function works. I've had some success changing the code to

Code:
Stage.align = "T"; and Stage.scaleMode = "showAll";

but then there are just solid blocks on either side of the background image that don't look very good.

so the bottom will be locked in place and not get cut off when resizing the window.

mainpage, Frame 1

Code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
_quality = "BEST";

[Code].....

View 1 Replies

ActionScript 2.0 :: Music Cuts Out When Timeline Reverses?

Mar 30, 2007

I have a movieclip on my main timeline. Inside of the movie clip are a few goodies which load in a sound clip. I'm using this code to play the sound:

Code:
// create sound object
loop = new Sound(this);
loop.attachSound("muzak");

[Code]....

This works great, until the main timeline is navigated backwards. For example I have web pages on frames 146,147,148, 149, etc... The menu links go to anyone of the given frames/pages. If I navigate so that the timeline is advancing, the muzak keeps playing. However, if I'm on frame 150 and use a menu button which takes us back to 147 (or anything before 150 on the timeline), the sound quits.

View 1 Replies

ActionScript 2.0 :: Flash 8 BitmapData - Getting Error : The Class Or Interface 'BitmapData.loadBitmap' Could Not Be Loaded?

Jan 31, 2007

I'm using Flash 8, with this code in the first frame:

import flash.display.BitmapData;
rissa._x=Stage.width/2;
rissa._y=Stage.height/2;[code].....

When I publish the file, I'm getting the following error message in the Output panel:

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 7: The class or interface 'BitmapData.loadBitmap' could not be loaded.
var plaid:BitmapData.loadBitmap("plaid");

Total ActionScript Errors: 1 Reported Errors: 1

View 8 Replies

ActionScript 3.0 :: Error #2015: Invalid BitmapData At Flash.display::BitmapData()

Oct 14, 2009

I am trying to use the reflect class from "http://pixelfumes.blogspot.com/2007/03/reflection-class-v3-with-source .html" but I keep getting this error:
 
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData()
at Reflect()
at Site_fla::GalleryPage_29/loadThumbs()
at Site_fla::GalleryPage_29/sortXML()

[Code]...

btw, first I used assigned thumbContainer as the mc argument (outside the loadThumbs() function) and it worked but not exactly what I wanted... because I thought it is supposed to update when the movieclip is animated but it actually didn't... when I use a scroller, only the thumbs that are first loaded to the stage get the reflection..

View 10 Replies

Actionscript 3 :: Quickly Rotate The Pixels That Make Up BitmapData Without Using BitmapData.draw()?

Dec 29, 2011

I've been using BitmapData.copyPixels() to draw graphics onto a canvas (Bitmap).I need to rotate the resulting graphics without the use of draw() because it's vastly slower.How can I rotate the target graphic? I'm assuming that there might be a formula or library that I can use which will first reorganize the pixels that make up a graphic based on an origin (point) and radians.I'm pretty certain that I'm not capable of creating such logic, so if there are any known libraries that do this, that would be awesome.I'd like to achieve something similar to XNA's SpriteBatch.Draw() method, which accepts rotation as its 5th argument.

View 3 Replies

ActionScript 2.0 :: BitmapData.draw() From MovieClip Draws Blank Image?

Aug 10, 2010

I have a MovieClip that has 2 images inside it:

1) An image from the FLA's library.

2) An image that is loaded dynamically from a server (read from XML file).

When I try to draw the MC into the BitmapData, I get a blank image.

Code:

ActionScript Code:
var destImg:BitmapData = new BitmapData(_root.picW,_root.picH,false);
destImg.draw( mcPicture );

View 1 Replies

ActionScript 3.0 :: BitmapData.hitTest - What Angle Or Coordinate Of The BitmapData The Collision Happens?

Sep 1, 2011

how to use the bitmapData collision method. Now I'm trying to figure out if there is a way to see at what angle or coordinate of the bitmapData the collision happens? I need it in order to figure the accurate bounce angle after the collision occurs.

View 2 Replies

Actionscript 3 :: If SWF Is Bigger Than Screen / FlashDebugger Cuts Off Content

Jan 27, 2012

I'm displaying a 720x1280 image in a 720x1280 SWF. My screen is 1366x768.The visualization is awful since my image is cut off (although internally the image's size is still 720x1280 when I do trace() ).Everything is suitably displayed on Firefox.

View 2 Replies

ActionScript 2.0 :: Make A Simple Copy Of A Flv Video In A New MovieClip Using The BitmapData Class?

Apr 16, 2007

I try to make a simple copy of a flv video in a new MovieClip using the BitmapData class.

Here is my code :

Code:
var video1:MovieClip = this.attachMovie("mcVideo","videoMC",1);
var objVideo = video1.v;
var _nc:NetConnection = new NetConnection();

[Code]......

View 6 Replies

Flex :: AddChild A BitmapData Or Draw A BitmapData To Screen?

Jul 15, 2009

I'm currently working on a flash game and I need to know how to addChild a BitmapData or draw a BitmapData to screen. If I can't than how can I give a DisplayObject my BitmapData?

View 2 Replies

Flash :: Professional - CS3 - Exported Movie Cuts Off Right Side Edge Of Fonts

Apr 21, 2010

I made a movie in Flash CS3. The exported SWF shows that the right hand side of some of my letterforms (made from a non-converted font) are clipped off. Switching fonts produces similar results. Is there some glitch in the program that I am no aware of?

View 9 Replies







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