ActionScript 3.0 :: Dynamically Scaling MovieClip Distorts Image

Feb 9, 2009

In my movie I have a few products that I resize dynamically based on which one is selected. the selected product is shown full scale while the other are scaled back. However the scaled back ones lose image quality and look pixelated. the products are currently movieclips in my presentation. Is there a way to use scale w/o it distorting the image? I'm currently using TweenLite for my tweening/scaling.

View 1 Replies


Similar Posts:


AS3 :: Scaling - Clips Text And Distorts Diagonal Line On Photographs

Feb 11, 2010

I used some code that I found, I think even from you guys the scale an external swf being loaded onto a background movie clip. Works great with the exception that it clips some text and creates some funny diagonal lines and some poor picture quality. I have a feeling that this is down to a slight difference in sizing some where along the line. The stage size is 2560 x 1440 being scaled down to any size, but as I mentioned I don't think the height and width are quite in sync for the widescreen format.

[URL]

// perform initial size check
checkStageSize();
// register to re-check when stage size changes
stage.addEventListener( Event.RESIZE, onResize, false, 0, true );

[Code]...

View 4 Replies

Image Distorts In Dynamic Text Box?

Aug 31, 2007

I am using Flash 8. For the site I planned to use dynamic text boxes for each page so my client can update the pages. There is no text, just an image.

Go to: [URL] After the intro, click on Featured Listings, Buyers Needs or Bio & References.

The image is distorted. Also, for some reason the dynamic text box is about 350px and the image size displayed needs to be 525 to fit correctly.

Here is the action script I used:

myData = new LoadVars();
myData.onLoad = function(){
myText_txt1.htmlText = this.content;

[Code].....

View 0 Replies

ActionScript 3.0 :: Adding Loader Object Distorts Image

Nov 3, 2009

I've loaded an image with a loader, and if I add the loader to the stage, all is well, the image looks fine. Although if I add the loader inside a display object container, then the image gets distorted- and on top of that, trying to change the width and height once its in the container doesn't work either.

View 1 Replies

ActionScript 3.0 :: Scaling An Image In A Movieclip

Nov 19, 2010

i have read a number of tutorials on the internet trying to find a fix to the problem i am having. Everytime i create a new movieclip using public var mc:MovieClip = new MovieClip(); the movie clip is created after setting the values and drawing a square to show it in the file. However when i add an image to the movie clip i created it scales to be the same size as the movie clip or half the size of the movie clip which isnt what i want.

mc.addChild( GameTile ); // add the square instance into display list
GameTile.loadBitmap("stronghold.jpg", 0, 0);

This is the code i use to add an instance of my image class to the movieclip called mc. I was wondering if anyone has a simple way of scaling the image to its original size within the new movieclip instance? I have tried various ways of scaling and it works but when the window is resized the image is not the correct size.

View 4 Replies

ActionScript 3.0 :: Scaling A MovieClip After Loading Image Into It?

Apr 23, 2009

I have a doubt regarding scaling a movieclip. I tried this method where I make a movieclip dynamically, add an image to it which I load from my desktop. The image appears fine. But when I scale the movieclip using the mc.scaleX and mc.scaleY properties the mc woudnt budge. There must be some other wat we can accomplish that. Can someone put in some thoughts on it. here's the code..

[Code].....

In the code I have not used the scaling codes since it doesnt work. And when I add the two line code, the image disappears, but the mc is on the stage which is clickable. maybe I should place my mc inside a container?

View 2 Replies

ActionScript 3.0 :: Tweening Large MovieClip - Moving X / Y And Scaling Image

Oct 7, 2009

I'm trying to tween a large image 6917x1500px. I'm moving the x,y and scaling this image. It's a jpeg, and the image really chuggs at certain sections. Has anyone tweened an object this large before? Should I be trying tween lite? I don't think that will work, because it just has less settings.

View 5 Replies

ActionScript 3.0 :: Scaling Movieclip Not Scaling But Repeating?

May 20, 2010

i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
 
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))

[code]....

View 4 Replies

ActionScript 3.0 :: Scaling A Movieclip Without Scaling Its Contents

Apr 10, 2009

I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?

View 2 Replies

ActionScript 3.0 :: Dynamically Create A Movieclip Of An Image?

Feb 23, 2011

I'm Java developer in transition to AS3, my task is to create one of those spaceship games ( beathazard / asteroids style ) but im already being destroyed by the differences between these languages.... im trying to make this game completely through AS3, in other words, trying to evade manual setup as much as possible, at this moment, im trying to create my spaceship (an instance of my SpaceShip class), my background (instance of my Scenary class), my bullets (instance of Bullet class) and my game ( Game class ).

The first problem im having is that i cant seem to make the ship find its sprite while executing its constructor so i can create a new instance of it and add it to my game (actually, my scenary).[code]...

View 3 Replies

ActionScript 3.0 :: MovieClip On Dynamically Loaded Image?

Jun 9, 2009

I am using Flash CS3 and ActionScript 3.0.I think there is someone who spends 2 minutes of your valuable time in providing solution for my problem or issue.

My description for my problem(with layer numbers/names) starts from here: Layer-1: I am loading an external image(.jpeg) onto the stage dynamically when "Submit" button(which is created & placed in Layer1) is clicked using the following sample code:

[code]...

The jpeg image is loaded perfectly and works fine.

Layer-2:When I click on this loaded image, a Pop-up must be visible. So, I created Pop-up in Layer2, which is nothing but a MovieClip(with instance-name myPopup), is a rectangular box with light-yellow colored background, which makes us to feel like a pop-up). So, I created this Pop-up in a layer named "Pop-up". My requirement is : Whenever I click on the image loaded, I need to view the Pop-up upon this loaded image near to the pixel-position where CLICK_Event has occured.To view an example of my requirement,just go through the following [url]Once you open the above url, then you right-click on the right-side image(which is a geographical map). You can view a Pop-up with some of the items(viz., Directions from here, Directions to here, Zoom in, Zoom out & Center map here)

Layer-3:In the same way, in my application ,I want to display few hyperlinks on this pop-up. So, I had created TextFields on the stage(which are hyperlinks) using "Text Tool from ToolsBox" in Layer3 named as "TextFields". I am accessing these TextFields using
<TextField-instance>.htmlText to make it a hyperlink.So, here my problem is: After loading of the jpeg image, When I try to click on the image, the Pop-up(MovieClip) and "Submit" button appears to be under the loaded image and the TextFields are visible over the loaded image.Hence textfields/hyperlinks visibility works fine i.e., on the loaded image as hyperlinks.

Now, What I should do in order to make the MovieClip(Pop-up) and "Submit" button visible on the loaded image?

View 4 Replies

ActionScript 3.0 :: Resizing A MovieClip According To The Size Of A Dynamically Loaded Image?

Jun 10, 2009

I wonder if any of you can point me in the right direction. In my stage I have a movieclip where I want to load several images with different sizes. This mc called "container" adds the loader to the stage so I'm asking for the loader width and height once has finished loading and then passing these to the width and height of the mc container so it resizes accordingly. But...it doesn't work. Here is my code:

[CODE]
var pic:Loader;var totalImages:int = 10;for (var i:uint = 0; i<totalImages; i++){ pic = new Loader()  container.addChild(pic) pic.load(new

[code].....

View 3 Replies

ActionScript 2.0 :: Applying Glowfilter To .png Image Dynamically Loaded Into A Movieclip??

Mar 2, 2007

am loading a .png image into a movieclip using loadMovie(). i wanna put a glowfilter on the .png image once it's loaded into the movieclip. is that possible? how?!

View 5 Replies

ActionScript 3.0 :: Dynamically Changing Of Properties (image Source) Of Movieclip

Jul 6, 2009

I did small flash where i exported layers from Photoshop and converted them into movieclips. currently i need to change they image source to other when i click on button. this one is required to make swf file smaller to load files after loading swf file itself. i found how to do it but in this case i cant change size of picture.

Code:
function img5(e:MouseEvent):void{
var imageLoader:Loader = new Loader();
var imageRequest:URLRequest = new URLRequest("images/Water lilies.jpg");

[Code]....

View 2 Replies

Actionscript 3.0 :: Scaling A Box Dynamically?

Jun 2, 2009

I am trying to scale a box with handles.

It looks like this:

I am trying to create a function but I have to admit to myself I don't really know how to do this Here is the code with some things I have been trying. I do get it to scale. But the rectangle moves.

Code: Select allif(scaling)
{
var scaleDistX = scaleMouseStartPosX - mouseX;
var scaleDistY = scaleMouseStartPosY - mouseY;

[Code].....

View 1 Replies

ActionScript 2.0 :: Swaps The Depth Of A Dynamically Loaded Image When RollOver Each Movieclip (button)

Mar 23, 2004

I have three movieclips (used as buttons) on my main MC. The following code swaps the depth of a dynamically loaded image the when I rollOver each movieclip (button). I want to put the button.rollOver code in a for loop so I dont have to repeat this code for every image loaded.

[Code]...

View 3 Replies

ActionScript 2.0 :: Dynamically Scaling An Object?

Dec 22, 2004

I managed to scale a movie clip's width with easing. With this code:

onClipEvent (enterFrame) {
endWidth = 50;
_width += (endWidth-_width)/speed;
}

But it scales both from left and right sides i just want the left to be stable and right to scale.Shortly A box which width is 200 will become 50 but the scale will be from the right.

View 11 Replies

Actionscript 2.0 :: Proportionally Scaling Dynamically Sizing Mc's

Apr 24, 2009

I need to scale a movieclip to fit the width of the screen and it's height to stay proportional. I have code that's always worked fine but, in this case, the movieclip is constantly changing size and this throws off my code, scaling it incorrectly when using a listener (it's initial scale is perfect).

Code: Select allgreybar._width = Stage.width;
greybar._height = Stage.height;
greybar._xscale = greybar._yscale = Math.max(greybar._xscale, greybar._yscale);

I imagine it's because it has shifted from the size it's proportions were read from by the time it applies them. I know my problem is theoretically solvable because the movieclip can be scaled correctly if I scale width and height equally. However, I need the movieclip to always be the width of the screen.

View 4 Replies

ActionScript 2.0 :: Scaling And Resizing Dynamically Loaded Images?

Apr 9, 2009

Im building a site for a photographer, all images are xml driven.. When a thumb is clicked the full size image is loaded into an empty movie clip.

I am after a similar effect as seen here..[URL] If you resize the window the image resizes to scale...

I have managed to align the rest of the movieCLips to the stage when it is resized in its right positions just can't get the image to resize!.

View 3 Replies

Actionscript 3 :: Why Does Setting Different ScaleX And ScaleY For Textfield Distorts The Text

Jul 8, 2011

i have a textField wherein i uses embedded fonts, the problem is when i change its size and i do not set the SAME scaleX and scaleY value, it seems to compress the letters inside it when i make it smaller, and stretch the text when i make it bigger... i tried using width and height values (instead of scaleX and scaleY but its the same result)... it seems that the embedded fonts are maintaining some kind of aspect ratio or whatever, and again this only happens when embedFonts is set to true

View 2 Replies

CS3 Scaling Webpage And No Vector Image?

Nov 15, 2010

I have made a webpage that scales to the size of the users screen. Now i'm having to following problem. There is a image gallery in this website that makes use of an XML file. Everytime when the website is scaled to a bigger size the image gets unsharp. This only happens to the external image that is displayed in the gallery since the flash elements are all vectors.I was already thinking about a higher DPI rate or using different images.

View 2 Replies

ActionScript 3.0 :: Image Scaling In Flash?

Jun 3, 2007

I'm having problems scaling images in Flash with ActionScript 3.0. The only way I can see to get the quality decent is by using smoothing, which drastically hurts performance.

The thing that confuses me is that I made the same site in ActionScript 2.0, targeting Flash player 7, and the image quality is fine when scaling even without smoothing. As soon as I target Flash player 8 (or 9 with Actionscript 3.0) the quality degrades when scaling.

I don't have to move back to Actionscript 2?

View 4 Replies

ActionScript 3.0 :: Scaling Image To Fit On A Frame?

Oct 13, 2009

I'm currently having a problem regarding scaling an image to fit on a frame. Well I tried searching this forum, found some results, tried it but not working with me.So here's the situation, I have a frame with a size of 260x300(width/height). What I want is to scale all images(jpg) automatically to that size when loaded.By the way, I'm currently making my own flash playlist and the image I'm talking about is the album art.

View 1 Replies

ActionScript 3.0 :: Scaling Image From Loader?

Aug 23, 2010

I'm writing a movie that should load image from external location and display it in placeholder. I called placeholder "imageMC" and I gave it dimensions on 250x250 px.Next I load image using Loader class and I'm waiting for complete event.After that I try to resize image so it will fit to placeholder. I also want to keep fine aspect ratio.My code looks that:

ActionScript Code:
function onComplete(e:Event):void {
var wFactor:Number, hFactor:Number, originalWidth:Number, originalHeigth:Number, newWidth:Number, newHeigth:Number;
originalWidth = loader.content.width;

[code]....

The problem is line: "imageMC.addChild(bmp);". When I add a bmp as child of imageMC the trace statement looks like:

Quote:

250:187 //loader.content dimensions
252.05:362.4 //imageMC dimensions ??!! WHY THEY ARE CHANGED???
250:187 //bitmap dimentsion

and imageMC resizes his heigth and display image wrong scaled.But when I add bmp as child of stage: "addChild(bmp);" trace looks like:

Quote:

250:187
250:250
250:187

and image is scaled propertly.What is cause of this error?

View 2 Replies

ActionScript 2.0 :: Scaling An Image Proportionally?

Apr 11, 2005

I need to scale an image so that it won't distort. Of course I don't know the dimensions of this image.I tryed something like this but it doesn't seem to work at all.

Code:
loadMovie("../ImageUploadFolder/optimized_images/" + this.file, "_root.back_mc.image_panel_6.imgContainer6");

[code].....

View 14 Replies

ActionScript 2.0 :: Scaling Dynamic Image?

Feb 21, 2006

i am trying to load the image in MC and i want to scale the image proposinate from the center.

View 2 Replies

ActionScript 2.0 :: Scaling An Image In Flash?

Apr 24, 2003

can scale a group of images with different sizes into one fixed size?

In other words, I have an array of images coming into my movie. that have different sizes. I place each image upon a Mc that resides inside another movie clip and resize accordling. The problem is, all of the images have to be the same size. I want to be able to import any size image and scale and resize it to a specific size.

View 6 Replies

ActionScript 3.0 :: Scaling An Image To Fit N Pixels?

Jan 17, 2010

I thought this was going to be easy, and hopefully for someone it is, but I'm having a tough time so thought I'd ask here...

I have an image - say 50 x 30 - 1500 pixels.

I need to scale it so that it keeps it proportion, and takes n pixels - say 20 for example.

View 5 Replies

ActionScript 3.0 :: Keep Image Quality When Scaling?

Mar 10, 2010

I load pngs to my flash project. The media size in the project is 1000x635. When I scale my project bigger than the that size I loose quality. the project is used on many different screens therefore scaling is needed.

Is there a way to keep image quality when scaling?

View 1 Replies

ActionScript 2.0 :: Constraint Scaling Of Big Image?

Jul 17, 2010

i placed a fullscreen background image in my website but when i scale my browser window it also scales unproportionaly (or distorted).

Code:
Stage.scaleMode = "noScale"
Stage.align = "TL";
bgTest._width = Stage.width
bgTest._height = Stage.height

[code]....

View 6 Replies







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