I am loading an image using a Loader. Once loaded, I can get the bitmap data using Bitmap(event.target.loader.content).bitmapData.
However since the images I am loading are quite large (around 2000 x 1600), I would like to reduce the size and create a new smaller bitmap maybe 200 or 300 pixels wide, sort of like a thumbnail. I think it has to do with creating a new BitmapData with the new size. However I am not able to get that working properly.
in fact i used fr-ode's full-browser image code. but i dont want to generate full browser images. i want to build a structure like [URL] as you see in site, photos scaling automatically when you resize the window. can anybody write me a statement for this? here is the fr-ode's code which distroyed by me
I am trying to take images I am placing in a flex canvas component to a bitmap. I was able to get to the point where I'm not getting an error but then no image shows up and the image I save out as a jpg is blank. I imagine I'm not setting the bitmap data correctly but can't figure out what I am doing wrong.
Here is the code where I am converting it to a bitmap:
I need to create a lot of custom Flex 4 skins, in most of the examples I found on the web people use FXG in order to create the skins but if a lot of the icons I use are not resizeable should I still use FXG or better use just plain old bitmap images (jpg. png)?
I've got an image that I need to programatically add to the stage. In Flash CS4 I did an Import to Library, Export for ActionScript, gave it a name 'myphoto', then inside of a custom class that extends Sprite, I do this:
var bmd:BitMapData = new myphoto(100,200); var myphotoBitMap:BitMap = new BitMap(bmd); addChild(myphotoBitMap);
It shows up on the stage much larger than 100 x 200. I tried
but that gets ignored, the image is still far too large.
I tried resizing after the Added and AddedToStage events, thinking maybe my resizing commands were not working because the image was still being processed in some way, but this doesn't work either.
Is it possible to change the Bitmap size Dynamically in As3..Which is created from the movieClip . var myBitmapData:BitmapData=new BitmapData(450,282); myBitmapData.draw(my_mc); Now I need the same bitmap of 620X225. How to resize the bitmap without modifying the movieClip height and width.
i've been working on a project.. right now, i'm required to make something similar to tilelist component. i've to load external jpgs through as3, and then to resize on the stage.. what i'm looking for is: is there any way to render resized bitmap through as3 like flash does in tile-list component?
So I am working on this project for work and we have a bunch of sprites with transform matrix that contain the rotation, scale, x, and y coordinates of various parts of a character, i.e arms, legs etc. so we are then drawing the individual sprites onto the same bitmap data. Then we store it in a vector and display it later.
The problem is the models are too big. So I want to resize them, without having to rebuild the entire matrix, since I don't want to go through every matrix in the sprites and manual calculate the scale, rotation, x, and y after it has been made samller. Is there a easy way to do this? To resize the bitmap data and maintain the data that is already set up to construct the model? I can't share the code but the psuedo code is: we create a bitmapdata of a specific width and hight.
We the loop through all the children of a wrapper sprite and do a bitmapData.draw of each of the children and use their matrix for the second param, and then have it build to the bitmap.rect.
I'm using the following code to load a .jpg into a movie clip container the problem is I need the container to be a specific size I tried loader.content.width = 50; and loader.content.height = 50; the height part works but the width doesn't work my image just expands beyond the stage width.How do i set the size of the movie clip container?I don't care if the image gets distorted i have a resize script for the images before they are loaded into flash.[code]
I am trying to resize an image and display it on stage but i get the.......... error 1119: Access of possibly undefined property bitmapData through a reference with static type flash.display:BitmapData........this is driving me a bit mad because i got most of the code out of essential actionscript 3.0.....I've tried to debug it myself but my debugging skills aren't very good yet
I am loading a fairly large image file and want to create a bitmap of the loader content. I want to then use this Bitmap and resize it according to the current dimension of the stage. However, I also want to keep the loader content as "originally loaded" as a reference in case the stage is resized and the user wants to view this particular image again. The way my AS is written as of now, I am manipulating the loader content. How do I not do this? How do I "copy" the loader content so I can manipulate the bitmap copy while leaving the loader content unaltered?
<AS> var lightboxImage:Bitmap = new Bitmap(); function resizeLightbox():void{ lightboxImage = myLoader.content; lightboxImage.width = myLoader.content.width; lightboxImage.height = myLoader.content.height; [Code] .....
If I have a BitmapData that's already been drawn onto a Sprite. Is there a way to redraw the BitmapData onto a Sprites Graphics object without having to invoke beginBitmapFill and passing in the same BitmapData?
I have Buttons which I have rotated vertically within a Canvas, that is working fine. The problem occurs, when the user resizes the window to a small size a vertical scroll bar appears, I would rather have each button squashed upto a smaller size.
I am loading images from a remote URL using the following code so that I can smooth and add colour effects to the bitmaps.The code is courtesy of this guy's nice example:
Code: import flash.display.*; function loadBitmapSmoothed(url:String, target:MovieClip) {
In the following application images are attaching from library as bitmap. But i want to load it externally.Actually what I am trying to do is that i want to divide an image in to several pieces and giving a disolve effect for transition. I got a code in which images are loading from the library as bitmap object. I changed it and loaded externally using bitmap, but i cant divide images in to small pieces. I think its due to the problem of loading as bitmap.i just want to modify the following code to load image externally.
I am having trouble storing bitmap images into an array. The following code snippet creates an array called "imageArr" and its intention is to store all the bitmap images in it. The images are captured from the user's webcam and should then be stored in the array. However, when I display the images it can only display the last image taken.
ActionScript Code: var bitmapData:BitmapData = new BitmapData(video.width,video.height); var bitmap:Bitmap = new Bitmap(bitmapData); var imageArr:Array = new Array();
As the heading dictates, i want to place bitmap files on the faces of the 3D object that i have created.Basically i found this tutorial code on a 3D rotating cube that is able to be rotated by the mouse. I have modified it to change its shape from a cube to a 'plane' or rectangular style object.
Code: var vertsArray:Array = []; var facesArray:Array = [];
I have created a class called LoadXML that loads an XML file and parses the data returning various arrays consisting of url paths: background urls (called "hintergrund"), image urls ("pfad") etc. In the main class I am trying to load each of these background urls and insert them each in a seperate cover (for a CoverFlow carousel). The images will then be loaded in the same cover and should appear on top of the background.I havent been able to insert multiple images in one bitmap. This is what my image loading methods look like:(I also added my LoadXML class and xml file in the attachments).
I was wondering if anyone could give me some tips on how I can resize this carousel as in the canvas size and the images. The other thing is, what do I need to do to be able to add new images to the folder so they appear in the carousel? At the moment when I do this they don't appear.[code]
I am creating an upload tool for an image gallery. The swf uploads the files with filereference to a php files which resizes the images. But when the images are larger than 600kb it fails, php runs out of memory and I can't edit the php.ini file on the server.
So my solution is to resize the images before uploading them, this saves also bandwidth.
I have a flash file that imports multiple images and places them on the stage. I want the images to be resized to the same, smaller size. However, the AS3 I am using is only resizing one of the images and hiding the others. My code is below:
Code: var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("photos.xml"));
[Code]....
So how do I apply the resizeImg function to all images loaded from the xml file?
I am loading an rss feed into a dynamic textfield. I would like to resize the images from the posts so that they fit nicely within my textfield. Is this possible with css in Flash?i tried this
I have to produce a Flash banner advert for my company. The specs are Flash 8, up to 30kb.My company wants highest possible resolutions and smooth animations, but no matter what i do, either I have to lower the resolutions of my images or have to make the advert more static, none of which my company is happy about!I save images to the right size so i don't scale them in FlashI open each of the bitmaps and change their quality individuallyI clicked the compress movie buttonI optimised all the shapes that are in the filmI made sure all the objects used more than once or animated are movieclipsI used SWF optimiser but it didn't make any difference.
I just want to know that when loading three consecutive images in a row (via LOADER() and URLREQUEST()), if I only need to watch for the completion of the last image load. Or, will all three files load simultaneously (the smallest file completing first)?URL...