-
endless possibilities
resizing frame
how do i get this effect?
http://www.evb.com/archive/
i want to do something similar to this on my photography website. I wanted to have a slideshow with the frame resizing for each pic. i also wanted to know how they change the color inside the frame. how do i do this?
any help would be great!
thanks!
austin
endless possibilities
-
Senior Member
here's a sample, it could be better, but i just threw it together about 2 minutes ago. just hit enter while testing movie to advance the frames
Last edited by EQFlash; 11-15-2005 at 01:31 AM.
If you don't think you're going to like the answer, then don't ask the question.
-
endless possibilities
well the problem with that is that i have a frame about 10 px thick and when you resize its unproportional. can you have the inside strech and the outside stay the same no matter what size it is?
i want is so that the border is 10 px (for example) thick no matter what size it is.
thanks!
austin
Last edited by MadDog 555; 11-15-2005 at 07:13 PM.
endless possibilities
-
Senior Member
try this one, i normally have to border set like this anyway, not the way it is in the first 1 i sent
If you don't think you're going to like the answer, then don't ask the question.
-
Can't Re-Member
ok.. EQ... but now how do you resize it dynamically?.. say you're loading external swf files into the frame (which would essentially mean into a container clip)..., AND... you don't them to appear until the frame resizes to the right _width & _height for the new swf?? any ideas?...
-
endless possibilities
ok i have a mc on the stage. theres a border around the inside square 10 px thick. the inside square is 300x300. i want to resize only the inside square and the outside border doesnt change. i want it so that when you click a button, it resizes.
do you understand?
endless possibilities
-
Senior Member
madzigian
you could use a condition,
where pk1 = container of the ext swf.
Code:
stop();
px1 = pk1._width+10;
py1 = pk1._height+10;
n = 0;
onEnterFrame = function () {
n++ ;
frm._width += (px1-frm._width)/10;
frm._height += (py1-frm._height)/10;
if (frm._width>=pk1._width && n >= 25) {
pk1.loadMovie("external.swf")
}
};
MadDog, i'll create another for you, where the frame and the border are 2 movieclips.
Last edited by EQFlash; 11-16-2005 at 01:21 AM.
If you don't think you're going to like the answer, then don't ask the question.
-
endless possibilities
well...im using flash 8, so i could use 'scale9grid' but i dont know how to use it. ive heard about it and i know how it works though.
i have a mc with the border included in it ad well as the inside box so if i only stretched the inside and not the border that would work. this way you wouldnt have to create multiple mc's.
austin
endless possibilities
-
Senior Member
if you use flash 8 why are you posting in flash mx?
If you don't think you're going to like the answer, then don't ask the question.
-
Can't Re-Member
EQ.... tried the code you suggested, and nope... that doesn't work... any other ideas?....
thanks again
-
Senior Member
i have a different code now since I posted this. I am tweaking it now
If you don't think you're going to like the answer, then don't ask the question.
-
Can't Re-Member
i had a thought... because i ran into this problem while trying to use setMask on movies loaded into a container. Because you can't apply setMask until AFTER the movie is completely loaded, i would assume you would have to do the same thing in this case. after it's loaded you can get the width and height, and resize accordingly. I'll try it and let you know if i get it to work...
-
endless possibilities
i go it. heres the code i used:
code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
import flash.geom.Rectangle;
MovieClip.prototype.changeSize = function(w,h){
var T = this;
T.tw.removeMovieClip();
var tw = T.createEmptyMovieClip("tw",13579);
var w_amount = 0;
var h_amount = 0;
var w_actu = T._width;
var h_actu = T._height;
tw.onEnterFrame = function(){
var w_delta = w - w_actu;
w_amount = ((w_delta/5)+w_amount)/2;
var h_delta = h - h_actu;
h_amount = ((h_delta/5)+h_amount)/2;
h_actu += h_amount;
w_actu += w_amount;
T._width = w_actu;
T._height = h_actu;
if(Math.abs(w_delta)<.5 && Math.abs(h_delta)<.5 && Math.abs(w_amount)<.5 && Math.abs(h_amount)<.5){
T._width = w;
T._height = h;
this.removeMovieClip();
}
}
}
var rec = new Rectangle(-150,-150,150,150);
box.scale9Grid = rec;
onEnterFrame = function(){
var min = 40;
var w = 750;
var h = 450;
var w_targ = Math.round(Math.max(w,min));
var h_targ = Math.round(Math.max(h,min));
box.changeSize(w_targ,h_targ);
}
thanks for your help!
austin
endless possibilities
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|