flash MC Placement?
- Started
- Last post
- 16 Responses
- getdown177
I am trying to when using flash at 100 percent in browser to set a Movieclip within flash to always be at the bottom of the browser regardless if they resize.... is that possible?
- lvl_130
hey redfridge, i could be mistaken but getdown seems to be looking for that code involving stage listeners. i could be wrong, but i know that it's somewhere on moocks pages
- redFridge0
Stage.showMenu = false;
Stage.scaleMode="noscale";
Stage.align="tl";function onResize() {
//keep content centered
this._x = Math.floor(Stage.width/2);
this._y = Math.floor(Stage.height/2);
}//listen for stage resize
Stage.addListener(this);
- getdown1770
I am using that stage listener... but I am wanting a movieclip to always be at the bottom.. besides some other content...
- dijitaq0
make a function
var placeMC = function (targetMC:MovieClip){
targetMC._ y = Stage._height - targetMC._ height;
}call the function on stage resize
var myListener = new Object();
myListener.onResize = function()
{
placeMC (targetMC);
}
Stage .addListener(myListener);
- getdown1770
I couldnt get that to work... hmmm dont know but all I want is a piece of code to get an movieclip on the stage to sit at the bottom regardless of resizing of browser..
- redFridge0
if you put the registration point at the bottom you can use something like
this._y = Stage._height - this._y;
- getdown1770
but I am not trying to get the whole thing to be at the bottom..
just a movieclipand I tried
bottom._y = Stage._height - bottom._y;
- redFridge0
you need to take the stage height and subtract the height of the object your trying to place.
bottom._y = Stage._height - bottom._height;
- getdown1770
Still no luck...
Imagine all you have on the stage is a movieclip called bottom.
I place code on frame 1 of timeline that says:
mainInit();
function mainInit() {
Stage.align = "";
Stage.scaleMode = "noScale";
titleClip.onResize = function() {
_root.nav.bottom._y = Stage.height-(_root.nav.bottom...
this._y = -1;
};
Stage.addListener(titleClip);
this.titleClip.onResize();
}but nothing happens..
- Nac0
before "titleClip.onResize....."
try putting:
this.attachMovie("titleClip", "titleClip", 1000000);
- getdown1770
that wont do anything...
your not attaching clip...
- Nac0
try it!!!!!
only thing i can think of...if i am wrong you cna kick me in the shin and call me captain pinky!
- dijitaq0
Stage.scaleMode = "noScale";
Stage.align = "LT";
//
var stageListener:Object = new Object();
stageListener.onResize = function() {
holderContentArea._x = Math.round((Stage.width/2)-(hold...
holderContentArea._y = Math.round((Stage.height/2)-(hol...
currentContainer._x = Math.round((Stage.width/2)-(curr...
currentContainer._y = Math.round((Stage.height/2)-(cur...
};
Stage.addListener(stageListener...
//not to put the clip on the bottom but i goes something like it