ActionScript 3.0 :: Proportional Image Scaling - Transition?

Jan 27, 2012

I have the following code from FW to scale my background image while keeping proportion, however how do I change/fade into other pictures using Pic as my MC?

Code:
//set stage for FBF
//set stage for FBF
stage.align = "TL";

[code].....

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Proportional Image Scaling ?

Nov 17, 2010

I have been following the instructions posted here on how to achieve proportional image scaling: http:[url].....I want to have one image background for one frame, and then another image background on another frame... so when the viewer goes to different parts of the site the scalable background image changes.I copy and pasted the AS3 code into the actions section for the frame:

//set stage for FBF
//set stage for FBF
stage.align = "TL";[code].....

It gave me a duplicate function error.So I changed all the variables 'pic' to something else... for example,'pic1'.Still didn't work. Then I changed 'sizeListener' to 'sizeListener1', still didn't work.Then I changed'scaleProportional' to'scaleProportional1' and it kind of worked, but keeps giving me the error that 'scaleProportional1' but still keeps giving me errors.how I can implement multiple instances of this scalable background script on multiple pictures without conflicts?

View 2 Replies

ActionScript 3.0 :: Proportional Scaling External Image To Stage

May 6, 2010

I know but basically I want to place some images on the stage and I want every image, whether big or small, portrait or landscape, to be scaled to about a quarter of the stage size.
 
I have tried coding this myself and even tried many suggestions found on the web, but they all seem to do the same thing. The code either sizes every image to be equal in width and varying height, or scale every image to be equal in height with varying width.
 
Say you have some images all the same size, but some in landscape orientation and some in portrait orientation. Most of the code I found for "proportional scaling" would scale the landscape images okay, but make the portrait images the same height as the others, so they looked alot smaller. Or the reverse was true.
 
example:image.width = stage.stageWidth;image.height = stage.stageHeight;
( image.scaleX < image.scaleY ) ? image.scaleY = image.scaleX : image.scaleX = image.scaleY;
 
This makes all the images fit on the stage all right, but they all have the same width. reversing the equality amkes all teh heights the same.
 
If two images did not have the same width before they are scaled down, they should not have the smae width afterwards in my opinion.
 
Sometimes I get some code that seems to work, then I change the stage size to check it and all the images did not scale to 1/4 of the stage new size when the FLA was run.

View 4 Replies

ActionScript 3.0 :: Tween MovieClips - Proportional Scaling X And Y

Jan 28, 2011

I'm currently using the Tween-class to tween my movieclips (just the basics as x-position, etc.). But I'm struggling to tween scaleX and scaleY as the tween does not seem to take care of the centerpoint of the movieclip. I want the movieclip to scale proportional and not just from left to right.

View 3 Replies

ActionScript 3.0 :: MovieClip With 5 Images - Proportional Scaling

Jan 19, 2010

I have a Movieclip containing five images in a row. I have seven images inside a mc next to eachother like a T (Five across and three down) with one image being the center image. The images are under a mask an then the images tween on the X and Y but obviously only the masked part of the image is visible. The mask is 1280x649 and I was wondering how to proportionally scale only the masked area to full screen. I have the following code which works perfectly on a single image inside a mc but how do I do now?

Code:
stage.align = "TL";
stage.scaleMode = "noScale";
var picHeight = pic.height / pic.width;
var picWidth = pic.width / pic.height;
[Code] .....

View 7 Replies

ActionScript 2.0 :: Proportional Scaling Mc In Liquid Layout?

Mar 12, 2011

I am using the following code to fill the browser window with an image and scale it up or down....works great. I would like to proportionately scale a mc but not have it initially fill the screen. It would start centered in the window at a initial size but then scale up as the browser window opens but not scale back down below it's original starting size.

this is the code for the full screen:

port1Height = new Object ();
port1Height = port1._height / port1._width;
port1Width = new Object ();
port1Width = port1._width / port1._height;

[code]....

View 0 Replies

IDE :: Proportional Scaling MovieClips Relative To Stage?

Jan 30, 2009

how to proportionally scale multiple movieClips relative to the stage size.

I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally)

But

I can not figure out for the life of me how to scale other movieclips in relation
to the stage size.

for example I have a background_mc that proportionally scales with the stage
to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion?

Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently.

I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's

this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

Code:

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

[Code]....

View 7 Replies

ActionScript 3.0 :: Proportional Scaling Makes MC Disappear

Feb 11, 2010

I'm creating a simple liquid flash site layout with one MC that does not scale and remains at a constant position, and one mc that should stretch to fit either the height or width (whichever's larger) of the stage, but scale proportionally. [code]...

View 3 Replies

ActionScript 3.0 :: Proportional Scaling MovieClips Relative To Stage

Jan 30, 2009

I need some assistance on how to proportionally scale multiple movieClips relative to the stage size. I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally) But I can not figure out for the life of me how to scale other movieclips in relation to the stage size. for example I have a background_mc that proportionally scales with the stage to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion? Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently. I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

[Code]....

View 2 Replies

ActionScript 3.0 :: Outside Stage And Objects Proportional Scaling To 100% With Resizing Capabilities?

Feb 23, 2011

i am looking for class or something to proportional outside scaling of stage and all included objects (internal or external).I know SWFfit and LiquidStage. I have got many problems with integrating SFWfit to my code (resizing is not affected to included objects). LiquidStage seems to be ok but it`s not freeware . I am looking for free possibilities to do it.I am trying to connect that with GAIA framework.

View 3 Replies

ActionScript 1/2 :: Proportional Resize Of An Image

Jun 18, 2009

I'm trying to do a proportional resize of an image. I know the image's original dimensions (which vary from image to image) and then I know its intended height in pixels. How do I scale it down to fit the new height whilst keeping it in proportion? Is there a simple equation to do this?

View 3 Replies

ActionScript 3.0 :: When Add A Dynamic Mask To Preloader Progress Bar (for Transition Out) Its Not Scaling Correct

Aug 11, 2010

i found out when i add a dynamic mask to my preloader progress bar (for transition out) its not scaling correct. I think its because my bar isn�t tweening to the correct "stageWidth" during progress until it completes. I setted it up like that:

// Preloder Progress Bar

Code:
bar.scaleX = 0;
bar.graphics.beginFill(0xff3333,1);
bar.graphics.drawRect(0,0,stage.stageWidth,4);

[code]....

Somehow it looks like 100% of the loading progress doesn�t represent the entire stageWidth so my bar animation finishes some pixels before reaching stageWidth end. NowJust noticed it now after adding a dynamic mask to my preloaders progress bar.

View 9 Replies

AS3 :: IDE - Masking The Image For A Transition

Apr 14, 2009

I'm extending a tutorial from Flashtuts by Michael Chen. My goal is to have the grid fill in random, masking the image for a transition, as the famed Mask Effect transition from Flash-filter. This is what i got so far: URL]

[Code]...

View 2 Replies

Professional :: Transition Between Two Different Sizes Of The Same Image?

Apr 20, 2010

Im currently working on a project where I have a 92x92 pixel image that needs to tween into a 711x300 pixel image.  The images are the same but cropped to these sizes via photoshop, imported into flash, then converted to graphic symbols.  I want to have the 92x92 image tween into the 711x300 image.
 
I say tween, but the two tweens aren't working correctly, I can't seem to find a "crop" like function in flash that will let me adjust the large image for when its supposed to be small, then have it tween between the two sizes as i need them to.

View 2 Replies

ActionScript 3.0 :: Make A Different Hyperlink On Different Image Transition?

Aug 21, 2010

I got 3 images in one transition, but the problem is only the first image's link workingThe 2nd and 3rd image's link is not working.

Scripts
import flash.events.MouseEvent;var intel:URLRequest = new URLRequest("http://www.intel.com");var amd:URLRequest = new

[code].....

View 6 Replies

ActionScript 2.0 :: Making An Image Transition Animation?

Jan 29, 2009

I am not new to flash. I am making an image transition animation. But when i move an image from one point to another point that in x or y position it gets shaky and image animation is not smooth at all. I am just trapped that what do? i have tried the image in different qualities and resolutions but dont know how to do it.

I am attaching the shaky.zip file. Im using motion tween to animate the image.

View 4 Replies

ActionScript 3.0 :: Add Transition Blind To Xml Image Gallery?

May 8, 2009

I'm able to add Photo transition to the image gallery, but when I change the transition to blinds, it doesn't work.

Code for Photo Transition
//------------------transition----------------------------\
//in order to hold transitions, it needs a mc to hold picLoader;
import fl.transitions.*;

[Code].....

View 1 Replies

ActionScript 2.0 :: Random Image Transition In Flash?

Sep 21, 2010

Im looking for a random transition effect in flash.... say for example i have 10 images.... Each time page refreshes images should be shuffled and be loaded.

View 1 Replies

ActionScript 2.0 :: LoadMovie Image Transition Effect?

Aug 16, 2004

Does anyone know how this is made ? "LoadMovie Image Transition Effect"[URL]

View 1 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 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 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