Javascript:setFlashHeight problem

hi there,

I’m having a problem with a site im building where there is a changable stage height which passes the height to the browser so you only have a vertical scroll when it’s required.

I’ve had it working like this:


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

onEnterFrame = function () {
    var point:Object = {x:_level0.details.footer.innerfooter._x, y:_level0.details.footer.innerfooter._y};
    _level0.details.footer.innerfooter.localToGlobal(point);
    var xPos:Number = Math.ceil(point.y);
    
this.onEnterFrame = function() {
    if (allowResize == "true") {
h = Math.ceil(point.y+_level0.details.footer.innerfooter._height)+520;//
getURL("javascript:setFlashHeight('flashid', "+h+");");
resize();
}    

};
    trace("Converted co-ordinates are "+point.x+", "+point.y);
    trace("xpos is "+xPos);
};

but if I try and ditch the h = part and use this code below:

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

onEnterFrame = function () {
    var point:Object = {x:_level0.details.footer.innerfooter._x, y:_level0.details.footer.innerfooter._y};
    _level0.details.footer.innerfooter.localToGlobal(point);
    var xPos:Number = Math.ceil(point.y);
    
    this.onEnterFrame = function() {
        if (allowResize == "true") {
            getURL("javascript:setFlashHeight('flashid', "+xPos+");");
            resize();
        }
    };
    trace("Converted co-ordinates are "+point.x+", "+point.y);
    trace("xpos is "+xPos);
};

…it doesn’t work :hair:

xPos traces fine and as the site increases in size the number increases accordingly, i just haven’t a clue why it can’t pass that number through when it can for the code at the top of the page.

any help or hints would be grately appreciated as this has had me scratching my head for a very long time now,

cheers
lints