The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsAnyone know how to turn a certain layer on and off using actionscript? I want to make a feature that can turn subtitles on or off. Help....
At 12/28/08 05:46 PM, MOC-Productions wrote: Anyone know how to turn a certain layer on and off using actionscript? I want to make a feature that can turn subtitles on or off. Help....
you need to convert your subtitles into a movieclip, give it an instance name on the properties panel, and then do
mc_name._visible=false;
mc_name._visible=true;
when you want to hide/show them
note, do not create a new movieclip for each different piece of subtitle text.
Alternatively, just display your subtitles in a dynamic text box. Store each subtitle into an array, then display the next array index contents every time a new subtitle comes up. IF, subtitles are turned on of course.
After you do what Afro-Ninja said,
you'll need a boolean variable that changes when
the user switches the options between subtitles/no subtitles.
So when you're coding the play button for the whole movie,
you're going to have to account for that boolean.
Not sure if you know how to do this or not, but, just incase
i'll give you a little example code. :]
myPlayBtn.onRelease = function() {
if(subtitlesOn) {
theSubtitles._visible = true;
play();
} else {
theSubtitles._visible = false;
play();
}
At 12/28/08 06:09 PM, Afro-Ninja wrote: Alternatively, just display your subtitles in a dynamic text box. Store each subtitle into an array, then display the next array index contents every time a new subtitle comes up. IF, subtitles are turned on of course.
Yeah, but if he's already done the subtitles that would take WAY too long to do,
and additionally it's a lot more code as oppose to just using the _visible property.
what
At 12/28/08 06:38 PM, K-Guare wrote: } else {
theSubtitles._visible = false;
play();
}
Add an extra right curly brace at the end there, oops. :]
what