Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Crop Bitmapdata To Create New Bitmap



I want to be able to crop an image based on what is viewable through the mask and then saved that cropped image out to a new file. I'm not exactly sure how to do this though. Does anyone have any suggestions?



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 10-29-2008, 09:28 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Resize Bitmap, Then Draw(Bitmap) To A Separate BitmapData, Doesn't Work Right...?
Hey everyone,

So, I'm loading a jpg into a BitmapData variable, which is liked to a Bitmap variable, then I resize the Bitmap variable.

Every 10 secs it unloads the current bitmap and loads a new one.

But I want to draw the resized bitmaps to a separate BitmapData Variable, except when I try and do that it draws it in the original size... ? Why doesn't it draw the new resized version?

Any ideas?

Bitmap Vs BitmapData
I'm excited to be learning AS3 with my new copy of Flash. But it seems to me the documentation has taken a step back since MX04.

So can anybody explain the difference between Bitmap and BitmapData class? I'm guessing that BitmapData is just used to manipulate the data and then the Bitmap is used for display?

Bitmap And BitmapData
is it possible to change a color range to another color using ActionScript 3.0 Bitmap and BitmapData classes? like image below



thank you very much

Vector Cached As Bitmap: BitmapData?
If, say, a MovieClip, is cached as a Bitmap, does it have BitmapData? I am wondering if setPixel32 can be applied to a bitmap-cached clip. Many thanks.

Extract Bitmap Or BitmapData From MovieClip
Hi guys

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?

Please mind that attaching BitmapData as a base class to this symbol is NOT AN OPTION

Vector Cached As Bitmap: BitmapData?
If, say, a MovieClip, is cached as a Bitmap, does it have BitmapData? I am wondering if setPixel32 can be applied to a bitmap-cached clip. Many thanks.

[F8] Bitmap Collision Between Movie Clip And Bitmapdata
How can i do a collision check between a movie clip and a bitmap data level.

How To Update A BitmapData Based On Changes To The Parent Bitmap?
I have a set of sprites in my game that all face to the right (there are lots of frames of animation, several hundred in total).

I want the sprite to be able to face both directions, so rather than mirror and duplicate all of the PNGs (sprite frames) I am doing it via code.

If I create a bitmap and then scaleX = -1 it reverses itself perfectly.

However, if you then access the bitmapData of that bitmap, the data remains exactly the same (facing the opposite direction), and isn't updated when you perform operations on it (such as scaleX).

Does anyone know a way to get around this?! I want to create a bitmap, flip it and have that bitmaps data reflect this change.

Cheers,

Rich

Resizing Bitmap And Retrieving Resized BitmapData
Hello.

I want to load a jpeg into my swf, resize it with smoothing, and then retrieving the resized bitmap data, ie the actual constellation of pixels that I can see resized to a thumbnail on my monitor, and then get rid of the large amount of data loaded in from the original jpeg. The reason I want to do this is that I'm going to load in multiple large jpegs (2000 x 1300 px), but I'm only going to present them as thumbs at the size of 200 x 130 px.

I'm having a hard time figuring this one out, because as I understand for instance the clone() method of the BitmapData class, all the data remains, naturally enough, even if the parent Bitmap object is resized.

Is it possible to acheive what I'm looking for?

I'm using Flash CS3, btw.

Thanks in advance for any help in this matter!

Anyone Know How To Convert A Library Bitmap Into A BitmapData Object?
Aye..as above...:

Anyone know how to convert a library bitmap into a bitmapData object? It seems like it should be an easy thing to do, but I just can't make it happen.

Many thanks,
a.p.

Change Loaded Bitmap In Bitmapdata Filer
Hello

I have this script who fills the entire window with one bitmap pattern:


Code:
import flash.display.BitmapData;

var tile:BitmapData = BitmapData.loadBitmap("tile");

function fillBG() {
this.beginBitmapFill(tile);
this.moveTo(0,0);
this.lineTo(Stage.width,0);
this.lineTo(Stage.width,Stage.height);
this.lineTo(0,Stage.height);
this.lineTo(0,0);
this.endFill();
}

fillBG();
I would like to change the background (when i press a button). How is this done?

I've tryed with this but it did not work:


Code:
var tile:BitmapData = BitmapData.loadBitmap("tile2");
thanks in advance

Bitmap "crop" Function?
I need to take in a bitmap and then trim the image to its smallest possible size so as to not have large blank areas in memory.

I have written the function myself, which basically loops through the bitmapdata to find the bounding rect, creates a new bitmap with new bitmap data, and calls copypixels().

But I'm wondering if there's any built in flash functionality that I should be aware of and take advantage of.

Thanks

Is It Possible To Create Gradients In BitmapData?
Hi,

I'm trying to animate a DisplacementMapFilter effect. What I want to do is to simulate a wave distortion that varies its horizontal wavelength.

In order to do this I have to animate not the filter properties itself, but the gradient map that supports the animation, so that the multiple gradients expand or contract along the x axis.

I already read some literature about drawing gradients on movieclip objects, but what I need to provide to the DisplacementMapFilter is a BitmapData object.

So, how can I draw a gradient directly on a BitmapData object?

Best regards,
Norberto

Create BitmapData For Each An Array Of Images?
I have an array of images needing to be loaded into BitmapData so that I can use "allow smoothing" with actionscript. The script below does it for one image, but I have a dynamic array that needs to be affected, and array's / for loops are still the death of me.

Any assistance is GREATLY appreciated.

import flash.display.*;
var srcImg = "bmp1.png";
var mainHolder = this.createEmptyMovieClip("main", this.getNextHighestDepth());
var original = mainHolder.createEmptyMovieClip("original", mainHolder.getNextHighestDepth());
var smooth = mainHolder.createEmptyMovieClip("smooth", mainHolder.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function() {
var w = original._width;
var h = original._height;
var bmpData1:BitmapData = new BitmapData(w, h, true, 0x000000); //true and 0 color allows for transparency
bmpData1.draw(original);
smooth.attachBitmap(bmpData1, 2, "auto", true); //true for SMOOTHING,
original.removeMovieClip();
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(srcImg, original);
main._rotation = 25;

Create Bitmapdata From A Binary String
I am not exactly sure what I am asking because I haven't been able to find anything on this topic. All I do know is that I have an image that is given to me as a binary string/array. Is there some way to take that binary data and convert it to an actual image using the bitmap api?

Thanks.

Use FileReference.browse To Create Bitmap
I have the filereference.browse portion working well. I just can't figure out how to take that and load the referenced file into a movieclip. Does anyone have any hints? Thanks in advance.

Create Bitmap From A Movieclip(vector-art) ?
I have a movieclip contains vector-based illustration. Can I create a bitmap object from it ?

Create Bitmap Of Dynamically Loaded Image
dear all,
i'm still getting to grips with as 3.0, so this maybe a simple query, but how do i create a bitmap of an image?
a loaded image has an object type of Object, while it appears bitmap class will only accept MovieClip objects.
do / can i need to convert the object type of my image?
thanks,
pt

Re: How Do I Create A Liquid Smooth Scalable Bitmap Background?
Hi,

I'm trying to mimic the behavior of the http://www.interpolnyc.com/ where the bitmap in the background scales smoothly to the browser size but the other elements don't move. i was able to make a .swf where the image tiled as the browser scaled but i don't want this. i want one bitmap to smoothly scale as the other elements remain fixed.

I know i need to adjust the fillBG function, any help is much appreciated!

Here's my code:


Code:
import flash.display.BitmapData;
text._x = 400;
text._y = 100;

var hurricane:BitmapData = BitmapData.loadBitmap("hurricane");

function fillBG(){
this.beginBitmapFill(hurricane);
this.moveTo(0,0);
this.lineTo(Stage.width, 0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0,0);
this.endFill();
}

fillBG();

var stageL:Object = new Object();

stageL.onResize = function(){
fillBG();
text._x = 400;
text._y = 100;
}

Re: How Do I Create A Liquid Smooth Scalable Bitmap Background?
Hi,

I'm trying to mimic the behavior of the http://www.interpolnyc.com/ where the bitmap in the background scales smoothly to the browser size but the other elements don't move. i was able to make a .swf where the image tiled as the browser scaled but i don't want this. i want one bitmap to smoothly scale as the other elements remain fixed.

I know i need to adjust the fillBG function, any help is much appreciated!

Here's my code:


Code:
import flash.display.BitmapData;
text._x = 400;
text._y = 100;

var hurricane:BitmapData = BitmapData.loadBitmap("hurricane");

function fillBG(){
this.beginBitmapFill(hurricane);
this.moveTo(0,0);
this.lineTo(Stage.width, 0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0,0);
this.endFill();
}

fillBG();

var stageL:Object = new Object();

stageL.onResize = function(){
fillBG();
text._x = 400;
text._y = 100;
}

Which Is A Good (preferably Free) Tool To Create Bitmap Fonts?
Which is a good (preferably free) tool to create bitmap fonts?
I want to create colored bitmap font.

Thanks

BitmapData::draw(BitmapData) Doesn't Seem To Support Alpha Channels
Hi all,

I have a BitmapData object with alpha channels, bm1, and would like to draw it into another BitmapData object, bm2. While I can draw bm1 into bm2, alpha channels do not seem to work. Here is some code to illustrate what I'm trying to do:

// create an all-green but semi-transparent BitmapData object (all alphas are set to 0x80 in the constructor)
var bm1:BitmapData = new BitmapData(100, 100, true, 0x8000FF00);

// create an all-white BitmapData object and display it
var bm2:BitmapData = new BitmapData(100, 100, true);
addChild(new Bitmap(bm2));

// draw bm1 into bm2 in the onTimer() callback function
bm2.draw(bm1);

I would expect bm2 to be light-green, because it's semi-transparent, but it's 100% green, i.e., 0xFF00FF00.

I already tried all blend modes, but blend modes didn't make a difference.

Any ideas?

Btw, what I'm trying to do is to extract an arbitrary collection of pixels (as opposed to a rectangle) from a bitmap (bm1) by copying it into another bitmap (bm2) and using alphas of 0x00 and 0xff to select the pixels to be extracted. Is there a better way to do this? (or any way for that matter? ;-)

Thanks!


-Bernd

[as3] Drawing BitmapData To Erase BitmapData
Hey there. I'm still working on my paint program, and I figured I'd try using the open source, raster-based drawing system from Bytearray.org to speed up drawing in some of my paint tools. The Raster class has some drawing functions that don't bother with anti-aliasing, so in some situations, implementing these methods results in faster code than relying on the Graphics package. I've gotten a nice speed boost from my rainbow paintbrush, which is pretty neat. Go open source!

Unfortunately, I can't get the eraser brush to work, even though its code is essentially the same as the other brushes'. And I've figured out why; the "erase" and "alpha" blend modes, which my vector-based eraser uses to erase the drawing surface, don't seem to work when you draw one BitmapData object onto another. I could put the BitmapData in a Bitmap object and draw that, but that's essentially converting raster data to vector, and then back to raster, which is far slower than any speed improvement I'd get from relying on the Raster class in the first place.

Has anyone here succeeded in using one BitmapData object to erase another, without "wrapping" the eraser BitmapData in a Bitmap object?

CopyPixels While Moving Bitmap When Overlay Layer Has Bitmap Effects Bug?
hi,

Wanted to create a walking character, using a large image of all this character postures as resource.

Did this:
1. Created a new Bitmap with its BitmapData
2. Created an EnterFrame event listener to this Bitmap where:
a. I move the Bitmap to the right
b. I change the character posture by copying pixels from the large image to the characters BitmapData

Works fine...

But then I've added another layer (sprite) on top of this bitmap.
Added a glow filter to this layer (sprite) and got the following bug:
The character (Bitmap) is leaving trails as it moves... as if Flash doesn't clean after it...

Please see attached files - it's all there, short and clear.

Basically, the pseudo code looks like this:
--------------------------------------------------------------------------------------------------------------
var __sourceBmpData:SourceBmpData = new SourceBmpData(72, 128);// SourceBmpData is a linkage name to an image on the library
var __imgBmpData:BitmapData = new BitmapData(24, 32, true, 0x00000000);

var __imgBmp:Bitmap = new Bitmap(__imgBmpData);
this.addChild(__imgBmp);

// add event listener
__imgBmp.addEventListener(Event.ENTER_FRAME, Walk);

// bug layer
var bug_mc:Sprite = new Sprite();
this.addChild(bug_mc);

var glow:GlowFilter = new GlowFilter();
glow.color = 0xFF0000;
bug_mc.filters = [glow];

// enter frame
private function Walk(event:Event):void {
__imgBmp.x = 32 + __posX * 12;
__imgBmpData.copyPixels(__sourceBmpData, new Rectangle((__posX % 3) * 24, 32, 24, 32), new Point(0, 0));

__posX++;
}

--------------------------------------------------------------------------------------------------------------

Is it a bug or am I doing somthing wrong?

Thanks,
EZ

CopyPixels While Moving Bitmap When Overlay Layer Has Bitmap Effects Bug?
hi,

Wanted to create a walking character, using a large image of all this character postures as resource.

Did this:
1. Created a new Bitmap with its BitmapData
2. Created an EnterFrame event listener to this Bitmap where:
a. I move the Bitmap to the right
b. I change the character posture by copying pixels from the large image to the characters BitmapData

Works fine...

But then I've added another layer (sprite) on top of this bitmap.
Added a glow filter to this layer (sprite) and got the following bug:
The character (Bitmap) is leaving trails as it moves... as if Flash doesn't clean after it...

Please see attached files - it's all there, short and clear.

Basically, the pseudo code looks like this:
--------------------------------------------------------------------------------------------------------------
var __sourceBmpData:SourceBmpData = new SourceBmpData(72, 128); // SourceBmpData is a linkage name to an image on the library
var __imgBmpData:BitmapData = new BitmapData(24, 32, true, 0x00000000);

var __imgBmp:Bitmap = new Bitmap(__imgBmpData);
this.addChild(__imgBmp);

// add event listener
__imgBmp.addEventListener(Event.ENTER_FRAME, Walk);

// bug layer
var bug_mc:Sprite = new Sprite();
this.addChild(bug_mc);

var glow:GlowFilter = new GlowFilter();
glow.color = 0xFF0000;
bug_mc.filters = [glow];

// enter frame
private function Walk(event:Event):void {
__imgBmp.x = 32 + __posX * 12;
__imgBmpData.copyPixels(__sourceBmpData, new Rectangle((__posX % 3) * 24, 32, 24, 32), new Point(0, 0));

__posX++;
}

--------------------------------------------------------------------------------------------------------------

Is it a bug or am I doing somthing wrong?

Thanks,
EZ

Can't See A Bitmap Under A Mask When Moving The Bitmap With Elastic Motion
The um... title... kinda said it all. I have a mask. I have a bitmap under the mask. I want to move the bitmap around with elastic motion so I put it in an MC and cut and pasted some functions.

I can see it moving fine when i delete the mask. And I can see it masked fine when I delete the functions. But when both are there I just get emtpy space.

Is there something I don't know but shoud about elastic motion and masks or is there something ****y going down and I probably need to post the FLA?

Thanks all,
-damnit.

Stretch Bitmap-filled Object W/o Stretching Bitmap?
I've got a bitmap-filled rectangle I'm using as a background. I'd like to resize the rectangle dynamically without stretching the bitmap, ie the bitmap needs to tile.

I can do it with BitmapData using the tile option, but it's really slow. Is there an easier way to do this that I'm missing?

How Can I Edit Bitmap And Save The Edited Bitmap In Flash
hi all

It would be appreciated if any one let me know how to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

Is it posible to save the bitmap data in flash?


thanks in advance

How Can I Crop The Top?
My client says my movie sits too low on her 15" monitor. I have a 17" and so it looks just fine to me. Anyway she wants me to remove the whitespace at the top. I already used marginheight=0 and topmargin=0 in the html portion.

When I try to change the height in Flash MX properties it crops from the bottom -> up. But I need it to take off some of the white part at the top, not the bottom. Does this make sense to anybody?

Help, if you can.

Thanks,

Shawn

How To Crop The Top ?
Im in a serious fix !!! after doing all the designing/animation in my flash movie, exporting it and putting it in my html page, i feel the swf has too much blank space on top. I tried reducing the movie height, but the movie reduces only at the bottom and not on the top. Can someone pls tell me how to reduce space on top, without having to rework on all the frames one by one (moving it up)

How Do You Crop An SWF?
I need help. Im trying to crop a swf file. When I go into modify/doc/ props and resize the files it always takes from the bottom. Is there anyway to reverse this so that it crops the top or even the side? Kinda of like resizing a canvas in photoshop.

Thanks?

Crop The Top Of A *.swf Or *.fla
i want to crop a *.fla file so that the top margin is reduced instead of the bottom. Is this possible?

Crop
sup guys, I need to make my .fla a smaller canvas size but I need to crop the top out, how do I control where the document will be cropped.?
Noir.

Crop Command
Hi folks

i just created an anim lying on top of a layer with an imported screenshot from my photoshop design. now i am looking for a command that is similar to the crop command in photoshop to cut out my animation and save it as swf.

thx

Crop Image
Let's say I have one tile map 200x200 with 100 images(20x20).
I know there are software's where I can crop the images and then import all of them to flash.
Is it possible to have the same feature using flash mx 2004 with the power of the new actionscript 2.0?
Thanks in advance.

Crop To Stage
Hi,

I'm creating some flash documents and sometimes I have extra stuff outside the document (stage) size. When I load this movie into a web page I see the extra stuff that was outside the document size. I've searched and searched but can't seem to find any crop features.

How can I crop the flash document to the document size?

Thanks!

Movie Too Big.... How To Crop?
So..... I'm using MX 6.0 .... First time project. I built my animation (movie) with sound on a document that was 40" by 40" . When finished I only used about 7" x 20" . Now when I launch the swf file, it plays very small in the browser, and I have to zoom in to see it.

I tried to make the document smaller, but because I built it in the center of the 40" height, when I make the document smaller... it crops out all my stuff.

If I move my beginning images closer to the zero,zero point... it only stays for the first keyframe.... then POOF - gone.

Is there a way to get this smaller, so it will be bigger when it plays in the browser?

Sidebar question. The music starts abrubtly (Frame 1 ) . Is there a way to add silence, or space before everthing in the beginning?

Much thanks in advance!

Grabster

Crop Movie Afterwards?
Hey there,

I have a simple question, I hope..

I made my flash movie to big for browsers, and I can't change everything..
So I'm wondering if there is a way with either actionscript or html to crop it to a certain size, but keep it all centered in my crop space? Any help would be awesome. Thanks in advance!

Crop The Stage?
I have a complicated flash movie and I would like to cut off the left 100 pixels of the stage. Is there any way to do this? Perhaps using actionscript (if there is no more straightforward way to accomplish it)?

G

Image Crop
i want to crop an image of 1000pixels wide in to three parts.. using actionscript.. how shall i do it... i heard a merge command in flash 8.. i don't know how to use it.. can any one help me with this along with the code...

or do any one know other ways to crop the image dynamically using actionscript.

How To Crop Photo?
Surely you can crop a photo in Flash 8 Pro, right? if so, I can't figure out how. Please help.

How To Print A Crop Of A Map?
How can I print a crop of a generated map with a headline and footer
stretched to the whole page size?

Lasso Or Crop?
I'm trying to figure out how to crop images smoothly, I know I can use the lasso tool but I don't know how to smooth out the edges, can somebody tell me how?

Flash Crop - Nearly There Just Need A Little AS Help
Hi,

I have a slightly ammended working version of www.sephiroth.it Flash Image cropping tool. However I was wondering if someone could help me figure out how to change part of the flash interface.

http://www.colourjam.com/dev/crop/

Upload a picture then draw a box on the image when it appears. What I would like is to be able to constrain the proportions of the drawn box so I can get a perfect square.

My version of the .fla is here:
http://www.colourjam.com/dev/crop/imageCrop.fla

Thanks for any help.

How To Crop The Stage?
Hi there, I got a swf file called 'NW_site_4_diap.swf' centered in my browser with html. At the moment, anything that sticks out from the stage to the surrounding area get's displayed in the browser. Now I'd like to crop the swf file at its stage size. How do I get flash or html to crop all elements to the exact stage size? Thanks!
Here's the html code I used:


HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nationale Waarborg</title>
<style type="text/css">
<!--
body {
height: 100%;
width: 100%;
margin: 0;
background-image: url(ONLINE%20070201/pattern_156.gif);
}
-->

</style>
</head>
<body bgcolor="black">
<!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="myfile" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="NW_site_4_diap.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<embed src="NW_site_4_diap.swf" quality="high" scale="noscale" bgcolor="black" width="100%" height="100%" name="myfile" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>
</body>
</html>

Crop Movieclip
Okey. the title is not as describing as it should be.
What I want to do now is to "crop" a movieclip that has several moviclips placed inside.. Meaning I want to move all moviclips so that their placed up in the corner of the main movieclip. x=0 , y=0. and I want to do this programaticly. (the movieclips must have the same placements between theme..)
are there a quick and easy way to do this?

http://home.no.net/thor918/cropped_moviclip.fla

If anything is unclear please ask
and thank you all for your help!

Edit,Edit:
Here are some work in progress

finding the x and y that I want to crop from.

finaly something that works. but since I want the change the visabilitys later on some of the movieclips, that it would be best to revert the changes from the crop and then crop again. hmm how do one do that the easiest way? I'm thinking loud here that perhaps I have to loop trough all objects and save the old x,y cordinates before I crop.


ActionScript Code:
public function cropme():void{               import flash.display.DisplayObject ;             var LowestY:Number = this.FindLowestY();            var LowestX:Number = this.FindLowestX();                        var childMovieClip:DisplayObject;            var i:int = this.numChildren;            while(i--) {                childMovieClip = this.getChildAt(i);                if (childMovieClip is MovieClip){                    trace(childMovieClip.name);                    if (childMovieClip.visible){                        childMovieClip.y = childMovieClip.y - LowestY;                        childMovieClip.x = childMovieClip.x - LowestX;                    }                }            }                    }                 public function FindLowestY():Number{               import flash.display.DisplayObject ;             var VFindTopY:Number= 3600;                        var childMovieClip:DisplayObject;            var i:int = this.numChildren;            while(i--) {                childMovieClip = this.getChildAt(i);                if (childMovieClip is MovieClip){                    trace(childMovieClip.name);                    if (childMovieClip.visible){                        if (VFindTopY>childMovieClip.y){                            VFindTopY = childMovieClip.y;                        }                    }                }            }            return VFindTopY;        }         public function FindLowestX():Number{               import flash.display.DisplayObject ;             var VFindLeftx:Number= 3600;                        var childMovieClip:DisplayObject;            var i:int = this.numChildren;            while(i--) {                childMovieClip = this.getChildAt(i);                if (childMovieClip is MovieClip){                    trace(childMovieClip.name);                    if (childMovieClip.visible){                        if (VFindLeftx>childMovieClip.x){                            VFindLeftx = childMovieClip.x;                        }                    }                }            }            return VFindLeftx;        }

PrintJob Crop
yo, can anyone tell me how to crop a print image so it only shows the bounds i want it to?

i have a game where the user creates images on the stage, and sometimes the images run off of the stage, i only want it to print the image section that is viable on the screen.

i havn't done to much with PrintJob so forgive the noob question, and the "ActionScript 3.0 Cookbook" makes no mention of PrintJob.

How To Crop Shapes?
Hello!

I'm wondering if it's possible to crop shapes in Flash? That is, cut off its edges, accurately, by defining its new size, rather than just cutting them off with the mouse. Similar to Canvas size in Photoshop versus Image size.

Thanks,
Peace.

Draw A Bitmap Line Or A Bitmap Polygon
I need to create a flash/flex/ActionScript3 program that allows user to draw lines and polygons with legends. The legends are provided as bitmap. I'm thinking that I have to use bitmapfill to do the work. Is this the best approach?

As the line may change the direction, I will need the bitmapfill to change direction following the direction of the line. What is the best way to do this? Any example out there?

For polygons, can we use bitmapfill to fill irregular shapes?

Thanks,
-Maggie

Copyright © 2005-08 www.BigResource.com, All rights reserved