I have a UIComponent and inside it I put a loader (which loads an image file).
THE PROBLEM: Even though I resize the UIComponent(to a square), it will still follow the size of the image in the loader. But when I resize the image in the loader, it will become stretched. What I want to do is have a container(UIComponent) that has a fixed square size and after the image has been loaded it will just fit in the dimention of the container without being stretched.
I am trying to figure out if it is possible to click and hold an image loaded into the uiLoader?
What I would like to acchieve is an image gallery which loads a big sized image, but first it would resizes it, to the half of its original size and when the user would click on it, the image would zoom to 100%, and by holding the left mouse button he would be able to scroll the image (left, right, up or down).
Ive found all sorts of answers but not the right answer. Im using the loader class to load images into a gallery. Im placing the image inside a movie clip. I want to resize the images as users will dynamically load them but width is not working. scaleY works and scaleX
I'm looking for the best way to get a flex 4 image object to resize and horizontally center whenever its parent container (a custom component based on group) resizes. I cannot set horizontalCenter="0" to accomplish the image centering because I use a move transition to "slide" the image in and out of view.
I'm externally setting the image source in the component. Here is a simplified example of my component code that only addresses resizing the image.
i want to add UIComponent inside a spite. here is the code:
private function make() : void { var circle : Sprite = new Sprite(); circle.graphics.beginFill(0xFF0000, 0.2);[code]......
the problem is that button is added, but is not displayed. if i do reversed - add sprite to uicomponent - everything works fine, but this way it doesn't work. i tried to use invalidate functions for button etc... even tried making "circle" as UIMovieClip, but no luck - button is still invisible. also if i simply do "addChild( button );" - it is shown,how can i add a button inside a sprite?
Since there is no Flex forum on this site, I will ask here (or mod just move it to correct place). UIComponent tutorials always have this graphics.draw or whatever the call is in the updatedisplaylist overrided method. Why don't I see any tutorials or any documentation that shows how to put image data from a FILE into the UIComponent (a png, jpeg, whatever). Drawing anything by writing code is retarded. I am not going to draw a picture of a bird in code. In the gaming world, the C++ (or c# for xbox) programmer isn't the 3D modeler. And even then, the 3D modeler isn't the dedicated artist.
For instance the mx.controls.Image objects are only displayed when i add them directly to the main application object. If i add a "subimage" to the previously created Image object it simply doesnt show.
What I want to do:
var img : Image = new Image; var subimg : Image = new Image; img.source = "images/panel.png";
I can;t figure out how to do this. Someone selects and image after calling FileReference.browse(). I take that image and make a thumbnail in flash. Then I upload that image like so:
[Code]...
All this does it upload the original image. How do I change the fileRef to upload the new thumb? I have traced out the size of the "myThumbImage" and it is correct. I have placed it visually on the stage after creating the thumb, and it seems like it works. But when I upload it to an aspx page (that basically just throws it into a folder), it uploads the original larger image.
I have created a image cropping tool in flex using core copyPixel method.croppedBitmapData.copyPixels(croppedBitmapData, clipCan, new Point(0, 0));I have to crope area of dementions 20*20 and show this cropped area in an image of demention 250*350. Every thing going well.My problem is image distortion.Even i am using this method for smoothing image contents on complete.
private function smoothImage(event:Event):void { var bitmap: Bitmap = ((event.target as Image).content as Bitmap);
I have an mxml panel in which I'm using a repeater. The panel can be resized horizontally and I would like for the repeated components to resize together with panel. Here is a simplified example of how things look like:
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" ...> <!-- scripts and some controls --> <mx:VBox width="100%">
So I'm having difficulty with this one, basically I am working on an XML image gallery.Load XML - with Image and Thumb paths in itoad thumbsWhen you click a thumb it loads corresponding image etc.When I load in the image I need it to load proportionally into a MC.This is the basics of how I have it at the momentCode: Select all box_mc.addchild(Image) // so it's loading into the box_MC which is H:300px W:500
if (Image.height > 300){ Image.height = 300; Image.scaleX = Image.scaleY;
I am trying to create a gallery where each thumb is housed inside of it's own movie clip that will have more data, but it keeps failing because it won't let me refer to the newly created instance of the movie clip. Below is what I am trying to do.
var xml:XML; var xmlReq:URLRequest = new URLRequest("xml.xml"); var xmlLoader:URLLoader = new URLLoader();
I was wondering if anyone knew how to scale pictures when doing a website in FLASH. I am creating a flash based website for a friend. I have done all the links and it works greatThe only thing is that the images increase as the web browser is maximised.I would like it to decrease as the web browser is decreased, but to increase to a certain size 900 x 651, and stay that size no matter how big the browser is increased by.
I have been racking my brains trying to figure out how to do this but I can't! The two pictures I have given are different sizes to represent different browser sizes. The 'menu' stays the same size in the same position and the image/ greyblock scales proportionally to the browser keeping the same border sizes around the image.
I have a flash file that is pulling images in dynamically from a PHP page. The images will come in all different sizes so I need to resize them once they are loaded to fit in the containers that they are being loaded into...I thought onEnterFrame was the best way to do this? So I have the following:
Code: onEnterFrame = function (){ for (i = 0; i < 9; i++){
how to scale pictures when doing a website in FLASH.
I am creating a flash based website for a friend. I have done all the links and it works great. The only thing is that the images increase as the web browser is maximised.
I would like it to decrease as the web browser is decreased, but to increase to a certain size 900 x 651, and stay that size no matter how big the browser is increased by.
I prepared a galley for my client that should load an external image, re-size it and appear while it fades in smoothly from alpha 0 to 100 (motion tween).
The thing is that it looks like the re-size interferes with the fade in action (motion tween from alpha 0 to 100) and as a result, it stuck in the middle of the fade in action. If I load it directly to a single key frame (without any motion) it works properly.
I have attached the code I am using below and attached the FLA so you can see it in your own eyes (change the fla.txt to fla.fla so you can open it with you flash app)
ActionScript Code: // //set stage for FBF var loader2:MovieClipLoader = new MovieClipLoader();
I have a little problem regarding resizing in flash. I dont know if it is possible in Flash MX, since the image size is too large to fit in to my target MC, say 800x600 px pic, loaded into an MC which has a size of 160x130 px.in my MC, i want to load an image (pic1.jpg [800x600 px])loadMovie("pic1.jpg","holder")it loads into the holder MC(instance name), but in the end resizes the MC which destroys my design.All i wanted is to load an image into a "holder" MC which is located at the root, without resizing it. Say, if an image is 800x600 px, will resize depending on the MC where it is loaded. From 800x600 px to 160x130 px.
I have a little problem regarding resizing in flash. I dont know if it is possible in Flash MX, since the image size is too large to fit in to my target MC, say 800x600 px pic, loaded into an MC which has a size of 160x130 px.[code]...
I have 1 class (that is extending a UIcomponent) that is representing a component. In that component I create different instances of another class that is also a UIComponent but this class doesn't show up in de first class. I see that it is running and that it has the correct hights but I got the feeling that it doesn't show up with this hights. If I trace I see the width and height is 200 X 200 but there is still nothing visible in my component.
I am trying to display a bytearray as a resized image. The Image is displaying correctly, but the sizing is off. Let me explain.
First I have the image data encoded so I need to decode the image data
// Instantiate decoder var decoder:Base64Decoder = new Base64Decoder(); // Decode image data
[Code]....
This works. The image is displayed correctly. However, if I hardcode the image (img) height the resized image is shown correctly, but within a box with the original image's dimensions.
For example, if the original image has a height of 300px and a width of 200px and the img.height property is set to 75; the resized image with height of 75 is shown correctly. But the resized image is shown in the upper left corner of the img container that is still set to a height of 300px and a width of 200px. Why does it do that? And what is the fix?
The best way to illustrate the problem is by placing the image inside a VBox and show the borders of the VBox. From the code block above, if I change the image height and set the image to maintain aspect ratio (which by default is set to true but I add it here for completeness). the problem becomes clear.
// Display image var img:Image = new Image(); img.height = 75; // Hardcode image height (thumbnail) img.maintainAspectRatio = true;
I'm trying to resize a .jpg file that I'm loading in the loader class, and I can't get it to work. Here's the code I'm working with. (Note: I had to cut the URL to the jpg out because the forum blocks me from posting URLs with images!)
ActionScript Code: getURL = new URLRequest("*URL to a jpg goes here*"); // Load slide image from URL
It resizes the first picture perfectly, but after I click the button, the new image comes out way too small, I cant find the error anywhere pilt2 is 1952*2608 pilt3 is 500*375