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 Viewsso i have a Movie clip.
Inside Movie clip i have two frames.
On first one is Movie clip textbox saying: "Uncompleted".
On the second one is textbox saying: "Completed".
The Movie clip with textbox "Uncompleted" is scripted:
onClipEvent(enterFrame){
if(sheise = 1){
this.gotoAndStop(2);
}
}
I also made a button on root which has:
on(release){
var sheise = 1;
}
So i wanted to make thingy:
Clicking on button sets varaiable sheise value of 1.
And if sheise is valued 1, textbox changes from "uncompleted" to "completed".
Could you guys help me with the script?
Also: Can i ust make commands to set some var true, or false, and then check it? Tell me how to do it, please.
List of my things to do
At 2/25/10 06:35 PM, Makakaov wrote: On first one is Movie clip textbox saying: "Uncompleted".
On the second one is textbox saying: "Completed".
The Movie clip with textbox "Uncompleted" is scripted:
onClipEvent(enterFrame){
if(sheise = 1){
this.gotoAndStop(2);
}
}
I also made a button on root which has:
on(release){
var sheise = 1;
}
So i wanted to make thingy:
Clicking on button sets varaiable sheise value of 1.
And if sheise is valued 1, textbox changes from "uncompleted" to "completed".
Could you guys help me with the script?
Also: Can i ust make commands to set some var true, or false, and then check it? Tell me how to do it, please.
Make sure that when comparing a variable in an 'if statement' to use "==" instead of "=".
It should work now.
onClipEvent(enterFrame){
if(sheise == 1){
this.gotoAndStop(2);
}
}
on(release){
var sheise = 1;
} :'(
At 2/25/10 06:47 PM, Treerung wrote:At 2/25/10 06:35 PM, Makakaov wrote: On first one is Movie clip textbox saying: "Uncompleted".Make sure that when comparing a variable in an 'if statement' to use "==" instead of "=".
On the second one is textbox saying: "Completed".
The Movie clip with textbox "Uncompleted" is scripted:
onClipEvent(enterFrame){
if(sheise = 1){
this.gotoAndStop(2);
}
}
I also made a button on root which has:
on(release){
var sheise = 1;
}
So i wanted to make thingy:
Clicking on button sets varaiable sheise value of 1.
And if sheise is valued 1, textbox changes from "uncompleted" to "completed".
Could you guys help me with the script?
Also: Can i ust make commands to set some var true, or false, and then check it? Tell me how to do it, please.
It should work now.
onClipEvent(enterFrame){
if(sheise == 1){
this.gotoAndStop(2);
}
}
on(release){
var sheise = 1;
}
It still doesn't work. I guess that's because this mc is in another mc, and sheise setter is on main timeline.
Also, is there a way to just set it true, or false, instead of playing with numbers?
At 2/25/10 07:05 PM, Makakaov wrote: It still doesn't work. I guess that's because this mc is in another mc, and sheise setter is on main timeline.
Then use "_root.sheise" (without the quotes). Always make sure you're referring to the correct scope of the variable.
Also, is there a way to just set it true, or false, instead of playing with numbers?
Of course there is! It's called a Boolean.
At 2/25/10 07:08 PM, 4urentertainment wrote:At 2/25/10 07:05 PM, Makakaov wrote: It still doesn't work. I guess that's because this mc is in another mc, and sheise setter is on main timeline.Then use "_root.sheise" (without the quotes). Always make sure you're referring to the correct scope of the variable.Also, is there a way to just set it true, or false, instead of playing with numbers?Of course there is! It's called a Boolean.
Even _root.sheise doesn't help. I don't get it. Also about that Boolean. I heard about it, but didn't pay much attention to it since i thought it will be too hard for me to learn.
Also i made another test to just make sure i'm doing something wtong, and still nothing helps.
Anyone mind to check up what's wrong in here, and fix it?
http://spamtheweb.com/ul/upload/260210/4 941_variabletest.fla
My code works fine its just needs to adjusted to work with your movieclips and variables.
Without posting a .fla noone will be able to help with such specifics such as the scope of the variable and movieclips.
:'(
At 2/25/10 07:22 PM, Makakaov wrote: Also about that Boolean. I heard about it, but didn't pay much attention to it since i thought it will be too hard for me to learn.
I lol'ed hard :D
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
At 2/25/10 07:23 PM, Treerung wrote: My code works fine its just needs to adjusted to work with your movieclips and variables.
Without posting a .fla noone will be able to help with such specifics such as the scope of the variable and movieclips.
Link to my original fsw from sheisetest, the one i had problems with:
http://spamtheweb.com/ul/upload/260210/5 398_originalsheisetest.fla
As the other person mentioned chances are your scope are all fucked up this is the completly correct code
Code on the main timeline
var sheise=0;
stop();
Code in the Uncomplete/Complete Movieclip
onClipEvent(enterFrame)
{
if(_root.sheise==1)
{
this.gotoAndStop(2)
}
else
{
this.gotoAndStop(1);
}
}
Code for button
on(release)
{
_root.sheise=1;
} :'(
At 2/25/10 07:35 PM, Treerung wrote: As the other person mentioned chances are your scope are all fucked up this is the completly correct code
Code on the main timeline
var sheise=0;
stop();
Code in the Uncomplete/Complete Movieclip
onClipEvent(enterFrame)
{
if(_root.sheise==1)
{
this.gotoAndStop(2)
}
else
{
this.gotoAndStop(1);
}
}
Code for button
on(release)
{
_root.sheise=1;
}
Copypasting everything wverywhere have to, and still doesn't work. Is it code for AS 3.0?
I work in 2.0
Meaby you guys will send me some sfw so i can see it really works. Meaby there's smething i don't do, and we didn't notice it.
At 2/25/10 07:22 PM, Makakaov wrote: Even _root.sheise doesn't help. I don't get it. Also about that Boolean. I heard about it, but didn't pay much attention to it since i thought it will be too hard for me to learn.
If using booleans is too hard for you, you might as well just abandon programming now...
var myBoolean:Boolean = false
Also i made another test to just make sure i'm doing something wtong, and still nothing helps.
Anyone mind to check up what's wrong in here, and fix it?
http://spamtheweb.com/ul/upload/260210/4 941_variabletest.fla
I haven't downloaded that, but I'm pretty sure your problem is some sort of scope issue.
If you take the time to learn the basics of the language, you would benefit greatly and wouldn't run into such rudimentary problems. And would save you a great deal of time in the future.