Link to home
Start Free TrialLog in
Avatar of complexlty
complexlty

asked on

Simple toggle for fscommand ("fullscreen", "true"); then on next click flase

Hi all,

I am trying to create a simple fscommand that when clicked changes from true to false. Then on the next click for flase to true etc / on off etc.

But I cant seem to get it to work. All I am doing is changing the true/face attribute, when the button is clicked it goes to frame 2 (for a different button face) then when the button in frame 2 is clicked it goes back to frame 1. The frame changing is working button not minimize or maximize of the window is happening.

//Frame 1:
MYwindowMode= true;
fscommand ("fullscreen", MYwindowMode);


//button_mc: Frame 1;
on (press) {
this._parent.gotoAndStop(2);
_root.MYwindowMode= !_root.MYwindowMode;
fscommand ("fullscreen", _root.MYwindowMode);
}

//button_mc: Frame 2;
on (press) {
this._parent.gotoAndStop(1);
_root.MYwindowMode= !_root.MYwindowMode;
fscommand ("fullscreen", _root.MYwindowMode);
}


Any help is really appreciative or if someone knows a simpler way to do this please let me know!
Avatar of blue-genie
blue-genie
Flag of South Africa image

hey, i just copyied and pasted  your code, and with exception to the fact that this._parent seemed a tad obsolete (I'm assuming that you have the buttons directly on the root) the code is working fine.

You are aware you need to run the swf to test this right?

blu.
ASKER CERTIFIED SOLUTION
Avatar of krishnaprathab
krishnaprathab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of krishnaprathab
krishnaprathab

Hi,

Did my reply answer your question. If so please close this question or if you need some more help on this feel free to ask.

Thanks,
KP