-
gdsgd
I'm trying to start a page but would like to understand the use of the Stage.onResize method...
Is it supposed to work when the browser scale changes?
I'm coding:
Code:
Stage.scaleMode = "noScale";
this.createTextField("stageSize_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
var stageListener:Object = new Object();
stageListener.onResize = function() {
stageSize_txt.text = "w:"+Stage.width+", h:"+Stage.height;
prova_mc._xscale = 10;
prova_mc._yscale = 10;
};
where prova_mc is just a circle clip on stage, but nothing happens if I resize my browser
-
.
Hi Cap,
You forgot to add one line of code from the tutorial you used.
Stage.addListener(stageListener);
-
Thanks, Fruit,
I didn't think this would be posted. I kept being redirected to a page saying the site was down...
I do have the line in my file, I forgot to post it here.
Does this have anything to do depending on the browser one uses? I have tried on chrome and internet explorer and it doesn't change the size of my clip on stage
-
.
-
Hey, thanks, Fruitbeard
can I ask you to write the code for me here, please? I have restored my computer again and would like to try and keep it as clean of expired programs as possible
-
.
Hi,
you need a clip called screen on the screen too, square, x=0, y=0
[PHP]Stage.scaleMode = "noScale";
Stage.align = "TL";
this.createTextField("stageSize_txt",this.getNextH ighestDepth%2
-
-
Client Software Programmer
wow as2 has listeners, never "heard" of that good to know.
-
.
Hi,
You have been self mastering AS2 for this long and never knew that.
-
.
My previous post was missing most of what I wrote, I hope you managed to get what you needed Cap.
A test to see if it has been fixed.
PHP Code:
Stage.scaleMode = "noScale"; Stage.align = "TL";
this.createTextField("stageSize_txt",this.getNextHighestDepth(),100,100,100,22); var stageListener:Object = new Object();
Stage.addListener(stageListener); stageListener.onResize = theStage;
function theStage():Void { stageSize_txt.text = "w:" + Stage.width + ", h:" + Stage.height; prova_mc._xscale = 10; prova_mc._yscale = 10; screen._width = Stage.width; screen._height = Stage.height; screen._x = 0; screen._y = 0; }
//theStage();
-
Client Software Programmer
make the jump you said, itll be fun you said
-
.
Hi,
Switching to AS3 does not mean forgetting the AS2 knowledge you have.
Anyway, the fact that AS2 has listeners has nothing to do with taking the jump.
It was the fact that whilst becoming an AS2 guru, it seems a little odd that you never heard of listeners in AS2 before.
-
Client Software Programmer
maybe I should've listened :/
-
.
Hi
PHP Code:
var AlloyListener:Object = new Object();
Stage.addListener(AlloyListener);
AlloyListener.onMousemove = doAlloy;
function doAlloy():Void
{
Alloy.payAttention;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|