
Copy link to clipboard
Copied
After some research, I found that it is basically impossible to add a js lightbox to overlay flash content without diving into the problematic world of wmode. So, I want to recreate the functionality using AS3. However, I need so help.
My current flash site is a predetermined size and is not meant to be scaled. My thought was to modify my current FLA so the stage would adjust to the size of the browser window while keeping the content I have already created at a fixed size. That way I have the entire browser window at my disposal for displaying my "lightbox" content and the site still has its originally intended design.
I have found some code that looks promising (see below), but being new to AS3, I just don't know where to begin. How can I have a scaling SWF, but implement it so that only certain elements scale and others remain a specified size?
If anyone has any advice, I would greatly appreciate it.
RESIZABLE SWF STAGE CODE________________________________________________________________________________________________
package {
import flash.display.Stage;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
public class myStage extends Sprite {
private var _mc:Sprite;
private var _stage:Stage;
public function myStage(mc:Sprite){
this._mc = mc;
_stage = _mc.stage;
init();
listeners();
resizeHandler(new Event(Event.RESIZE));
}
private function init() {
_stage.scaleMode = StageScaleMode.NO_SCALE;
_stage.align = StageAlign.TOP_LEFT;
}
private function listeners() {
_stage.addEventListener(Event.RESIZE, resizeHandler);
_mc.addEventListener(Event.RESIZE, resizeHandler);
}
private function resizeHandler(event:Event):void {
_mc.x = (_stage.stageWidth/2) – (_mc.width/2);
_mc.y = (_stage.stageHeight/2) – (_mc.height/2);
}
}
}
1 Correct answer
Here's some links to tutorials that might help you:
Flash Full Screen Adaptable design
----------------------------------
http://www.tutorio.com/tutorial/liquid-flash-layout
http://www.gotoandlearn.com/play?id=31
http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=128
And don't get a complex... some posts just aren't easily answerable or aren't presented clearly enough for someone to be willing to jump in. You'll have to have more patience than not being able to go two hours without an ans
...
Copy link to clipboard
Copied
I know I am new, and ask for a lot of help, but what did I do wrong because my past couple of posts have been treated like kryptonite.
Copy link to clipboard
Copied
Here's some links to tutorials that might help you:
Flash Full Screen Adaptable design
----------------------------------
http://www.tutorio.com/tutorial/liquid-flash-layout
http://www.gotoandlearn.com/play?id=31
http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=128
And don't get a complex... some posts just aren't easily answerable or aren't presented clearly enough for someone to be willing to jump in. You'll have to have more patience than not being able to go two hours without an answer. Your history shows you've had success getting help here, so have some faith.

Copy link to clipboard
Copied
Thank you for your reply. And I apologize if I sounded pushy - not intended. I was just really frustrated that I could not (or even begin to) get the results I wanted due to my limited knowledge of AS3. I FINALLY found some tutorials and the links you sent helped as well, so again, thank you. I will be more patient in the future - hope no harm was done.
Copy link to clipboard
Copied
You're welcome.

