Chris, thanks for the third reply.
Reading again the first paragraph form your reply, I realize that I'm afraid I haven't explained myself accurately enough and so I have caused a basic misunderstanding here. What I intend is, as you put it: "loading two objects into the same layer, then deleting that layer. Hence they both disappear." This is exactly what I want. Both objects are a fullscreen button, once pressed they should disappear. This works fine. But my question should have been more clear: how do I get the window in fullscreen mode? I know that I can add the proper command to the button itself, but I would like to add it by adding to the button a variable and a conditional that defines the fullscreen mode. I hope it is clear now. The conditional doesn't seem to work in the code. What am I missing there? Thanks for your help, Pablo Chris Pugh wrote: > To be precise Pablo, the same thing as you were dong last time! > You are loading two objects into the same layer, then deleting > that layer. Hence they both disappear. > > To solve it you need tow sprites, not one. I've annoted you code, > to make it work,, and pasted the code below. > > I note with interest, that you have taken on board the suggestion > made last time. ;o) > > HTH. > > Regards, > > > Chris. > > ~.~~.~.~.~.~.~.~.~..~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. > > .flash filename="variables.swf" version=7 fps=12 > .outline fscreen_outline: M 62.78125 18.703125 L 43.367188 23.734375 L > 38.390625 43.09375 L 42.109375 39.375 L 48.671875 45.9375 L 65.625 > 29.039062 L 59.0625 22.421875 L 62.78125 18.703125 z M 199.71875 > 18.703125 L 203.4375 22.421875 L 196.875 29.039062 L 213.773438 45.9375 > L 220.390625 39.375 L 224.109375 43.09375 L 219.132812 23.734375 L > 199.71875 18.703125 z M 83.125 45.9375 C 73.429688 45.9375 65.625 > 53.742188 65.625 63.4375 L 65.625 133.4375 C 65.625 143.132812 73.429688 > 150.9375 83.125 150.9375 L 179.375 150.9375 C 189.070312 150.9375 > 196.875 143.132812 196.875 133.4375 L 196.875 63.4375 C 196.875 > 53.742188 189.070312 45.9375 179.375 45.9375 L 83.125 45.9375 z M > 48.726562 150.9375 L 42.109375 157.5 L 38.390625 153.78125 L 43.367188 > 173.140625 L 62.78125 178.171875 L 59.0625 174.453125 L 65.625 > 167.835938 L 48.726562 150.9375 z M 213.773438 150.9375 L 196.875 > 167.835938 L 203.4375 174.453125 L 199.71875 178.171875 L 219.132812 > 173.140625 L 224.109375 153.78125 L 220.390625 157.5 L 213.773438 > 150.9375 z .end > .outline fulls_outline: M 17.5 0 L 245 0 C 254.695312 0 262.5 7.804688 > 262.5 17.5 L 262.5 179.375 C 262.5 189.070312 254.695312 196.875 245 > 196.875 L 17.5 196.875 C 7.804688 196.875 0 189.070312 0 179.375 L 0 > 17.5 C 0 7.804688 7.804688 0 17.5 0 z .end > .filled fscreen outline=fscreen_outline fill=#969696ff color=#969696ff > .filled fulls outline=fulls_outline fill=#64646496 color=#64646496 > > .button fscr_button > .show fscreen as=idle > .show fscreen as=area > .show fscreen as=hover > .show fscreen as=pressed > .end > > .button fs_button > .show fulls as=idle > .show fulls as=area > .show fulls as=hover > .show fulls as=pressed > .on_release: > fscr_button._visible = 0; > fs_button._visible = 0; > show_dlbar = 1; > .end > .end > > .sprite fullscreen_button > .put fscr_button > .end > > .sprite fscreen_button > .put fs_button > .end > > .frame 1 > .put fullscreen_button > .stop fullscreen_button > .put fscreen_button > .stop fscreen_button > .action: > show_dlbar = 0; > if (show_dlbar == 1) {Stage["displayState"] = "fullScreen";} > .end > .end > > ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. > > 2009/11/7 Pablo Rodríguez <oi...@web.de>: >> Hi there, >> >> in the example bellow, I try to define a variable (show_dlbar) in a >> button, to define a conditional using this variable in the main >> ActionScript code from frame 1. >> >> I don't know why, but the conditional is not triggered (when I press the >> button, it isn't visible anymore as intended, but no fullscreen mode). I >> must be missing something extremely basic. This is a simplified version >> of what I intend. >> >> Could anyone tell me what I'm doing wrong here? >> >> Thanks in advance, >> >> >> Pablo >> >> >> >> .flash filename="variables.swf" version=7 fps=12 >> .outline fscreen_outline: M 62.78125 18.703125 L 43.367188 23.734375 L >> 38.390625 43.09375 L 42.109375 39.375 L 48.671875 45.9375 L 65.625 >> 29.039062 L 59.0625 22.421875 L 62.78125 18.703125 z M 199.71875 >> 18.703125 L 203.4375 22.421875 L 196.875 29.039062 L 213.773438 45.9375 >> L 220.390625 39.375 L 224.109375 43.09375 L 219.132812 23.734375 L >> 199.71875 18.703125 z M 83.125 45.9375 C 73.429688 45.9375 65.625 >> 53.742188 65.625 63.4375 L 65.625 133.4375 C 65.625 143.132812 73.429688 >> 150.9375 83.125 150.9375 L 179.375 150.9375 C 189.070312 150.9375 >> 196.875 143.132812 196.875 133.4375 L 196.875 63.4375 C 196.875 >> 53.742188 189.070312 45.9375 179.375 45.9375 L 83.125 45.9375 z M >> 48.726562 150.9375 L 42.109375 157.5 L 38.390625 153.78125 L 43.367188 >> 173.140625 L 62.78125 178.171875 L 59.0625 174.453125 L 65.625 >> 167.835938 L 48.726562 150.9375 z M 213.773438 150.9375 L 196.875 >> 167.835938 L 203.4375 174.453125 L 199.71875 178.171875 L 219.132812 >> 173.140625 L 224.109375 153.78125 L 220.390625 157.5 L 213.773438 >> 150.9375 z .end >> .outline fulls_outline: M 17.5 0 L 245 0 C 254.695312 0 262.5 7.804688 >> 262.5 17.5 L 262.5 179.375 C 262.5 189.070312 254.695312 196.875 245 >> 196.875 L 17.5 196.875 C 7.804688 196.875 0 189.070312 0 179.375 L 0 >> 17.5 C 0 7.804688 7.804688 0 17.5 0 z .end >> .filled fscreen outline=fscreen_outline fill=#969696ff color=#969696ff >> .filled fulls outline=fulls_outline fill=#64646496 color=#64646496 >> >> .button fscr_button >> .show fscreen as=idle >> .show fscreen as=area >> .show fscreen as=hover >> .show fscreen as=pressed >> .end >> >> .button fs_button >> .show fulls as=idle >> .show fulls as=area >> .show fulls as=hover >> .show fulls as=pressed >> .on_release: >> fscr_button._visible = 0; >> fs_button._visible = 0; >> show_dlbar = 1; >> .end >> .end >> >> .sprite fullscreen_button >> .put fscr_button >> .put fs_button >> .end >> >> .frame 1 >> .put fullscreen_button >> .stop fullscreen_button >> >> .action: >> show_dlbar = 0; >> if (show_dlbar == 1) {Stage["displayState"] = "fullScreen";} >> .end >> .end >> >> >> > > >