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




[CS3] Document/stage Height - Problem



I already posted a thread in Flash 8 but now realise this might have been the wrong forum - so apologies for "cross-posting"! Feel free to delete my previous post in other forum.

The problem...

I have converted a very long technical document from PDF to SWF which works quite well but if I wish to reduce or increase the FLA document size (over 2880px), it wouldn't allow me. e.g. this particular document's height is about 4400px and flash opened it without issues but if I wish to reduce the height to say 3000px... no luck!

Is there a way of setting the document height that's more than 2880 (either within Flash or any other 3rd party tool including command-line) - basically "forcing" Flash CS3 to accept more than 2880px?

Many thanks in advance!



FlashKit > Flash Help > Flash General Help
Posted on: 02-27-2008, 06:09 AM


View Complete Forum Thread with Replies

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

Stage.width And Stage.height Not Matching Document Settings?
Ok, so I have no idea why this would be happening and its driving me nuts. I have my Flash movie size set to 960x650. However, when I trace stage.width and stage.height, I get:

950.05x630

Why in the world would this be happening? It's screwing up all the work I'm trying to put into positioning elements relative to the stage size. Thanks for any help!

Stage.width && Stage.height Doesn't Work Anymore?
How do you get Stage.width and Stage.height in ActionScript 3.0

2.0 this works like a charm. I guess they may have moved this inside a deeper class or something.

thanks in advance.

Stage.height And Stage.width Erratic Values?
Hey folks,

I was wondering if it happens in all Flash everywhere, or just in mine:

When I trace Stage.height and Stage.width, I always get erratic values:

Stage.height gets me always 4 pixels less than real
Stage.height gets me always 104 pixels less than real

This, way if my stage has 760 x 400, it will return values 756 x 296.

Anybody knows why?

Thanks!

Stage.width, Stage.height, Add.Listeners Problem
Hi
i found the way yesterday to ensure my mc stays full screen. now i want to animate the same mc if i can in reaction to a button click.

not sure how this next step goes. do i need another addlistener to the background mc that im tweening ?

kindly check the .fla. to see what i mean.
its very rough cut but hopefully you can get the gist of it.
when the text button is clicked, the bg reverts to the top left of the screen.

thanks
-dj

MX2004 -- Stage.height And Stage.width Different From Mac To Windows
I have a really strange problem that is ruining my movie. I have set the size of the stage to 450px by 400px in the properties dialog. In my actionscript, I've got all kinds of things that rely on Stage.width. So, I developed everything in MX2004 on Mac, and everything worked swimmingly. So, I opened up the exact same file in MX2004 and everything is placed wrong on the stage. So when I did a trace of Stage.width, I got 940px, and a trace of Stage.height gave me a figure of 763 pixels. If I do the same traces on the Mac, I get what I expect, 450px for width and 400px for height. Does anybody have any ideas as to what might cause this kind of discrepancy?

Thanks,
John

Document Height
Hi all

I'm using the script below to generate snow/fairy dust.

However I need it to begin falling not from the top of the flash file, but about 300px from the top. And the script will vary this slightly which is what I need.

Can someone let me know how to achieve this? I gather it involves reversing where the swf defines the beginning of 'height' (bottom as opposed to top) or somesuch...

Cheers



Code:
stop();

init = function () {
width = 573;
// pixels
height = 434;
// pixels
max_snowsize = 20;
// pixels
snowflakes = 40;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 25+Math.random()*50;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+150) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();

all_mc.swapDepths(10000);

[help] Getting Info About Height Of Document
is there any way, using actionscript (mx, not mx 2004), to find out the height (or width) of a document?

i tried
Stage.height
but that also includes the height of the window (if a user drags a window of a flash movie it will change the stage height or width)

any suggestions?

Document Height Issue
Hi all

I'm using the script below to generate snow/fairy dust.

However I need it to begin falling not from the top of the flash file, but about 300px from the top. And the script will vary this slightly which is what I need.

Can someone let me know how to achieve this? I gather it involves reversing where the swf defines the beginning of 'height' (bottom as opposed to top) or somesuch...

Cheers



Code:

stop();

init = function () {
width = 573;
// pixels
height = 434;
// pixels
max_snowsize = 20;
// pixels
snowflakes = 40;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 25+Math.random()*50;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+150) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();

all_mc.swapDepths(10000);


This line I gather is what I need to be messing with...

t._y = -(height/2)+Math.random()*(1.5*height);

[help] Getting Info About Height Of Document
is there any way, using actionscript (mx, not mx 2004), to find out the height (or width) of a document?

i tried
Stage. height
but that also includes the height of the window (if a user drags a window of a flash movie it will change the stage height or width)

[help] Getting Info About Height Of Document
is there any way, using actionscript (mx, not mx 2004), to find out the height (or width) of a document?

i tried
Stage. height
but that also includes the height of the window (if a user drags a window of a flash movie it will change the stage height or width)

Document Width & Height
hi,

is it possible to get (and modify) the document's width and height through actionscript?

thanks,
g

Stage.width & Stage.height Problems
Why is it when I use this script attached to an empty movie clip the box seems to always be short on the height side? The width is fine. See attached FLV.

frame.fla.zip

Thanks in advance for any feedback.


Code:
onClipEvent (load) {
this._x = 0;
this._y = 0;
this.moveTo(0, 0);
this.lineStyle(1, 0x000000, 100);
this.beginFill(0x000000, 0);
this.lineTo(Stage.width-1, 0);
this.lineTo(Stage.width-1, Stage.height-1);
this.lineTo(0, Stage.height-1);
this.lineTo(0, 0);
this.endFill();
}

Stage.height & Stage.width Return 0
First, hey there, cool forum. This is my first post...anyways...

I'm having what, I want to assume, is a common issue and there's something I'm missing here...I have a flash movie that works fine (that is Stage.height and Stage.width) return their proper values when the actual SWF is played in the flash player, however, when I put the movie into an HTML page and set it's height and width to 100%, Stage.width and Stage.height are 0 and my neato script breaks.

I realize I'm scaling the movie, but it seems to me that Stage.width and Stage.height should work regardless...and the fact it gives me 0 is even more odd, as though it's not working at all.

Document Width & Height - Changing
Hi there!

I wanna change the height of my flash-movie, without scaling its contents.

When using "_root._height = 100;" the contens are shrinked,
what I wanna do is to just cut off the contents below 100pixels.
(as when you change the size of the document in mx: Modify->Document)


The reason that I wanna do this is, this:
-I have a "frame-swf", with buttons that load .swf-files into itself.

-When loading a .swf that is very "tall", I want the height of the
"frame-swf" to change, so that I can use the browsers scrollbars to
scroll.

I hope you understand what I mean..


I use FlashMX.
Thanks!
/Fredrik Olsson

[MX] Resizing Flash Document Height
Hello, I am working on a flash site and I am nearly done, however, I have now found out that i have to create more room at the top of the flash movie, however when i tried to increase the height of the document, it used the top of the document as the anchor and space was created at the bottom of the document. When I tried to select the all of the frames to push the movie down on the page to create room at the top, only some of the items were moved. How do I create room at the top of the file?

Setting Document Width And Height From XML
Hi!

I'm trying to figure out if this is even possible. I want to upload an xml file with my swf and have my XML set the swf's width and height. So if I know my viewers will have a screen resolution of 800 x 600, then I can set my swf to fit their browser's window from the XML itself. Some have suggested making it autosize for the browser, however I don't want to do that. I would like to be able to set it from an XML file...

Thanks!!!!!!!

Kal

How To Change Document Height Within Flash Itself?
Hi guys, this is my first time creating a flash website. Not sure if this is the right way of doing...

I'm using an index.swf which contains only the navigation bar, buttons and an empty movie clip. Everytime i press a button, i load a new .swf file through the empty movie clip.

The problem i'm having now is that my index.swf height is 400 pixels. If i load another page which is more than that height, how do i stretch the flash file using actionscript (or other methods) to a height of say 800 pixels?

Can it even be done? Cause i look through the help files and i came across document.height which looks like it may do the trick... but it dosen't work when i add it on my button.


ActionScript Code:
on (release){
   document.height = 400;
}

Trimming The Document Height Without Affecting Other Objects
I have a small but potentially huge problem. My doc height is 770. I want it trimmed down to 700 however when I change the value in the modify document window the document gets trimmed from the bottom up not top down. This means I would have to go in a onion skin all and reposition everything. Not a good idea and not safe. Way too many objects to be messin with.

Any suggestions?

Thanks

What Width/height For A Document To Make It As Big As Possible To Fit In Screen
What width, height, should I use to "cover" the entire screen with my program? basically as if you've got it full screen

Flash Publishes Different Height & Width Than Document Settings
So I have the document witdth and height set to 523x247 but when I look at the HTML that flash publishes, it is calling 550x247. Has anyone ever seen this before? It actually looks better with the larger height/width that flash publishes! If reassign those values to what I thought they should be, document size, some artifact appears.

Puzzled,
madmartini

How To Obtian Flash Document Size (height N Width)
im looking for the height and width of the document (set in the document properties)

however when i do a trace(_root._width) it shows the width to be the width of my drawing area.

hence i need the variable to obtain the width of the movie itself
thanx alot

Stage.width, Stage.height
Does anyone know why the stage dimensions are coming out wrong. I have a movie set at 800 x 600. I do trace(Stage.width);
trace(Stage.height); and get 796 and 596. What's going on here? I have seen at least one other post with the same issue, but there were no responses.

Best regards...
Lance

Stage Width Vs. Stage Height
hello.
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.

any help, thanks a lot.




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();

Stage.width Stage.height Help
I have the main swf(main) which loads in another swf(loaded). The loaded swf looks at the main swf for the Stage.width and height.

Is there a way for the loaded swf to look at its own Stage.width and height and not main?

[AS] Stage.width & Stage.height
Is it possible to dynamically adjust the Stage.width / Stage.height properties. As an example, my author time stage settings are at 700 by 500. Based on what I pulled from database, is it possible to resize the dimensions of the root swf based on the content which is tabulated into the data ?

Stage.width & Stage.height
Can someone please look at my code and point out the obvious where I cannot see?

Everything seems to be working correctly with the exception of the Stage.width and Stage.height properties the pictures float off the stage.

Code:

import mx.transitions.Tween;
var photoScale = 30;
var photoAlpha = 60;
var clipWidth = 380;
var clipHeight = 300;
var flyerInit:Object = Object();
randomize = function (min:Number, max:Number):Number
{
   var range = max - min;
   var resultRandom = Math.random() * range;
   resultRandom += min;
   return resultRandom;
};
flyerInit.onEnterFrame = function()
{
   this._x += this.speedX;
   this._y += this.speedY;
   this._rotation += this.speedR;
   if (this._x < 0 || this._x > clipWidth)
   {
      this.speedX *= -1;
      this.speedR *= -1;
   }
};
if (this._y < 0 || this._y > clipHeight)
{
   newFlyer.speedY *= -1;
   newFlyer.speedR *= -1;
}
flyerInit.onRelease = function()
{
   if (!this.select)
   {
      this.speedX = 0;
      this.speedY = 0;
      this.speedR = 0;
      var locxTween:Tween = new Tween(this, "_x", non, this._x, clipWidth / 2, 1, true);
      var locyTween:Tween = new Tween(this, "_y", non, this._y, clipHeight / 2, 1, true);
      var rotateTween:Tween = new Tween(this, "_rotation", non, this._rotation, 0, 1, true);
      var scalexTween:Tween = new Tween(this, "_xscale", non, this._xscale, 100, 1, true);
      var scaleyTween:Tween = new Tween(this, "_yscale", non, this._yscale, 100, 1, true);
      var alphaTween:Tween = new Tween(this, "_alpha", non, this._alpha, 100, 1, true);
      var newDepth = this._parent.getNextHighestDepth();
      this.swapDepths(newDepth);
      this.select = true;
   }else {
      this.speedX = randomize(-2, 2);
      this.speedY = randomize(-2, 2);
      this.speedR = randomize(-2, 2);
      var scalexTween:Tween = new Tween(this, "_xscale", non, this._xscale, photoScale, 1, true);
      var scaleyTween:Tween = new Tween(this, "_yscale", non, this._yscale, photoScale, 1, true);
      var alphaTween:Tween = new Tween(this, "_alpha", non, 100, photoAlpha, 1, true);
      this.select = false;
   }
};
for (var i:Number = 1; i < 9; i++)
{
   var newPhoto:String = "p" + String(i);
   var newName:String = "flyer" + String(i);
   var newDepth:Number = this.getNextHighestDepth();
   var newFlyer = this.attachMovie(newPhoto, newName, newDepth, flyerInit);
   newFlyer._xscale = photoScale;
   newFlyer._yscale = photoScale;
   newFlyer._alpha = photoAlpha;
   newFlyer._x = Math.random() * clipWidth;
   newFlyer._y = Math.random() * clipHeight;
   newFlyer.speedX = randomize(-2, 2);
   newFlyer.speedY = randomize(-2, 2);
   newFlyer.speedR = randomize(-2, 2);
   newFlyer.select = false;
}



please help

thanks,

tmo

Stage.height
Sorry to bother you all but I'm wondering if you know whether I can alter the stage size directly from within actionscript? Can I just use

Stage.height = 500;

I've tried this as a frame action but to no effect. Do you know if you can alter stage height directly like this?

Regards,

5leander5

Stage.height = 0?
I'm making a 728x90 banner in Flash MX 2004 - publishing as Flash 6 AS 1.0

trace(Stage.width) yields an output of 728 at all times

I put trace(Stage.height) in an onEnterFrame function - the first iteration yeilds 0, the second and all following yield 90

Any way I can fix this or do I just have to work with the fact that Stage.height isn't defined before my actionscript starts?

Stage.height
I am embedding my flash movie with a height of 700px.

How would I be able to detect if the clients browser is displaying over 700px in height? I will be collecting this information in realtime with use of a stage listener.

Stage.height would not help in this instance as there will always be a render of 700. (because of the embedded parameter) I’m also trying to stick to actionscript as apposed to javascript on this one.

Does anybody know how I may solve this problem?

Thanks in advance..

Stage.height
quick little bug I haven't been able to figure out.

Or something of the sort, at least.

Stage.height has been reporting 100 pixels less than the actual stage's height lately. Of course, I could just add 100 and move on my way, but I was wondering if anyone could actually point me in the direction of what is actually going on.

Get Stage Height
I'm building a component in MX 2004 (although it applies to MX as well) and I'm having difficulties retrieving the stage height and width of the movie. Within a movieclip I've placed this code:


ActionScript Code:
trace (_parent.Stage.width)

The trace command outputs a variable of 'undefined'. Why is this?

Stage Height
when I preview my movie, the stage height is always returned 100 pixels less than the actual height. This doesn't happen when the movie is previewed in a browser.

Does anyone have an answer to why this is happening? I've seen the problen addressed elsewhere, but with no reason/solution....

Stage Height
I am new at this so hopefully this won't be too complicated. I have a home page that loads a .swf file when it opens. The buttons on the home page load a new .swf file using LoadMovieNum. My problem is that each of these files is a different height. If I make the home page long enough to scroll the .html file then those that are shorter have a lot of white space at the end. An example is the height of the home page is 1200. The other .swf files being loaded vary from 650 to 1200. The one that is 650 has a lot of extra white space to scroll through. Thanks in advance for helping.

Stage.height Bug?
There seems to be a Stage.height bug in Flash CS3?

My movie is 800x600.

However while testing my movie in Flash CS3 it returns 800 x 500!
When running SWF in Player it returns 800 x 600.


Has anyone else experienced the same issue?

David D.

Stage Height
Hi guys,

Is there a bug with stage height in Flash? Every time I use that and run a trace statement, it's wrong.

Stage.height Problem
Having some trouble with the Stage class. I know about the "bug" with stage.height but i still cant get it to work right. Ive got a stage height set manually to 400 px but when i run this loop: code:
this.onEnterFrame=function() {
count++;
trace(count+ " "+Stage.height);
}
//it returns:
//1 300
//2 300
//3 586
//4 586
//5 586
//...etc

programming in flash 7 as2.0, but published in 6 and 1.0 does the same thing. what a head scratcher. anybody?

How Do I Get Stage Height And Width In 2.0?
In 1.0 it was stage.height, but I try it in 2.0 and when I trace it, I get "undefined".

trace(stage.height);

What am I doing wrong?

Stage.height Returning 0
Hi all,

Has anyone else found that the Stage object sometimes returns a height of 0 for the first 5-10 frames of a movie loading?

I have a swf that's resizing content according to what size the stage is set to, I need to get this set up on the first frame, which is impossible when Stage.height is lying about it's value!

Has anyone else experianced anything similar, or found a workaround?

Cheers,
Tom

Stage.height Read-only ?
Is the Stage.height property read-only ? Is there any way I can modify it while the movie is playing ?

Browsed the web and the only thing that I found was a post in which someone was saying that it might be possible with JS but didn't gave any details on how to do it.

Stage Height Problem... Please Help
I have some code that I put together and am having problems with it now. It is originally was intended for fullscreen but I want to now restrict it to the size of a container I will load it into. Say it will be 900 x 617.5. Can someone take a look and talk with me about it.


PHP Code:



//SOME SETTINGS

fscommand(showmenu, false);
fscommand("fullscreen", true);
Stage.scaleMode = "noScale"
// these variable you can play with, set them to your preferences
mousescrollSens = 6;//sensitivity of the scroll button of your mouse
contentEase = 3;// the ease of the contentif you dont want no ease, set the var to 1;

// LISTENER TODO FUNCTION

// This function is executed by the listener you will see more down
// and once directly when the file is opened.
// It basicly sets all items present on the stage to its position and size
function toDoListerner() {
    scrollBack._height = Stage.height;
    backg._height = Stage.height;
    scrollBack._y = 0;
    scrollButton._y = 0;
}

// SET THE VISIBILITY ANH LENG OFF THE SCROLLBUTTON

// This on enter frame function tells the scrollbutten what size it should have, i calculates the browser height and the lengt of the content
// Just like the real browser scrollbar!!
scrollButton.onEnterFrame = function():Void  {
    devider = container._height/Stage.height;
    scrollButHeight = Stage.height/devider;
    mover = (scrollButHeight-this._height)/5;
    this._height += mover;
    // if the scrollbar is not needed it disapears
    if (container._height<Stage.height) {
        mover = (0-this._alpha)/5;
        this._alpha += mover;
        this._y = 0;
    } else {
        // it apears when it is needed!
        mover = (100-this._alpha)/5;
        this._alpha += mover;
    }
};

// SCROLL BY DRAGGING THE BUTTON

// These are the four states of the scrollbutton:
// RollOver playes the the animation inside the button to make in turn white
scrollButton.onRollOver = function():Void  {
    this.gotoAndPlay("up");
};
// RollOvut playes the the animation inside the button to make in turn blue again
scrollButton.onRollOut = function():Void  {
    this.gotoAndPlay("down");
};
// onPress starts the drag, the paramaters are there so it dont drag over the whole screen but only on the side of the browser
scrollButton.onPress = function():Void  {
    this.startDrag(lockCenter,300,0,300,Stage.height-this._height);
};
// onRealease stops the drag
scrollButton.onRelease = scrollButton.onReleaseOutside = function():Void  {
    this.stopDrag();
    trace(container._height);
};

// SCROLL BY MOUSEWHEEL

// This mouse listtener object tells when the mouse wheel is scrolled
// the if statements are there to keep the scollbutton on his track
scrollMouse = new Object();
scrollMouse.onMouseWheel = function(delta) {
    scrollButton._y -= delta*mousescrollSens;
    if (scrollButton._y<0) {
        scrollButton._y = 0;
    }
    if (scrollButton._y+scrollButton._height>Stage.height) {
        scrollButton._y = Stage.height-scrollButton._height;
    }
};
Mouse.addListener(scrollMouse);

// SCROLL BY CLICKING SCROLLBAR

// This inline function tells the scrollbutton to move to the mouse position when clicked.
// so you can click on the scrollbar as well (just like in a normal browser!)
scrollBack.onPress = function():Void  {
    maxPos = Stage.height-scrollButton._height/2;
    if (_root._ymouse>maxPos) {
        scrollButton._y = Stage.height-scrollButton._height;
    } else if (_root._ymouse<scrollButton._height/2) {
        scrollButton._y = 0;
    } else {
        scrollButton._y = _root._ymouse-scrollButton._height/2;
    }
};

// SETTING THE STAGE LISTENER

// Here I created a listener which listes if the browser is resized.
// each time the browser resizes, the toDoListener function is executed, (see whats in therr!)
var myListener:Object = new Object();
myListener.onResize = function() {
    toDoListerner();
};
Stage.addListener(myListener);
// I execute the toDoListeren function als once directly when the movie is openend
// to set everything on position :-)
//toDoListerner();

toDoListerner();

// SETTING THE CONTENT POSITION

// This inline function tells the content to move to the position according to the position of the scrollbutton
// it only does so when the content is longer than the stage.
// When the content fits on the steg it just centers the content X and Y position
// I'll brake it down a little:
container.onEnterFrame = function() {
    // the x and y position when content is smaller than the browser height
    yPos = 50;


    // always moves the content to the right y position when it fits though
    if (this._height<Stage.height) {
        if (yPos != Math.round(this._y)) {
            mover = (yPos-this._y)/contentEase;
            this._y += mover;
            if (yPos == Math.round(this._y)) {
                this._y = yPos;
            }
        }
    } else {
        // moves the content to the position according to the scrollbutton
        // everything between this 'else' statement is only executed when content is longer than the browser
        // and the scollbar is needed
        contentScroll = this._height-Stage.height;
        dragScroll = Stage.height-scrollButton._height-50;
        scrollTo = 50-(contentScroll*(scrollButton._y))/dragScroll;
        mover = (scrollTo-this._y)/5;
        this._y += mover;
    }
};

//  IMPORTING FUSE KIT

import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);

//  SETTING FUSE FUNCTION PROTOTYPE

MovieClip.prototype.sizer = function(param2, dL) {
    var fObject:Fuse = new Fuse();
    fObject.push({target:this, _height:param2, seconds:1, delay:dL, ease:"easeInOutCubic"});
    fObject.start();

};
MovieClip.prototype.mover = function(param1, dL) {
    var fObject:Fuse = new Fuse();
    fObject.push({target:this, _y:param1, seconds:1, delay:dL, ease:"easeInOutCubic", func:whenDone, scope:this});
    fObject.start();

};
MovieClip.prototype.fader = function(param1, dL) {
    var fObject:Fuse = new Fuse();
    fObject.push({target:this, _alpha:param1, seconds:1, delay:dL, ease:"easeInOutCubic"});
    fObject.start();

};

//  FUNCTION CALLED WHEN DONE

function whenDone():Void {
    movingProgress = false;
}

// LOADING THE XML INTO A ARRAY

var rubrieken:Array = new Array();
var acticBut:Array = new Array();
var myXML:XML = new XML();

myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
    if (success) {
        menuItems = this.firstChild;
        for (i=0; i<menuItems.childNodes.length; i++) {
            rubriek = menuItems.childNodes[i];
            rubrieken.push(rubriek);
        }
        
    }
// As sson as the data is loaded int the array the function below will be executed
    attachMenu();
};
myXML.load("xml/rubrieken.xml");

// ATTACHING THE MENU

function attachMenu() {
    for (i=0; i<rubrieken.length; i++) {
        
        var menuItems = _root.container.attachMovie("button", "button"+i, 10000+i);
        menuItems._y = menuItems._y+(50)*i;
        menuItems._href = rubrieken[i].attributes.href;
        menuItems.contentT = rubrieken[i].attributes.naam;
        menuItems.theTitle.text = rubrieken[i].attributes.naam;
        menuItems.theDate.text = rubrieken[i].attributes.newsdate;
        menuItems.pasi = i;
        
        
        // The events when you roll over the button
        menuItems.onRollOver = function():Void {
        }
        // The events when you roll off the button
        menuItems.onRollOut = function():Void {
        }
        // The events when you click the button
        menuItems.onRelease = function():Void {
            setMenu(this, this.pasi);
        }
    }
}

// OPEN OR CLOSE ITEM FUNCTION

function setMenu(theItem, pasi) {
    if (!movingProgress) {
for(i=0; i<acticBut.length; i++) {
    if(pasi == acticBut[i]) {
        goCheck = true;
    }
}
if (!goCheck) {
        
    if (theItem != _root.activItem) {
    _root.activItem = theItem;
    acticBut.push(pasi);
        theItem.contentHolder.contentText.text = rubrieken[pasi].attributes.desc;
        theItem.contentHolder.contentText.autoSize = "left";
    theItem.contentHolder.fader(100, 1);
    theItem.masker._height = theItem._height;
    theItem.masker.sizer(theItem._height);
        for (i=0; i<rubrieken.length; i++) {
            if (i>pasi) {
                movingProgress = true;
                _root.container["button"+i].mover(_root.container["button"+i]._y+(theItem._height-30));
        }
        }
    }
}
    else {
        goCheck = false;
        _root.activItem = false;
        theItem.contentHolder.contentText.text = "";
        theItem.contentHolder.contentText.autoSize = "left";
    acticBut = remItem(acticBut, pasi);
        theItem.contentHolder.fader(0);
        theItem.masker.sizer(50);
                for (i=0; i<rubrieken.length; i++) {
            if (i>pasi) {
                movingProgress = true;
                _root.container["button"+i].mover(_root.container["button"+i]._y-(theItem._height-35));
        }
        }
    }
}
}



function remItem(arr, item){
tempArray = [];
for (i=arr.length-1; i>=0; i--) {
    if (arr[i] != item) {
        tempArray.push(arr[i]);
    }
}
tempArray.reverse();
arr = tempArray;
return(arr);
}




This is the final touch to my project and I really desparately NEED help!

Move To The Stage Height
When I tell an object to move to the 'Stage.height' it moves to the bottom edge. How do I get it to move to the opposite end (the top) while taking everyones screen resolution into consideration?

Scrollbar-(Stage Height)
Was wondering if anyone could help me find a tut. or open source for a scrollbar for a movie clip that adjusts to the stage height although its full screen vertically but the width and its horizontal position are not.

also hide the scrollbar when content fits.

thank you,

Dynamic Stage.height
Hi,

would like to know if i can script in such a way that my stage.height will change according to the height i give??

Stage Height On Loading Swf Into Another
Hi,

I am sure this is a common issue and hopefully there is a solution:

If I load an swf into another swf is there a way of getting the stage height of the child moviclip.

I know the loaded movieclip stage will be the same as the parents (i.e. I know there is only one stage)

So what I need is a way of setting a variable in the child swf when it is published based on the height of the childs stage that can be accessed but will not be changed by the parent.

Does this make sense? I am looking for the most simple solution possible - I am aware I could make transparent MCs and get the height but this means I would have to resize this mc every time I need to adjust the childs stage height.

Any help/ideas appreciated.

pw

Stage Height/Width
I have searched, and for some reason, I cannot get this.

I want to get the width and height of the stage, and set one of my objects to that height and width...

I currently have this:


ActionScript Code:
videoP.height = Stage.stageHeight;
videoP.width = Stage.stageWidth;

Stage Height And Width
can I define some properties of the Stage, like width, height or the background color, by actionscript?

How Get Stage.height 100% In Mozilla?
Problem: Mozilla doesn't recognize Stage.height as other browsers do. I like to place a object relative to the height the users like their windows to be. Say I want to place a mc_ 30px above the bottom of the stage. In most browsers this is not a problem.

Like this:
mc_._x = Stage.height-30;

But, in Mozilla, no go. Can anyone help me with this? I've searched the web for a couple of hours, but found no solution yet ... Also, when I trace the value in Mozilla, I always get "Height:200", but the Width works fine (!?)

Stage.height And Width
Code:

this._x = 0 - (Stage.width - 780)/2 + 20;

this._y = 0 - (Stage.height - 570)/2 + 20;

This will give me top and left site 20px away..
How do i fix this for bottom and right side.

And the 2nd Question is.

Is there a solution to call for example 5 swf's and give him
something like width = 20%

Hope you know what i mean.

Greetz://

Stage.height Problems
Hi everyone: I have been having this really weird issue.

Flash is not measuring the height of my stage correctly: it cuts off 100 pixels. I have no idea what is the deal. I tried with brand new documents, and without fail, when I trace Stage.height, I get the wrong value...so it is obviously impossible to center anything without specifying pixel values.

Anyone else had the same problem, and possibly fixed it???

By the way, I am using an Intel iMac, Flash Professional 8 and Flash player 9, if any of this matters.

Thank you all: any help would be appreciated.

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