Hi all, i cant figure how to scale the image which is inside the movieclip...
I got a button when clicked create a dynamic movieclip then loads the image inside, unfortunately if the image is bigger then movieclip, then movieclip automatically resizes itself. What i m trying to achieve is, if the movieclip is 200x300px n the image is bigger then that. Image shld resize itself n stay center aligned to the movieclip.... is that possible???
my code:
on (click) {
import flash.net.FileReference;
import flash.display.BitmapData;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void { Flash Terms ActionScript The programming language used to create :: File Format: PDF/Adobe Acrobat - View as HTMLA series of still images played in rapid succession to simulate movement, or changes in size, movie clips inside the main movie and inside one another. Flash object include alpha, visibility, tint, scale, brightness, position (X http://www.onepine.info/students/Flash_Terms.pdfHOME | Working with 9-slice scaling - sephiroth.it:: 9-slice scaling lets you create movie clip symbols that scale the property panel has been opened activate the checkbox at the bottom like in this image: http://www.sephiroth.it/tutorials/flashPHP/scale9/HOME |
//trace("name: " + file.name);
var mcPict:MovieClip = createEmptyMovieClip( 'mcPict', 9000 );
//mcPict._x = 20;
//mcPict._y = 20;
mcPict._xscale = 20;
mcPict._yscale = 20;
mcPict.loadMovie( file.name );
// set image
var curImg:BitmapData = new BitmapData();
curImg.draw( mcPict ); AS3 Full Screen Image Class with alignment scaling and smoothing :: Jan 14, 2009 Bitmap Smoothing for up scaling images *NOTE* may need crossdomain . whether a swf/or movieclip, always centered upon browser resizing. http://gfxcomplex.com/actionscript3/as3-full-screen-image-class-with-alignment-scaling-and-smoothing/HOME | AS2 - MovieClip drawing methods - adding 'border' to image :: 3 posts - 2 authors - Last post: Apr 16, 2008 the mc the border seems to scale in proportion to the original image? When you load the image into the Movieclip then the Movieclip http://www.ultrashock.com/forums/actionscript/movieclip-drawing-methods-adding-border-to-image-100006.htmlHOME |
}
// File Browser
var allTypes:Array = new Array();
var imageTypes:Object = new Object();
imageTypes.description = "Images (*.JPG;*.JPEG;*.JPE;*.GIF;*.PNG;)";
imageTypes.extension = "*.jpg; *.jpeg; *.jpe; *.gif; *.png;";
allTypes.push(imageTypes);
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse(allTypes);
}
thnx for your help!
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market |