|
-
var clip = "jack";
_root.mc1.mc2[jack].gotoAndPlay(2);
when you say that, it means that MC jack is inside MC2 and MC2 is inside MC1 right?
but i dont get the var clip = "jack";
what does it mean on _root.mc1.mc2[jack].gotoAndPlay(2);
oh yeah, what if a random script keeps on running?
cause my random script is on the same frame...and my timeline runs there occasionally
so is there any chance that it could be the one causing the problem?
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
-
Senior Member
sorry, there was a typo in that
it should be,
Code:
var clip = "jack";
_root.mc1.mc2[clip].gotoAndPlay(2);
that stores a string with the name of the movie clip (jack) in a variable named clip. it then uses this variable to target the clip jack inside mc2 (which is itself inside mc1)
what is the code in the random script?
-
ohhh can you explain to me the use of the part where it uses []?
what does var mean? can i put _root. to it?
oh the random code? here, its placed on frame 10
code:
//random value between character's min attack and max attack
damagetotal = _root.maxattack-_root.minattack;
_root.damagevalue = Math.round(Math.random()*damagetotal+_root.minatta ck);
//random chance if attack misses or hits
damagerate = random(100);
if (damagerate>=_root.misschance) {
_root.attack = _root.damagevalue;
} else {
_root.attack = "Miss";
}
//a special attack that does times 3.5 the normal damage
_root.SPECIALattack = Math.round(_root.damagevalue*3.5);
_root.misschance = 0;
there...but i dont understand why that would cause errors..but i think it does
thx!
Last edited by Zirclesoft; 08-05-2005 at 05:12 AM.
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
-
oh if forgot the main values!! here they are
_root.misschance = 10;
_root.minattack = 100;
_root.maxattack = 200;
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
-
hey dudes
umm i recently tested my flash game again....
and i am convinced that there is something wrong with my random script
but i just dont know what!!!
can any1 help me? theres an example there already for a basis of my script
thx!
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
-
Senior Member
There is nothing in the code posted that could cause Flash player to need to abort the script.
-
so if its not in the script, then it has something to do with my variables and MCs...
thanks ill go check it out!
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|