Height And Width Vs. X/y Scale
I'm working in Flash MX once again and have stumbled upon a bit of a problem with both the height and width and the x&y scaling. So I have a question and then my problem. First off I was wondering for increasing the size of an MC, which is perferably used (or both)?
As for my problem, I'm trying to make a Movie clip bigger when a dynamic text field acting as a counter, goes up. So for example it starts at 50, when it reaches 75 the movie clip would "grow" bigger. I was wondering because I had this idea where your an amoeba and everytime you eat a piece of food, it raises your food level and you get bigger. Any help on the matter would be appreciated.
Wattsman
Flashkit rocks!
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-08-2002, 04:38 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scale To Width, But Not Height?
I have implemented what I think is a somewhat unusual use for full frame Flash, by creating a movie that expands to 100% of the browser width but is fixed in its height. This is the URL of the site:
http://www.palmspringslife.com
The trouble I am having is that in Firefox and Safari, when the page is loaded, it sometimes (not every time, strangely enough) seems to expand to about 110% of the browser width, forcing the page width to expand with it. I am not sure why. In Internet Explorer this does not seem to happen.
If anyone has any tips or knowledge in this area that could help me to remedy this, it would be most appreciated.
Thank you!
Scale = Normal, But Width And Height = 100% Of Browser
I have this flash movie. I want it to occupy all of the browser space, from top to bottom and left to right, without any space for HTML. But at the same time I want the flash to be scaled normally, such as the effect when you open an individual flash file with the fscommand("allowscale","false").
Do you need a php script for this?
Scale To Browser Window Width And Height
Hi, there all...
How is it possible (the proccess) to create a flash movie which will scale up to a 100% depending the browser window, but without affecting the content.
Is like having to movies one in a different layer and/or level and the movie on the lower level will scale, but the movie above will remain exactly the same.
IS THIS POSSIBLE
Somethink like this:
http://www.constructiondurable.com/
Scale Tween MC W/ Dynamic Width & Height
I would like to use the tween class to scale a movie clip. The problem is from what I've seen I have to enter a starting scale, and an ending scale for a movie clip.
ex.
new mx.transitions.Tween(redBall, “_xscale”, mx.transitions.easing.Strong.easeOut, 100, 200, 30, false);
Well my movie clip resizes based on the browser so I'm not sure what the actual starting scale value is. I am resizing the image but maintaining the aspect ratio.
What should I do? Can I use the tween class still?
Scale To Browser Window Width And Height
Hi, there all...
How is it possible (the proccess) to create a flash movie which will scale up to a 100% depending the browser window, but without affecting the content.
Is like having to movies one in a different layer and/or level and the movie on the lower level will scale, but the movie above will remain exactly the same.
IS THIS POSSIBLE
Somethink like this:
http://www.constructiondurable.com/
Get Height And Width
I have a instance of a button into a flash swf file.
This button have next instruction:
on(release){
getURL("javascript:window.open('http://www.xxxx.com/site/photo.jpg,'name_your_window','height=200,width=200 ');void(0);");
}
Every jpg file have diferent sizes. How can i get the height and the width of the jpg files to open the new window with the original sizes of the jpg photo.
Width And Height
Are all the screen resolutions proportional to each other? You see, I need to make a full screen SWF, and I am wondering if it will look the same in different resolutions.
Width And Height?
So i have this picture, that loads into 2 movie clips, movie clip A is on screen and is reduced in size, movie clip B loads off screen and is full size. I have 2 text boxes that take the height and width of picture B, and load them into the text boxes. Now, movie Clip A the code for it is this:
onClipEvent (data) {
this._height = 300;
this._width = 400;
}
But i want something like this:
onClipEvent (data) {
this._height = text from the dynamic text box divided by 2;
this._width = text from the dynamic text box divided by 2;
}
so...i tried this._height = this.height/2 but that just kept shrinking the pictures by 50% as i kept scrolling...
Max Width, Height
Dunno why but when i load images into a movieclip....the max width the mc can have is 2880 so larger images are not completely visible...is this fixable? i mean what if i want it to be till 4000 for example....
Height = 100% Width = 100%?
http://www.dieselmarketing.com
amazing site but I would like to know how they keep the flash movie at 100% height and width without stretching the center content.
The dashed lines seem to conform to the browser size yet the body of the movie stays the same size...how is this effect possible anyone here know or have any ideas?
Swf Width/height
Is there a way to determine the width and height of a movie when you don't
have the source .fla file? I'm embeadding a flash movie into an .aspx page
and I don't know the width and height of the movie? Is there a way to
determine the width and height for the movie?
Width And Height
Hi
I have a movie object that I want to horizontal align depending on my configuration in my HTML-embed-width/height.
Is that posible?
I have played around width it using
Stage.align = "TL";
Stage.scaleMode = "noScale";
But I have found that if I set HTML configuration to width="300", the Stage width is allways what I have set in my Flash document properties before compiling and my movie object aligns acording to document properies.
Edit:
Right now I am solving this with sending the width and height as URL parameters
But is there another way?
Edited: 05/02/2007 at 02:18:15 PM by tan73
Height, Width?
When i click MC "box" i want MC "sleep" to move(which it does) but i also want it to change the height and width while it's moving. How can i go about doing this?
Quote:
speed = 5;
endX = box._x;
endY = box._y;
end1X = sleep._x;
end1Y = sleep._y;
end11X = sleep._width;
end11Y = sleep._height;
box.onRelease = function ()
{
end1X = -583;
end1Y = -0.010000;
end11X = 442;
end11Y = 136;
if (_root.section != "/images/gallery.swf")
{
_root.section = "/images/gallery.swf";
_root.transition.gotoAndPlay("closing");
} // end if
};
_root.onEnterFrame = function ()
{
box._x = box._x + (endX - box._x) / speed;
box._y = box._y + (endY - box._y) / speed;
sleep._x = sleep._x + (end1X - sleep._x) / speed;
sleep._y = sleep._y + (end1Y - sleep._y) / speed;
box2._x = box2._x + (end2X - box2._x) / speed;
box2._y = box2._y + (end2Y - box2._y) / speed;
box3._x = box3._x + (end3X - box3._x) / speed;
box3._y = box3._y + (end3Y - box3._y) / speed;
};
100% Width And Height
Hi check out: http://www.wellvetted.com
This site always looks good irrespective of the resolution you use. When I looked at the page source I noticed they set the swf size as 100% for both width and height. I tried this a a site but it looked awful...
Anyone know how to do this so it always works?
thanks
ash
Width Vs Height
hullo.
im still looking how to maintain max. stage width and height. i have managed to achieve it on the width, but for some reason have been unable to do it for the height. that is, i have managed to make a line go from one side to the other (almost) but cant figure out how to do it on the vertical.
zbot is the horiz line at the botton
ztop for the one above
the problem, is for xleft (the vertical lineon the left)
i have included what i think to be the nearest code yet, and a fla.
Code:
Stage.align = "LT";
Stage.scaleMode = "noScale";
bg._width = System.capabilities.screenResolutionX-20;
bg._height = System.capabilities.screenResolutionY-70;
bg.onResize = function() {
this._x = (Stage.width-this._width)/2;
this._y = (Stage.height-this._height)/2;
};
Stage.addListener(bg);
zbot._x = 62;
zbot.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(zbot);
////
xleft._x = 270;
xleft.onResize = function() {
this._height = Stage.height;
};
Stage.addListener(zbot);
////
ztop._x = 62;
ztop.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(ztop);
// get the content clip to stay fixed horizontally centred
content.onResize = function() {
this._x = (Stage.width-this._width)/2;
};
Stage.addListener(content);
// manually invoke the onResize events for the clips to start things off
bg.onResize();
zbot.onResize();
ztop.onResize();
xleft.onResize();
content.onResize();
100% Width But Not 100% Height
i need help with a full flash page. it's kinda tricky. it may also be a little tricky to explain so be patient with me.
the width is 100%. that's easy. the content in my swf takes up about 900 pixels. so for example it's too big for 800x600 and if i use 100% height the bottom content is chopped becuase the browser scroll bar is non-existent(we're using 100% height).
but then if i define a height, say 1000, then the swf may not occupy 100% of the height(if someone's using a large res).
the only thing i can think of is to use a really big height that's greater than the biggest resolution. but this sucks for small resolutions because there'll be a big empty space at the bottom.
see what i mean?
isn't there a way to use a minimum height?
Can't Get Mc's Width And Height
I'm a student for design and want to build myself a portfolio, showing pictures and being able to jump between fit_to_screen mode to actual_pixel_size mode. The following code is just the beginning.
I've wrote the code mixing some tutorials (sorry, but I didn't find a good way to clean it so it'll be more focused) - I'm a really new about action script.
myFile is a mc waiting for an external parameter run_url - a string contains something like "/projects/illustration/alice_in_wonderland.jpg"
You can see the trace command marked as red. I'd expect it to give me a number of the movie clip's width, yet i get "undefined" - Where is my mistake?
import mx.utils.Delegate;
var streamingID:Number;
var fileLoaded:Boolean;
var dBar:MovieClip = this.Bars.dBar; //downloading bar
var progBarFactor = dBar._width/100; //pixel to percents
var spacing = 10;
function displayStreaming (theSource:Object) {
if (fileLoaded) {
clearInterval (streamingID);
dBar._x = dBar._width;
} else {
var percentLoaded:Number = Math.floor((theSource.getBytesLoaded()/ theSource.getBytesTotal())*100);
dBar._x = percentLoaded*progBarFactor;
}
}
function doneStreaming():Void {
fileLoaded = true;
}
function screenFit (){
if (myFile.width > Stage.width - 50) {
myFile.width = Stage.width - 50;
}
if (myFile.height > Stage.height - 50) {
myFile.height = Stage.height - 50;
}
myFile._x = Stage.width/2;
myFile._y = Stage.height/2;
};
fileLoaded = false;
myFile.loadMovie(run_url);
onEnterFrame = function(){
var total = myFile.getBytesTotal(), loaded = myFile.getBytesLoaded();
if (total != 0 && Math.round(loaded/total) == 1){
var w = myFile._width + spacing, h = myFile._height + spacing;
screenFit();
}
}
trace (myFile.width);
myFile.onLoad = Delegate.create(this, doneStreaming);
streamingID = setInterval (displayStreaming, 100, myFile);
stop();
100% Width And Height
Hi people,
I've been learning AS3 in the past few weeks but I am a bit confused at the moment. What can I do to have a movie clip occupying 100% of the window's width and height in every resolution.
Example: http://www.marc-aurel.com/2007/
Thanks in advance and sorry If this has been already discussed.
Height, Width?
When i click MC "box" i want MC "sleep" to move(which it does) but i also want it to change the height and width while it's moving. How can i go about doing this?
Quote:
speed = 5;
endX = box._x;
endY = box._y;
end1X = sleep._x;
end1Y = sleep._y;
end11X = sleep._width;
end11Y = sleep._height;
box.onRelease = function ()
{
end1X = -583;
end1Y = -0.010000;
end11X = 442;
end11Y = 136;
if (_root.section != "/images/gallery.swf")
{
_root.section = "/images/gallery.swf";
_root.transition.gotoAndPlay("closing");
} // end if
};
_root.onEnterFrame = function ()
{
box._x = box._x + (endX - box._x) / speed;
box._y = box._y + (endY - box._y) / speed;
sleep._x = sleep._x + (end1X - sleep._x) / speed;
sleep._y = sleep._y + (end1Y - sleep._y) / speed;
box2._x = box2._x + (end2X - box2._x) / speed;
box2._y = box2._y + (end2Y - box2._y) / speed;
box3._x = box3._x + (end3X - box3._x) / speed;
box3._y = box3._y + (end3Y - box3._y) / speed;
};
Width Vs Height
hello.
still looking how to maintain max. stage width and height for some lines i want on the screen.
i have managed to achieve it on the width, but for some reason have been unable to do it for the height. that is, i have managed to make a line go from one side to the other (almost) but cant figure out how to do it on the vertical.
zbot is the horiz line at the botton
ztop for the one above
the problem, is for xleft (the vertical lineon the left)
i have included what i think to be the nearest code yet, and a fla.
Stage.align = "LT";
Stage.scaleMode = "noScale";
bg._width = System.capabilities.screenResolutionX-20;
bg._height = System.capabilities.screenResolutionY-70;
bg.onResize = function() {
this._x = (Stage.width-this._width)/2;
this._y = (Stage.height-this._height)/2;
};
Stage.addListener(bg);
zbot._x = 62;
zbot.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(zbot);
////
xleft._x = 270;
xleft.onResize = function() {
this._height = Stage.height;
};
Stage.addListener(zbot);
////
ztop._x = 62;
ztop.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(ztop);
// get the content clip to stay fixed horizontally centred
content.onResize = function() {
this._x = (Stage.width-this._width)/2;
};
Stage.addListener(content);
// manually invoke the onResize events for the clips to start things off
bg.onResize();
zbot.onResize();
ztop.onResize();
xleft.onResize();
content.onResize();
Fix Width & Height
hi friends,
I have an flv player & i want to set it's width & height.
The following script set it to no scale :
Stage.scaleMode = "noScale";
This one set it to the width & height of stage :
w = Stage.width;
h = Stage.height;
Which code should i use to set it to desired width & height. For instance : 400 * 300 pixels
Cheers, Rohit
Width Height
Hi
I want to scale a mc and i know it can be scale with
mc_xscale = 20
mc._yscale = 20
here it shows that i am scaling mc to 20 percent
now i want to reduce the mc size to 20 px
i know it can be done by
mc._width = 20
mc._height = 20
but the the problem is i just know that i want to reduce mc to 20px but i don't know the height .
so is there any way that if i say i want to reduce mc to 20 px and actionscript can automatically proportionately reduce the height without distorting the shape of MC.
thanks
Width=100%, Height=15
I have a gradient png, it starts as white and fades to transparent. My problem is though, I need it to be 100% wide, but only 15 pixels tall. I've tried everything, and still can't get it to become more than 24 pixels wide (the size of the flash file/image). Does anybody have an suggestions?
Publish settings are windowless transparent and noscale. This is the code that I'm using:
Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="13">
<param name='AllowScriptAccess' value="always">
<param name="movie" value="images/pngbot.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="images/pngbot.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.
com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="13"></embed>
</object>
Thanks in advance!
Changing Scale Vs. Height
I am resizing a movie clip in order to try and give some three dimensional perspective as it moves "back" in the movie. In general should this be done by adjusting the _xscale and _yscale or by adjusting the _height and _width?
I am doing it by adjusting scale and it looks ok, but I am getting some wierd numbers when I display the height values. The values seem to move up and down repeatedly as the clip moves.
I guess that I looking to find out what the difference is between scale and actual dimension and what the advantages or repercussions are for altering each set of values.
Thank you for any advice
LoadMovie Height/width
Is it possible to get the height and width of a .swf loaded into a target movie clip? Here's what I'm doing (simplified for clarity):
I've got an instance of a movie clip called "content." I'm loading a .swf into with:
content.loadMovie(path);
Then I want to resize content to fit within a bounding box and maintain proportion, *including negative space*. It works fine with .swf's that fill the stage, but with .swf's that have small amounts of image, content._height and content._width return values of the actual pixels contained in the .swf. content.getBounds().xMax and content.getBounds().yMax return the farthest right and bottom pixels. Can I get a value for the extra negative space to the right and bottom of the pixels.
The obvious fix is to go in and add borders around all of my movies, but that's not reasonable.
Changing Width Also Changes Height
Hi all,
I've got an mc where you can change the width interactively: the border becomes longer.
Code I use:
onClipEvent (mouseMove){
this._width = _root.kader.links._x + _root.kader.rechts._x + 3;
}
Alas the border also becomes thicker when streched to the maximum. This is ugly. Can I do something about it?
Look here if you want to take a look (drag the left and right border):
http://home.wanadoo.nl/d.roberts/stuff/langste_dag.swf
Thanks very much in advance, Danielle.
Controling The Width/height Of An Mc.
I have tried to load an external .swf into an MC in my flash move. No matter how big or small the exteranl .swf is I want it match the dimentions that I set the MC to. For example,
this._width = 100;
this._height = 100;
When I set width and height to the MC the exteranl .swf that I load does not show up. Has any one esle had this problem and was able to fix it?
Thank you all in advance.
Getting Width And Height Of LoadMovie Swf?
I am loading an animated movie clip with...
myclip.loadMovie("myswf.swf");
then trying to get the width and height with
mywidth = myclip._width
myheight = myclip._height
problem is that the size I get back is the size of the animated element and not the stage size it was created on. Is there anyway of getting its stage size??? Because the animation is moving in an out of its stage the size also keeps changing.. Help, this is driving me around the twist.
Cris.
Spring To Width And Height
I have set up a mc to spring to a typed in width and height. But the problem is it is not springing to the numbers typed in. If you look at the mc when it says 200x200 the box is actually 50X50.
Code:
k = .2;
damp = .8;
photoScreen.onEnterFrame=canvasMove;
function canvasMove() {
the_width = xwidth;
the_height = yheight;
trace(the_width);
//X Scaling
var tx = the_width-photoScreen._width;
this.vx += (tx-photoScreen._width)*k;
this.vx *= damp;
photoScreen._width += this.vx;
//Y Scaling
var ty = the_height-photoScreen._height;
this.vy += (ty-photoScreen._height)*k;
this.vy *= damp;
photoScreen._height += this.vy;
}
Forcing Width And Height
i am trying to pass querystring variables to modify the height and width and a movie. When I pass it, the proportion are staying constrained (ie. 100 x 700)
I don't know if I need to modify in the web page (ie. WIDTH="#hgt#" HEIGHT="#wdt#") or in actionscript and if so, how
thanks
Getting The Height And Width Of The Movie
hey there, does any know how to do this? I just want to set them both as variables. I thought it was this:
_root.currentw = getProperty(_root, _width);
but it always telles me:
263.65 for a movie that is 550
any ideas????
Height And Width Of EmptyMovieClip
I might be approaching this problem from the wrong direction, but I am interested to see if anyone else has run into this situation, and if there is a better solution than my rather unorthadox one.
Problem: I am creating an empty movie clip into which items will be placed at runtime. The placement should be constrained by the height and width of the movie clip. This is a problem since you can't assign h/w to an emptyMovieClip.
Solution: The answer I came up with was to draw a rectangle in the emptyMovieClip at the desired size with an alpha level of 0 (aka invisible).
Has anyone else run into a situation like this? Is there a better way? Thanks in advance!
Width&height When Exporting
i have exported a page and publish it at 1000 width and 580 height so that it fits well in the windows explorer but the explorer always displays it a few pixels down and right. how can i make it so that the blank space from the top and left won`t apear again??
pls hlp. thanks
Width And Height Of A Jpeg Pop Up
I want to click on my button and have a jpeg open up. Which I have succeeded in doing. what I want though is for the jpeg to open up with its dimensions ie. 400 X 350 in a separate window.
I have been trying all sorts of combinations and looking through all of my books including actionscripting and can not find the right script to get this to work. Is it a property, a variable, an expression, a combination of? I don't know the correct verbage.
I am using Flash MX. Pease help.
Height And Width Restrictions
Hi
quick question. is there a height and width restriction in flash.
the actually main page i mean, are there restrictions.
reason i ask is i created the page 500 by 2100...now it's gonna be a pop up...which is 500 by 300 with a scrollbar. now for some reason it only displays most of the text..the rest does not show up...any idea why.
Move X/y Width/height
Hi--
This is probably simple, but I don't know the actionscript to do it.
I would like to move a mc to a specific X/Y axis and a specific width/height. Something like:
on(release){
move mc x=100
y=100
width=100
height=100;
}
Well, something like that.
Any help would be appreciated. (I have to find my actionscript dictionary!!)
Thanks
Compoenent Width/height
hello. Dynamically resizing mcs on the stage is nifty, I like it! But I am running into a...wall is such a cliché, but in the lack of a better word, let's just go with the wall. I need to know how I can resize components without scaling their content. using _width and _height scales the content and it's data, which is not what I want to achieve.
Any pointers would be vastly appreciated
V.
No Borders With 100% Width And Height
I'm trying to match the dimensions of my movie to fill the browser window 100% width and height without scaling. I went to settings, html, dimensions and set it the percent to 100% and the scale is showall. Yet there is these wide borders around the sides of the movie...how do I get rid of the wide borders ?
Any info is of course appreciated.
Imported Swf Height/width
Hi
I'm using MovieClipLoader to load swf files into a container mc and attempting to use the _width and _height properties of the container after the swf is loaded to do other stuff. The trouble is, those height and width values are including things that aren't on the stage in the imported movie.
How can I get around this? Why are the off-stage objects in the imported swf being counted in the height/width?
thanks
mark
Movie Height And Width?
I don't know why but I cannot seem to figure out the code which returns my movie's height and width, I am guessing this is rather simple I just cannot seem to figure it out. I tried _root._height but thats not it. Thanks in advance,
ChaseNYC
IE : Width 100%, But Height In Pixels
I'm trying to make IE understand that I want my SWF to be 100% horizontally but remain 500 pixels in height.
The standard object tag works with Firefox when I specify the width='100%' and height='500', but IE is more stubborn...
I tried to use a javascript to write the movie, but it only works if I put percentages in both width and height.
Anyone had this problem ?
Width & Height 100%, But I Still Need Scrolling?
hello hello...
im looking for tutorials on 2 things....
I have a flash site that has its width and height set up to 100%... but the content is 660px tall... so some users will need to scroll...
how do I tell my flash site to be 100% width and height, but tell the HTM file to have a scroll bar for the 660px of content height....
--------------------
i've seen flash sites that have a flash scroll bar... were can i go to find one?
anyone know?
THANKS A MILLION IN ADVANCE!!!!
-manny
|