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




Simple Positioning/Scale Question?



Firstly Yes I have searched around for this but theres so many results that havent worked for me i have decided to just ask the question myself.

I have a full screen browser flash page, and at the bottom of the flash content i want a bar that shows the same old copyright mumbo jumbo that always hugs the bottom and that resizes its width to fit the full length of the browser? initial example of this can be seen here (the orange bar) http://www.mandchou.com/

Does anyone know how to achieve this? Thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-30-2007, 10:55 PM


View Complete Forum Thread with Replies

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

Simple Help: How To Initialize X Scale And Y Scale Into Precentages
Hi, it's me again. This is probably a simple help request: How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in precentages, not real numbers.


Code:
USflag.onMouseDown = function ()
{
var temp = USflag;

onEnterFrame = function ()
{
//the two variable's value is currently between 20-30, I want it to be just 100%.
temp._xscale = temp._yscale *= .9;
trace (temp._xscale);
if(temp._xscale < 5)
{
delete onEnterFrame;
}
}
}
One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]

Simple Positioning Problem
I have 3 Movie clips.

MCa
MCb
MCc

MCa and MCb sit on the _root timeline. MCc sits inside MCa.

For MCc I have this following actionscript:

[ACTIONSCRIPT]
on (release) {
_root.MCb._x=this._x;
_root.MCb._y=this._y;
}
[/ACTIONSCRIPT]

What this is supposed to do is set MCb to sit right over top of MCc. However because MCc sits inside MCa, this._x and this._y give relative values within MCa and MCb assigns those values relative to the _root coordinates.

If this makes sence, I would really appreciate some help. I don't want to have to bring MCc onto the _root timeline.

Thanks
-R

Simple .swf X,y, Positioning Problem
With the highlighted lines I'm trying to change the position on the page that the .swf loads to. This is the button code that calls up the external .swf.
Any help?

}
on(release){
loadMovieNum ("scroller1.swf",1);
_root.onEnterFrame = function(){
if (_level1 != undefined){
_level1._x = 300;
_level1._y = 200;
delete _root.onEnterFrame;
}
}
}

Hi X Scale ? Simple Q
hi fellas i have a mc square what im trying to do is scale it with as so it elongates to a rectangle in a nice smooth fashion any ideas ??

Actionscript Simple Scale
Hey - I want to have a movie clip(a text name for a site) go from small to big. A motion tween doesn't provide enough control/restraint. Could someone kindly give me some simple code to do this?
Many Thanks.
[Edited by chinaski30 on 08-19-2002 at 01:26 PM]

Simple Scale Tween Using AS
I thought Id try use actionscript since for some reason using tweening on the timeline means a lovely unwanted super slow automatic ease in when scaling objects? Great idea that! Not.

Im guessing its actually impossible to use the timeline to scale tween without this ridiculous easing coming on that cannot be edited out using edit or anything.

So can you create a scale using actionscript that doesnt ease in anyway at all?

(For an example of what I mean, create a square, create a keyframe, make it massive, create motion tween, no matter how fast or slow the motion it will ease in annoyingly!)

Hope someone can help, sorry for my frustration

Simple Scale Problem
Hi,

I've got 3 horizontal boxes. I've got them scaling to the size I want but the middle and right boxes are scaling in the wrong direction:

I need the middle one to scale out from the centre and the right one to scale out towards the left from the top right (ie the reverse of what the left one does).

Please see guides in attached file if you need more info.

Many thanks for any help.

Best,

Jo

Simple Scale...........doesn't Work :..(
Hi.

I just want to scale a mc
as much as I drag another
mc. I used the following:

scaler = getProperty("/drag", _x);
setProperty("/scale", _xscale, scaler+1);

It works for the first frame,
but it doesn't change. I
use two frames. The second
one says: "Go back to frame
1 and play", so that shouldn't
be the problem...

thanks for any help!

Fox

Rotate, Scale And Drag A Simple Box
Okay, let's see how good you guys are (and how dumb I am).

I want to place a shap over an image of a site plan (the shape represents a group of rooms in a building). I want to give the user the chance to drag the shape to the desired location on the plan, then be able to rotate it (by mousing over one of the corners) or scaling it (by grabbing one of the sides).

How in the world would you do this, because I have no clue how to.

Simple Move/scale Script Question
I have a simple fla attached. It is just a movieclip symbol that scales down and moves to a new location on screen. This is just happening with a tween.

Can someone please explain how to do the exact same thing with AS instead?

I understand the basic AS, such as:

_root.mc._xscale = 20;

I just don't know how to make it move to an exact location and scale at the same time so it looks like a tween insead of just bam, new size and location.

thanks!

Scale Movieclip - It Works But The Scale Handle Wont Be Dragged Correctly
hi,

because I need to get a movieclip dynamically scaled I have the following script. But the problem is that the handle wont stay at the right bottom corner. I think it has to do something with the math function but I dont know exactly what.

ActionScript Code:
attachMovie("Pic", "thePic", 1);

thePic.onEnterFrame = function(){
    this._width = this._height = container.handle._y+25;
}

scrollArea = Math.sqrt(Math.pow(thePic._height,2) + Math.pow(thePic._width,2));
createEmptyMovieClip("container",2);
container._x = 50;
container._y = 50;
container._rotation = -45;
container.attachMovie("scale_handle", "handle", 2, {_y:scrollArea});
container.handle._alpha = 0;

// all mouseactions of the handle
container.handle.onPress = function(){
    this.startDrag("true",0,0,1,scrollArea);
    trace(scrollArea);
    trace(thePic._height);
    }

container.handle.onMouseUp = function(){
    this.stopDrag();
    container.handle._alpha = 100;
}

container.handle.onRollOver = function(){
    container.handle._alpha = 100;
}

container.handle.onRollOut = function(){
    container.handle._alpha = 0;
}

// all mouseactions of the picture

thePic.onPress = function(){
    _root.startDrag();
}

thePic.onRelease = function(){
    stopDrag();
    container.handle._alpha = 100;
}

thePic.onRollOver = function(){
    container.handle._alpha = 100;
}

thePic.onRollOut = function(){
    container.handle._alpha = 0;
}
maybe you could help me.

thanks in advance, ckey

Scale Movie Clip - Location/scale
Hi,

My brain hurts.

I have a mc containing four boxes. Beneath each box there are zoom in/out btns. Please see attached file.

I need to be able to zoom in on each box so it dominates the stage and is centred (see red dashed box in attached file for guide).

I've got this far but it doesn't work!???

import mx.transitions.*;
import mx.transitions.easing.*;
test_mc._xscale=100
test_mc._yscale=100

// function to scale the movie clip, parameter is a number to scale the circle with
function testscale (scaleFactor:Number):Void {
var xscaleTween:Tween = new Tween(test_mc, "_xscale", Strong.easeOut, test_mc._xscale, scaleFactor, 1, true);
var yscaleTween:Tween = new Tween(test_mc, "_yscale", Strong.easeOut, test_mc._yscale, scaleFactor, 1, true);
}
//not sure what of the exact scale factor yet but 200 is used just to see if I can get this to work//
btn1.onPress = function (Void):Void {
test_mc(200);
}

Scale Images Fullscreen Scale=true
Hi there,

I've been testing some stuff concerning fullscreen.In the generated html of my main swf I added a javascript to set the site to fullscreen. So when you view the site on a 20" screen the site takes the hole screen. In my publishing settings I set the html to 100% and scale. Probs are with the images from my gallery. When scaling the site the images get pixelated.
I did some testing like bigger quality on the pics but everything stays the same. The images are loaded externaly through an xml file. Any solution to this.

I won't my site to look great on 21" screen too:s.

Big thx in advance.

Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.

and then,

i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.

i am having this bkg and content in the same fla....

what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.

Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.

and then,

i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.

i am having this bkg and content in the same fla....

what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.

MC Clickable At Some Scale, Unclickable At Other Scale
Hi, my first post here. Just getting into actionscripting.

I'm trying to do an effect similar to what sofake has done on the www.matthewmahon.com site, or the billyharveymusic.com site.
I'm not copying outright, don't worry.

Anyway, when zoomed out, on mousover, any of the movie clips are clickable, which causes them to zoom in to, I assume, 100% scale. Then they are not clickable. When you zoom out, by clicking the background (which doesn't give you a clickable mouse pointer, but works ???) they become clickable again.

I assume this is an if / else situation where if scale < 100%, clickable, if = 100% not clickable.

If anyone has a moment to tell me if I'm in the right direction or not, or perhaps the clickable/unclickable code, I would much appreciate it.
thanks.

Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.

and then,

i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.

i am having this bkg and content in the same fla....

what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.

BG To Scale & Main Swf Not To Scale
Folks ive been trying to get my background to scale to whatever the browser is altered to mean while have my main flash site unscaled.

example www.lessrain.com (click on london)


Ive exhausted google trying to find a solution and had no luck from any forums. Cheers for any pointers

BG To Scale & Main Swf Not To Scale
Folks ive been trying to get my background to scale to whatever the browser is altered to mean while have my main flash site unscaled.

example www.lessrain.com (click on london)


Ive exhausted google trying to find a solution and had no luck from any forums. Cheers for any pointers

How To Zoom From One Scale/point To Another Scale/point
I'm trying to get this effect where an image is zoomed at a specific scale and point, then it zooms out to another scale and point on a button click.

Check out this site and click on the menu buttons and you'll see what I mean: http://www.so-reckless.com

I figure you can use a motion tween but I'm looking for the script for better effect.

Thanks.

How To Zoom From One Scale/point To Another Scale/point
I'm trying to get this effect where an image is zoomed at a specific scale and point, then it zooms out to another scale and point on a button click.

Check out this site and click on the menu buttons and you'll see what I mean: http://www.so-reckless.com

I figure you can use a motion tween but I'm looking for the script for better effect.

Thanks.

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

Positioning
I was wondering if anyone could tell me where to look. I am wanting to create a bar that(about 60 pixels high) that hugs the browser top or bottom and also takes 100% of the browser width. If the person browsing resizes the window the menu bar continues to hugs it programmed position.

Any ideas?

-meylo

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... 07/07/2006 14:49
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
When an object is positioned, it takes it position based on a certain point on the object. Is there anyway to change that point? For example, if I put an object at 0,0 and the positioning point is the top left corner, can i change it to the top right corner(in this case putting it off the screen).

Y Positioning
I'm using this code within my LoadNav function to position my navigation items vertically - each is postioned based on the previous items _y pos...


onEnterFrame = function () {
for (i=0; i<=item.length; i++) {
this["but"+i]._y = (this["but"+(i-1)]._y+this["but"+(i-1)]._height)+5;
}
};

When a button is pressed an swf loads into that mc, hence the '_height' reference in the actionscript above. The first nav item is positioned at _y = 100, and the others at 120,140,160 etc...

Now whenever i click on a nav item i would like it to repositon at _y = 100, and the others reposition accordingly. e.g if nav10 is pressed it moves to _y = 120 and the others (1-9) repostion at -60,-40,-20,0,20,40,60,80,100

Can anyone think of a way to do this within the onEnterFrame statement above?

Thanks

Xy Positioning
This must be a simple fix, I cannot find it. !!

My objects according to the properties panel are stating negative xy positions, yet on the stage with the xy 00 at top left they should read positive.

Positioning A JPG
hello,

on level 0 :

a button executing : loadmovie("1.JPEG",1) ( loaded to level 1 )

I would like to give a position (x,y) to this picture.

how can I do this?

Thanks for your help

Positioning My Swf Where I Want
How can I choose the right place/ position of a swf on a stage ?

Positioning With AS
i'm trying to build a movie where there are a couple of long bars positioned on the stage on a vertically, like this:

////////////////////// bar 1
////////////////////// bar 2
////////////////////// bar 3
////////////////////// bar 4
////////////////////// bar 5
////////////////////// bar 6

let's say if the user click on any of the bars, say bar 3, how can i make it so that bar 4 will automatically replace it's position but going up 1 step using AS?
and bar 5 will replace bar 4 and so forth.

sorry for not listing out any AS because i don't even know where to start with. this list is killing me but there must be something in AS i didn't know, help need please!!!!

Positioning
Hi guys i need some help. i just finished a flash proyect the problemm is that i'm trying to positionate a movieclip in the far right down corner, the movie i made fills the entire window but i dont know the coordinates for the four corners, i know that 0,0 for x and y puts the movie clip on the up left corner, but what about the others?

thanks in advance guys

Positioning A JPG
hello,

on level 0 :

a button executing : loadmovie("1.JPEG",1) ( loaded to level 1 )

I would like to give a position (x,y) to this picture.

how can I do this?

Thanks for your help

_x, _y Positioning
hi there ..i need some help NOW

i'm trying to let a smartclip (button inside) to tekk a target (markerMC) to position itself ontop of the smartclip ..use the same _x and _y as the smartclip.

on (press) {
gotoAndStop (2);
setProperty ("/marker", _x, this);
setProperty ("/marker", _y, this);

LoadMovie Positioning
= PLEASE HELP = PLEASE HELP = PLEASE HELP = PLEASE HELP =


I am using LoadMovie to load a temporary movie on Level 1 (temporary meaning it will only last about 150 frames). The movie loads and unloads fine.

The Situation: I need the movie to load at a specific place in the main movie (approximately 20 pixels from the left and 35 pixels from the top).

The Problem: Using x Position 20, y position 35 in the LOADED movie- it moves the entire movie, parent and child.

I only need to position the LOADED movie.


= PLEASE HELP = PLEASE HELP = PLEASE HELP = PLEASE HELP =

Duplicating Then Positioning MCs
hi all,

I want to duplicate an MC, say 12 times, then position the clones in a list fashion, i.e. the first clone is 10px less _y than the original, the second clone is 10px less _y than the first.. and so on.

I know that arrays are needed, but i'm not too sure how to approach this in Flash.

Cheers for any and all input,

-Meph

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