Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Size And Positioning



HelloI'm currnetly doing a flash site http://65.175.73.93/index99.htmMy problem is if a person enters a large enough size it can fill then intire screen. My problem is I need a math equation that will scale it down to an appropiate size. the movie which is all the tiles together, can be no bigger than 600px hieght and no more than 800px across.Any help is gladly appreciate



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 10-31-2006, 04:31 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Mac & PC Size / Positioning Problems
Hi everyone,
I'm loading a YouTube video into an empty movie clip so that it lays directly over a jpeg of a TV screen. After positioning / scaling the empty movie clip I managed to get the video positioned correctly on Windows but when I tested it on the Mac, all the scaling on the movieClip appears to be lost / changed.
I could alter the dimensions of the video on YouTube but that kind of defeats the object.

Here's a link:
http://www.creativeconcern.com/videohelp

Here's hoping that someone can help.
Regards
PatrickW

Positioning _mc Relative To Browser Size
Hi hope you can help me?

I have a sliding dock utilizing a caurina tweener class however am having problems aligning it on the x y scale. I want it to be able to maintain it's respective position relative to the changing size of the screen. It seems like the x y variable here

var baseX:Number = 200;
var baseY:Number = 200;

keeps it static & I tried to place this code below to keep it's position relative to browser size but it only centers it. I tried playing around with the x y values but it only works bettween 1 & 2. Is there a way to align it to the bottom right of the screen that will adjust accordingly to browser size?


Code:

Stage.scaleMode = "noScale";
Stage.align = "TL";

myListenerload = new Object ();
myListenerload.onResize = function () {

slidingdock_mc._x = Stage.width / 1;
slidingdock_mc._y = Stage.height / 1.5;

};
Stage.addListener (myListenerload);
myListenerload.onResize ();

As you can see I'm a newbie at all this so If I'm doing something worng here can someone point me in the right direction?


Thanks.

Relative Movieclip Positioning To Stage Size
Heya,

I am looking for some code to enable a movieclip to reposition itself according to the stage size
so far I got the footer to resize itself according to stage size.

However I will have some text as well which is supposed to stay position x=10 and y= (depending on height of the stage)











Attach Code

Stage.align = "TL";
Stage.scaleMode = "noScale";

var stageListener:Object = new Object();

stageListener.onResize = function() {

var stageWidth:Number = Math.round(Stage.width);
var stageHeight:Number = Math.round(Stage.height);
trace("Stage size is now " + Stage.width + " by " + Stage.height);

footerBG_mc._width = stageWidth;

footerBG_mc._x = 0;
footerBG_mc._y = stageHeight-150;

footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
footerLinks_mc._y = stageHeight-18;

text_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);

[ Static x position and variable y position, according to stage size

};

Stage.addListener(stageListener);

stageListener.onResize();

Positioning: Stuck Again.swf Moves With Change Of Window Size
i'm having some serious positioning problems: i want this animation to play in dead center of the screen, but i can't get it to stay in that spot when the window is made larger or smaller- it moves- like if you make the window bigger to the right-direction, it stays in it's spot and everything else moves around it! VERY TACKY! help!

Mc Keeping Relative Positioning Depending On Browser Window Size/resize
hi, i'm redesigning my personal website and i'm trying to figure out how to keep certain objects (btns, mc, gfx) in a certain spot on the browser window and how to "animate" them moving to those positions when the window is resized. the best example i can find is this website (www.superfad.com). when the window is resized, objects move accordingly with sort of an smooth animation. also, how can i get one that doesn't animate (also on the same website with the smoke). i've looked a lot of different websites and forums and can't really find (maybe since i don't know how to ask the question in a search box). if someone can help me on this, it'll be greatly appreciated. thanks.

Match The Size Of A Dynamic Movie To The Size Of Its Parent Container Using ActScrpt?
I have a program that is dynamically loading images into a nested movie clip. The Parent movie contains the two separate movies within it and images are to switch back and forth in them. I need to know how I can use action script to load these nested movies to the exact dimension of the parent movieclip.

Here is my code:

onClipEvent (load) {
StagePictures._lockroot = true;

e_mc.loadMovie(_root.PathText+_root.imageClips[0]);

}
onClipEvent (enterFrame) {
if (Key.isDown(a number)) {
if (Key.isDown(Key.something)) {
if (Key.isDown(a number)) {
_root.StagePictures.e_mc.createEmptyMovieClip("SecondClip" , 3);
_root.StagePictures.e_mc.SecondClip.loadMovie(_root.PathText+_root.imageClips[1]);
_root.ScoreBox.text = scvar+1;
_root.Command.text = _root.imageCommand[1];
_root.Response.text = "Correct!";
}
}
}
}

StagePictures is the parent clip, e_mc is a child, and SecondClip is a child within e_mc.

Both e_mc, and SecondClip are loading the dynamic images which are the paths labeled _root.PathText+_root.imageClips[0, and 1];

The size of the images need to be contained within the size of the parent clip of both called StagePictures.

How can I set the size of the two nested clips to match the parent?

Thanks,
sam

Why Use Flash Video When It Bumps The File Size To Outrageous Size?
I have imported a flash video into my flash movie. I have run the .mov in sorenson squeeze and have it nice and small. As soon as I import it into flash (because this is the only way I know to do it in order to run a video in flash) now I have 1024 frames and a HUGE .swf file.

So what is the point to using flash at all...or am I doing something wrong. Is there a better way to handle video within flash??

Thanks
Fitchic77

Browser Size Doesn't Match Flash Movie Size
Can anyone help me figure out how to make the Browser or Window that launches my .swf file fit exactly the size of the Flash Movie's dimensions?

My movie is 800x550 yet when launched it in a browser there is extra space around it which shows the elements that are outside the border of the movie which I later tween onto the stage.

In short, how do I constrain the Browser Window to fit the dimension of the Flash movie?

Thanks,
Tony

[F8] Symbol Size Bigger Than Max Stage Size - How To Edit/view?
Newbie Alert!

I am trying to edit a FLA file for a sliding timeline and the main background image with the details (years, images text) is 23960 px wide and I cannot scroll the main stage area all the way to the right to edit the contents. How can I do this please?

Thanks.

Broadsword1967

Change Stage Size (not Scale) Based On Browser Size?
Not sure this can be done. I've looked through LOTS of resizing tutorials, but they don't do exactly what I want, and I'm not sure it's possible.

Basically, I have a slideshow that loads from xml and fades in a variety of sizes of images in random positions. I'm trying to set it up so that the swf (which is in a div tag in an interface) will resize depending on the browser size and will use the NEW stage size to determine the x/y position of the images (without resizing them) and will skip any images that are too big for the stage size...

Any ideas if this is possible? Dynamically sizing and determining the "working area" of a swf based on the browser/div size?? Any tutorials out there?? I can figure out the code, I just need to know where to start...

THANKS!!!!

Resize Flash Movie To Size Of Users Screen Size
hey,

Is it possible to resize a web page that has a swf file to the exact size of the users screen size i.e. 800 x 600 and 1024 x 768? If so can someone help please?

DEE

Making Canvas Size And File Size Smaller
Hi guys,
I made a flash projector file recently for my company,
Its 1024 * 768, and a pretty big file size, but we had it burned onto dvd so that was ok....

However now I want to make it 250 * 250, cut the filesize down, and put it on the companies web site....

Is there any way i can do this in flash?
can I do it in Premiere/ After effects...
Any other places

Thanks
Stefan

Preloader Size Doesn't Match File Size.....
Alrighty, my preloader says that my filesize is 242kb. MY ACTUAL filesize is 179kb, according to flash and windows. Is there something I am missing here?
Why is my preloader giving me garbage?

www.paulhanak.com is the site.

Here is the code:

Code:
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay("start");
}
Thanks for any help! This is mind boggling.....

How To Adjust The Size Of Text Field (according To String's Size)
Hello everybody,

Can anyone help me with this? How to adjust the size of dynamically created text field according to the "size" of the string which is in it. I would need this to create buttons for menu and the "source string" for each button is the string from XML node.
Thanks a lot!

Poco

How Do U Change 'work Area' Size Not Canvas Size?
i need to make the work area size bigger in flash 8. not the canvas size. does anyone know how?

[SIZE=5]help About Multiplayer Games & Help Of How To Shoot. Any Ideas?[/SIZE]
im making a game so me and my freinds can play when they come over, but its lacking essentuals like:
*shooting
*multplayer (up to 4)
*weapons picks and changing weapons.

any ideas????

Top Banner Full Size Drop Down To Smaller Size?
This is kind of a 2 part question, don't know if this should be in the Flash forum or server-side/client-side.

First Question: I need to make a top banner for a new site, which has 4 pictures in it which will all be animated, the trick with this is I need to have it be 800x115 to show the full animation then when the pictures all move up their will be 8 or so buttons underneath the banner. Question is can I get this animation to be throughout the entire site without ever replaying that animation, without using frames? I am using php includes changing the ?id.

Second Question: If the first one doesn't work, I need to set it up using two different tables having the top banner in one and the buttons in the other. Here's the question, how can I do that animation from the first question with just javascripting, so the animation will not play again?

Reiterate: 1 Animation, a top banner which will be a box with 4 pictures in it will start out at full size (800x115) then the 4 pics will move up so that they will now be (800x85) and then buttons will be in the (800x30) spot.

I have seen some codes that look like they would work using cookies but I will need an explanation as to how it works if you can help me. I might have another animation in the site so I will need to make sure that some animations can play over again.

Change Movie Clip Size Without Changing Whole Swf Size?
ok this is kind of hard to phrase this question... but i have a movie clip and there is stuff in the movie clip i dont want to be seen... i thought about hidding it behind a white background but that doesnt work because it covers up other movie clips that i have.. so is there a way to set what can be seen in a movie clip

Making The Document Size Dynamic With The Window Size
Im looking to make the flash file dynamic so that when someone changes the window size the flash file expands with it and some of the items contained move also.

thanks for any help.

Window Size Matches Content Size. HOW?
it's maybe a complex question. but hell i ask it anyway.
i want to make a MC that adjusts it's size to the MC or .SWF that is loaded into this MC.

if anyone can help that would be great.
thanx

grafx

Stage Size Vs Published Size Question
Ok here is the dilema...

I have a 500w x 350h stage. For testing I have imported a picture the same size as the stage and placed a 1 pixel border around it.

When I preview the movie, the border shows up fine all around the imported picture but when I publish it to the web, I only see a border on the left and top edge. The right side and bottom are missing.

Here is the web version: Test Site

Here is the fla:

Screen Size And Flash Movie Size
Can you create a swf larger than the resolution of the users screen and then just center it on the screen, or if not, is there a way around this. I want to have popup windows that can be moved around within the flash file, but I need the flash file to be at least as big as the users screen so that they don't just disappear. Is this possible??

Auto-size Vs. Fixed Movie Size
I wasn't sure where to put this post. I hope this is the right place.

This is what I want to do:

On screen resolutions up to 800x600, I want my Flash movie to resize to 100% width and height of the browser window (since that's usually something like 635x450 on 640x480 and 755x550 on 800x600). On screen resolutions higher than 800x600, I want the Flash movie to be a fixed size (say 800px x 600px exactly).

Is this possible, and if so, how? Or is it something more to do with javascript after the final movie has been created?

Preloading Jpg - Change Window Size According Jpg Size
hi,
im loading a jpg into a window MC.
i want that after the loading that the window will change it size according to the loaded jpg.
i did this sample (file attached) but it won't size like i want.

help anyone? Avi.

Movie Size Fitting Any Monitor Size
Hi :-D

Is there a way to design a Flash movie so that it will look good on all monitor sizes? For instance I designed a Flash site that was 800 x 600 but on larger monitors it looks incredibly small. I know that I cannot control everyones individual monitor settings but is there any way that I can set up the movie so that it stretches and fits any monitor size?

Many thanks!! You guys are awesome!

Denise

Load Movieclip With Different Size Than Its Original Size
Hi !

I'm trying to load an external swf "B" with the size of 800*600 in my root movie "A" but I would like to load this "B" swf with a 640*480 size how can I do ?

Stage Size And Dyn. Text Fiel Size
I'm verrrrrrry close to solve my problem...

I'm using a dynamic text box that will contain external text. The lenght of the text may be just a few words or can be as long as a small paragaph.

I've found a way to make my text box longer to fit the amount of text in it with this line of code:

mytextbox.autoSize = true; (This is great!!!!!!!!)

Now... The size of the flash i'm using have to be longer or shorter depending of the size of the dynamic text box...

How can I do that? The Flash need to folow the size of the text box... It will display my blog titles on an html page.

Is it possible?

Change Browser Size(same As The Stage Size)
Hi,

I have a .fla file of stage size 400*500, I have published it as .html
Now, is it possible to open it in a browser size same as the swf file?

Thanks...

Is It Possible To Rescale An Original Size Of The Movie Into A Different Size?
I made a movie 1024 by 800. I don't want to rescale each image manually to to fit this new size 800by 600. I want a quick way. Is there an actionscript that can do it for me to scale the whole movie to a new size800 by600?

Tween To Konstant Size But Backtween To Old Size
hello u all!

I got a big problem, may some of you can help me?

Some boxes MC's are attached on stage and now, after press, they should start their included animation. so far...

they should now change scale and position to a konstant, and after press again, !!! move back to their origin size and place.

how do you manage this per actionscript?

I also tryed the new tweening-classes, but they are not exact enough.
the boxes are then moving through each other.


here is my script:

ActionScript Code:
Array.prototype.findRemove = function(removeEntry) {
    for (var i in this) {
        if (this[i] === removeEntry) {
            this.splice(i, 1);
        }
    }
};
myArray = ["0x804D4D", "0x4D6F80", "0x5E804D", "0x80804D", "0x805E4D", "0x6E4D80"];
len = myArray.length;
xpos = 200;
ypos = 300;
xscal = 30;
yscal = 30;
// ---
for (var x = 0; x<len; x++) {
    currClip = _root.attachMovie("move_mc", "clip"+x, (len-x), {_x:xpos, _y:ypos, _xscale:xscal, _yscale:yscal});
    //wert = myArray[random(myArray.length)];
    wert = myArray[x];
    my_color = new Color(currClip.card_mc.front_mc);
    my_color.setRGB(wert);
    currClip.meineFarbe = wert;
    //myArray.findRemove(wert);
    xpos *= 0.93;
    ypos *= 0.95;
    xscal *= 0.93;
    yscal *= 0.93;
    currClip._alpha = 50;
    currClip.onRelease = function() {
        this.card_mc.top_mc._alpha = 100;
        this.card_mc.front_mc._alpha = 100;
        this.card_mc.shad_mc.gotoAndPlay(1);
        this.card_mc.top_mc.gotoAndPlay(1);
        this.card_mc.front_mc.gotoAndPlay(1);
        newScale = 30*1.07;
        newXPos = 200*1.07;
        newYPos = 300*1.05;
        setProperty(this, _xscale, newScale);
        setProperty(this, _yscale, newScale);
        import mx.transitions.Tween;
        var xTween:Tween = new Tween(this, "_x", mx.transitions.easing.Regular.easeIn, this._x, newXPos, 1, true);
        var yTween:Tween = new Tween(this, "_y", mx.transitions.easing.Regular.easeIn, this._y, newYPos, 1, true);
       
        //setProperty(this, _x, newXPos);
        //setProperty(this, _y, newYPos);
        this.swapDepths(99);
    };

many thx for any answer!

would also be very nice, if someone could help me the next three weeks,
because I seam not to be able to handle the project till the deadline.

*witchest

Changing Size Of Swf According To The Size Of Html Page
hi experts
I want to change size of my swf according to the size of html page in which it opens
such that if page size is 1024 by 768 then swf should scale to that size
if its 700 by 500 also sw should change its size is this possible
i want this so that my animation start fro m edge to edge of page

i basically dont know how to do this has been trying various options for last week no luck
there is 100% option for swf which scales swf size to 100% of page but it does not give edge toedge of page

can anybody help

Auto-size Vs. Fixed Movie Size
I wasn't sure where to put this post. I hope this is the right place.

This is what I want to do:

On screen resolutions up to 800x600, I want my Flash movie to resize to 100% width and height of the browser window. On screen resolutions higher than 800x600, I want the Flash movie to be a fixed size (say 800px x 600px exactly).

Is this possible, and if so, how?

Changing Browser Size Based On Swf Size?
Hi guys, just curious on how to go about this.

I have a swf file with a link and this link opens another swf file. I want the swf file to open up in a browser,but i want it to be the width and height of the swf?

seems simple enough , just cant figure it out if has something to do with the publish settings or javascript.

thanks, fuzz.

Auto-size Vs. Fixed Movie Size
I wasn't sure where to put this post. I hope this is the right place.

This is what I want to do:

On screen resolutions up to 800x600, I want my Flash movie to resize to 100% width and height of the browser window. On screen resolutions higher than 800x600, I want the Flash movie to be a fixed size (say 800px x 600px exactly).

Is this possible, and if so, how?

Positioning Exe's
Is there any way to control the positioning of the .exe's that are being opened?
I have a project that requires 3 different exe's that opens one up after the previous one is finished and the previous one closes. But I want them to be in the same location on the desktop. Right now they cascade down.

any suggestions?

thanx
Bean

Positioning New .swf
People,

I am trying to load a .swf with dimensions of 320 x 240 into the base .swf of 770 x 500, I want to position the targeted swf inside the base and have control over the x and y co-ordinates. Please note these are not movie clips.
And to top it all off I cannot control the size of 320 x 240 It will not import and It is not a native FLASH file.
I am using v5. So....

Is it possible?

If so how do I do this?

Thankyou for any help....I'm desperate

Positioning SWF - X - Y
Hey Guys,

I was wondering what the best way was to position a swf??

I have a main SWF and wanting to load another on top.

example:

on (release) {
loadMovieNum ("example.swf", 1);
}


this loads the swf onto level 1 but is allways positioned
in the top left hand corner when i want it positioned in the center lets say.

Any help would be great.

Thanks
-Mdesign

Positioning An Swf
Hey everyone. I know this has been covered but I cannot find any of the old posts and I am having a brainfart.

I need to load an swf into an MC and position it. I need a frame to call the swf not an object or button. what's the script again? Here is the pseudo code.

//load movie test.swf into the MC called testMC and make sure it;s positioned at _x == 300 ans _y == 3.0


Thanks in advance to anyone who answers.

PS: I may also need to target specific frames in the loaded swf which I also forget how to do. Thanks again to anyone who answers.

Positioning A Swf. Within Another Swf.
I loaded a swf. file within another swf. but I canīt find the right actionscript to move it to some other place of the scene.

X/y Positioning
i have two different actions on buttons calling different movies and am wonderting about positioning x and y....

button 1
on (release) {
_parent._parent.targetClip._x = 112;
_parent._parent.targetClip._y = 110;
_parent.targetClip.loadMovie("test1.swf");
}

button 2
on (release) {
_parent._parent.targetClip._x = 200;
_parent._parent.targetClip._y = 375;
_parent.targetClip.loadMovie("test2.swf");
}

the only way i can get it to work is if i change the instance name to something different (targetClip1) -- is that the only way it can be done? If the instance name is not changed it just loads it in the same x/y position as button1.

Positioning Of Swf In Mc
I have a mc on the root and I am trying to bring in an external swf.

It is bringing the file in but it is positioned to the right and below - how do I get it into the same position as the orginal clip?

Thanks!

My code is below.

on (release) {
tellTarget ("_root.headerModule_mc") {
gotoAndPlay("openSubMenu");
_root.pBOpener_mc.loadMovie("testload.swf");
}
}

Positioning?
Hi
I have been trying to learn by downloading movies and taking them apart. I wanted to learn how to click a button and have a photo slide in from one side and center where I want on the page. My understanding of positioning is useless so I was thinking that maybe somebody knows of a tutorial that explains positioning and how to use it to put things where you want them. I know how basic this is, but I don't understand it and any help would be wonderful.
Thanks

Positioning
I am trying to position the button, the dynamic text boxes, and the drop menu the same on both of my movie clips on different frames. I can't seem to get the positioning working even by typing in the cordinates. Can anyone help?

Pls Help ,swf Positioning
hi,
i am loading a swf file externally ,it is working properly.but what the problem is i want them to load at a particular point.so how do i specify X & Y co-ordinates dyanmically whenever swf file is called.pls help me

As Positioning
is there a way to move a movieclip's position via actionscripting....ie..on(press)///move clip1 to a defined area??
thanks in advance

X And Y Positioning: HELP
Can someone please tell me what I am doing wrong. I have made a mini game (in it's early stages) in which you move a guy around and when he touches the walls he goes back to the red dot in the center (where he starts) Here is the problem. I program to the guy (who is a movie clip):

onClipEvent(load){
moveSpeed=10;

function reset(){
this._x=261;
this._y=173;
moveSpeed=10;
}
}

onClipEvent(enterFrame){
//all the key press stuff

if (this._x>550){
reset();
}
if (this._x<-550){
reset();
}
if (this._y>400){
reset();
}
if (this._y<-400){
reset();
}
}


Now look at the collision bit (the end bit where the If conditions are). That should work right? But when I travel in the negative axis directions, my guy just keeps moving off the screen and then after 7 secs approx it reappears in the center. How come? How can I get rid of the seven sec waiting time. I lowered both negative axis to 15 and it works! Coincedentaly, when I turn on the grid, the width and the height are both 18, near 15. Can someone please help me!

Edit:
Can someone also tell me how to make dynamic text be displayed when the guy resets? (So for example, the guy runs into the side and a message at the top of the screen displays "You bumped into the side so you were reset!"

Positioning?
Is there a way to position Mcs on the stage in one go without having to set the x & y manually for each one?

gabs

[F8] MC Positioning
hey everyone.... I need a hand here...
i've already searched for hours on the net and found nothing.....

well the thing is ....
i have on the library a few movieclips and i need that the moment i open the swf those movieclips position themselves in specific positions, each one in a specific depth as well.

the only way i found to do that was moving the movieclips (i mean, making them enter the scene), but that's no good for me, i need them to be there when i open the file.

that's what i got till now and it's not working...

Code:
var i=10
this.createEmptyMovieClip(floors_mc, i);

function buildStage() {
_root.floors_mc.attachMovie("f001", "f001_mc", i);

_root.floors_mc.f001_mc.onEnterFrame = function(){

this._x = 0;
this._y = 0;
};
_root.floors_mc.attachMovie("f002", "f002_mc", i+10);

_root.floors_mc.f002_mc.onEnterFrame = function(){

this._x = 0;
this._y = 20;
};
_root.floors_mc.attachMovie("f003", "f003_mc", i+20);

_root.floors_mc.f003_mc.onEnterFrame = function(){

this._x = 0;
this._y = 40;
};

};
the movieclips in the library are f001, f002 and f003.....

does anyone know how to solve this??
i thank in advance any intention to help...

Positioning A SWF Using AS3
Hello,

I am trying to bring in a swf file to the stage using ActionScript 3 but am having problems with positioning the file. As it stands the swf plays in the top left corner of the stage, but what if I wanted to change the X & Y position of it, how would I do that?

Here's my script,

stop();
var folioRequest:URLRequest = new URLRequest("scrollingPortfolio.swf");
var folioLoader:Loader = new Loader();
folioLoader.load(folioRequest);
addChild(folioLoader);

Any help would be great, thanks everyone

Copyright Đ 2005-08 www.BigResource.com, All rights reserved