PDA

View Full Version : [AS1] simple change to game


sandman9
01-22-2004, 01:03 PM
Here's the game http://www.sandmanmedia.com/question5b.swf

right now you see a picture and a word below it. I want one to show just the picture and the corresponding matching object to show just the text.

The .fla file is a mess. Flash 5 script, etc. I've searched through it and don't see any loadMovie or attachMovie anywhere. Can someone please give me a hint or guidance?

Here's the fla
http://www.sandmanmedia.com/question5b.fla.zip

Sandman9

sandman9
01-22-2004, 02:01 PM
the array matches the numbers (which unfortunatly places the same pic twice). I need two different pics so If i change the array to [1,5,2,6,3,7,4,8] then it display's the two different pics but won't match them b/c the numbers don't match ..... how do I get around this ?


function ShuffleCards () {
cardArray = new Array();
var startArray = [1, 1, 2, 2, 3, 3, 4, 4];
var placeArray = new Array();
for (a=0; a<startArray.length; a++) {
placeArray.push(a);
}
for (a=0; a<startArray.length; a++) {
do {
trg = random(placeArray.length);
newplace = placeArray[trg];
} while (startArray[a] == startArray[newplace] && a != startArray.length-1);
placeArray.splice(trg, 1);
if (startArray[a] != startArray[newplace]) {
cardArray.push(startArray[newplace]);
} else {
cardArray.unshift(startArray[newplace]);
}
}
}
function CheckNull (checkstring) {
if (checkstring.length<1) {
return (true);
}
if (checkstring == "") {
return (true);
}
if (checkstring == null) {
return (true);
}
return (false);
}
stop ();

sandman9
01-22-2004, 05:05 PM
I'm coming to the conclusion that it cannot be applied to this file considering the way this code is set up