The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsI have this code for full screen, on a button
on (release)
{
Stage.displayState = "fullScreen";
gotoAndPlay(2);
}
and this one to make it back to normal
on (release)
{
Stage.displayState = "normal";
gotoAndPlay(1);
}
But it doesn't work.. and gives this error...
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: There is no property with the name 'displayState'.
Stage.displayState = "fullScreen";
**Error** Scene=Scene 1, layer=Layer 1, frame=2:Line 3: There is no property with the name 'displayState'.
Stage.displayState = "normal";
Any idea's of how to fix this?
lol
i think you have put it on the main timeline or on a frame instead of on a button actions
Or you have Flash v.8 or earlier. displayState was introduced in Flash CS3.
Vexagon is dead. This is VanVeenGames!
At 9/16/09 01:16 PM, BloodSucker150 wrote: lol
i think you have put it on the main timeline or on a frame instead of on a button actions
I put it in a button lol
At 9/16/09 01:32 PM, Vexagon wrote: Or you have Flash v.8 or earlier. displayState was introduced in Flash CS3.
Nah.. I have CS3.. doesn't work though.. its flash 9 not 10 though..
Maybe that's it?
to access the stage in AS3 you have to use "stage" and not "Stage".
like the other things:
stage.scaleMode ...
so it suppose to work only if you are using AS2..
I had full screen for a cartoon, I used AS 2.0 and I had a toggle button, and a frame at the start of the movie with some Actionscript.
Movie frame ActionScript
function toggleFullScreen(){
//if normal size, go to fullscreen, else go to normal size
if(Stage["displayState"]=="normal"){
Stage["displayState"]="fullScreen";
_root.dood.lol.gotoAndStop(2);
}else{
Stage["displayState"]="normal";
}
}
//Create a listener for each time the Stage is resized
var resizeListener:Object = new Object();
//Called each time the stage is resized
resizeListener.onResize = function () {
//Move the button to the center of the screen
toggleFullScreenButton._x=Stage.width/2;
toggleFullScreenButton._y=Stage.height/2;
}
//Add the listener to Stage
Stage.addListener(resizeListener);
and the button was
on(press){
toggleFullScreen();
}
hope that works for ya
And the actual issue was that the flash compiler used is too old to recognize the property. By using the dynamic property name style, the compiler skips checking the property name and hopes for stuff to work at runtime.
Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.