Forgive me I am going to break the sacred double posting rule : ) but I
did not get a eply on the newbie list and this thread has already been
started here....
Here's what I am trying - and I get the width at 65 each time it is
traced, and yet I still see the full image (ie 250x400)
ccnt=0;
rowy=10;
rowx=40;
for (i=0; i<26; i++) {
if (ccnt==7) {
ccnt=0;
rowy+=75;
rowx=40;
}
duplicateMovieClip (_root.tnHolder, "mc"+i, i+100);
setProperty ("mc"+i, _x, rowx);
setProperty ("mc"+i, _y, rowy);
this["mc"+i].loadMovie("gallery/"+i+".jpg");
trace(this["mc"+i]+" width = "+this["mc"+i]._width);
this["mc"+i].onLoad = function(){
this["mc"+i]._width=65;
this["mc"+i]._height=65;
}
trace(this["mc"+i]+" width = "+this["mc"+i]._width);
ccnt++;
rowx+=75;
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Weber
Sent: Tuesday, November 08, 2005 9:12 AM
To: Flashnewbie Mailing List
Subject: RE: [Flashnewbie] Resizing Imported jpg
As soon as the image is loaded into the clip, the size of the clip will
adapt to the size of the image.
Therefore you have to store the original size of the clip, wait until
the loading is finished and then reassign the stored dimensions to the
clip:
myClipWidth = myClip._width;
myClipHeight = myClip._height;
this.createEmptyMovieClip('monitor', this.getNextHighestDepth());
monitor.onEnterFrame = function(){
var loaded = myClip.getBytesLoaded();
var total = myClip.getBytesTotal();
trace(_root.myClip+'gugus '+loaded);
if(loaded > 14 && loaded >= total){
myClip._width = myClipWidth;
myClip._height = myClipHeight;
this.removeMovieClip();
}
}
myClip.loadMovie('BlueHills.jpg');
hth
--------------
Andreas Weber
motiondraw.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Lehr,
Theodore M.
Sent: Tuesday, November 08, 2005 2:59 PM
To: Flashnewbie Mailing List
Subject: [Flashnewbie] Resizing Imported jpg
I am importing a jpg via load movie and I want to resize it... Say for
example I the jpg is 500x500 and the clip I am loading it into is 65X65
- after I import it it retains it's real size - how can I get it to
match the size of the movie it is loaded into?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders