Flash When Screen Resized
- Started
- Last post
- 4 Responses
- HAMT
I was reading this techote from moock
http://moock.org/asdg/technotes/…how would I add a line that goes across the screen
I tried to create a movie clip using attachMovie but it didn't work.
here it is the code I used:
//Create line
this.attachMovie["lineClip", "lineClip", 1000010];
// Keeps the line in place when the movie is resized.
lineClip.onResize = function [] {
this._y = Stage.height/2;
this._width = Stage.width;
}
// Register line to be notified when movie is resized.
Stage.addListener[lineClip];
// Set initial position of line.
this.lineClip.onResize[];ANy help?
- Mick0
Maybe look into the 'align' component on flashcomponents.net - it's pretty cool.
- HAMT0
ok I will
but the must be a way to do it
with action scripting?
- unfittoprint0
Well, the Stage listener, and the Resize function should do it, I use it often.
Did you forgot to include this two lines of code in the beginning [they're essential]:
Stage.align = "T";
Stage.scaleMode = "noScale";also don't forget to put in the html properties the width and height to 100%...
- JazX0
unfit, you should seriously start a charge by question consulting gig for yourself. :) You rock!