The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 ViewsAt 5/20/09 11:18 AM, xtended12 wrote: How I can make a button that locks layer when movie is playing and turn invisible. Like in other movies has a subtitles and a button that turn on or turn off...
The movies aren't turning on and off the layer, they're just changing the visibility of the items on that layer.
//AS2
mySubtitles._visible = false;
//AS3
mySubtitles.visible = false;
etc
you don't call it lock, but visibility.
you do that by actionscript using the property
<em>movieClip</em>._visible=<em>booelanValue</em>;
my another advice is that you don't turn on/off the subtitles itself,
but the mask that lets you see it.
(definitely mask is another layer)
At 5/20/09 11:27 AM, dragonjet wrote: you don't call it lock, but visibility.
you do that by actionscript using the property
movieClip._visible=booelanValue;
my another advice is that you don't turn on/off the subtitles itself,
but the mask that lets you see it.
(definitely mask is another layer)
movieClip._visible=booelanValue;
oh so Italic doesn't work inside code tags?
At 5/20/09 11:28 AM, dragonjet wrote: oh so Italic doesn't work inside code tags?
Clearly not, as the <code> tags prevent any sort of auto formatting of tags. It'd be pretty rubbish if you wrote out some HTML in code tags, only for it to be all formated when you posted. ;)
At 5/20/09 11:30 AM, xtended12 wrote: So that code with " mySubtitles " I need to name that layer or just instant name..?
Needs to be the instance name. Layers names are only used when you're working in Flash, you can't refer to layers through AS in your exported SWF or anything.
At 5/20/09 11:43 AM, xtended12 wrote: So Create movie clip<give instant name<write that code IN BUTTON<and done?
You can't just paste that code as is into a button, you'll need to give it some sort event.
//AS2
myBTN.onPress = function(){
//Visible code here
}
//AS3
myBTN.addEventListener(MouseEvent.CLICK, clicked);
function clicked (e:MouseEvent):void{
//Visible code here
}
Where myBTN is the instance name of your button. Both sets of code live on the main timeline.