

i was filming him and another guy skateboard down a slide and look what happened. bookmark this web site to see the full video in a few days...

never skateboarded much before...
i think thats why he didnt do so well
( ,
Sun 12 Oct 2003, 11:59,
archived)
i think thats why he didnt do so well

I am doing a flash anim type thingy and need to create a random effect, so that when a button is clicked, the playhead moves to say frame 85 and then plays the movie clip that I have positioned there.
My first clip is at position 40 and this is ALWAYS being played. I found the math random code on the web and have applied it how they specified, but I can't get it to work.
Anyone see an obvious error I've made ?
x = Math.round(Math.random()*15);
if (x = 0) {
gotoandplay(85);
}
if (x = 1) {
gotoandplay(40);
}
else {
gotoandplay(85);
}
( ,
Sun 12 Oct 2003, 11:52,
archived)
My first clip is at position 40 and this is ALWAYS being played. I found the math random code on the web and have applied it how they specified, but I can't get it to work.
Anyone see an obvious error I've made ?
x = Math.round(Math.random()*15);
if (x = 0) {
gotoandplay(85);
}
if (x = 1) {
gotoandplay(40);
}
else {
gotoandplay(85);
}

but most C-style languages use == to test for equivalence, and = to assign values.
Edit: Actually, that makes sense.
if (x = 0) is always false, as it's the equivalent of if(0)
if (x = 1) is the equivalent of if(1), so it's always true.
( ,
Sun 12 Oct 2003, 11:54,
archived)
Edit: Actually, that makes sense.
if (x = 0) is always false, as it's the equivalent of if(0)
if (x = 1) is the equivalent of if(1), so it's always true.

can`t remember if Flash does it that way, so could well be (and probably are) right
( ,
Sun 12 Oct 2003, 11:56,
archived)

but have you declared "x" before using it? I`ve a funny feeling Flash needs variables to be declared - check the debugger window thingie and see if there`s any output
( ,
Sun 12 Oct 2003, 11:55,
archived)

plus your if (x==0) is redundant because of the else statement
( ,
Sun 12 Oct 2003, 11:56,
archived)

that's the point with your script
but if you want x to have 0 or 1 as a value, just write it like that :
x = Math.random(2);
if (x == 0) {
gotoandplay(85);
else {
gotoandplay(40);
}
( ,
Sun 12 Oct 2003, 11:59,
archived)
but if you want x to have 0 or 1 as a value, just write it like that :
x = Math.random(2);
if (x == 0) {
gotoandplay(85);
else {
gotoandplay(40);
}

thanks all, I shall try the == thingy now.
Much appreciated.
( ,
Sun 12 Oct 2003, 12:02,
archived)
Much appreciated.

var SceneNumber
SceneNumber = Math.round(Math.random()*(1-4))+4;
if (SceneNumber==1)
{gotoAndPlay("pic1",1);
}
if (SceneNumber==2)
{gotoAndPlay("pic2",1);}
if (SceneNumber==3)
{gotoAndPlay("pic3",1);}
if (SceneNumber==4)
{gotoAndPlay("pic4",1);}
if (SceneNumber>4)
{gotoAndPlay(2);}
if (SceneNumber<1)
{gotoAndPlay(2);}
( ,
Sun 12 Oct 2003, 12:02,
archived)
SceneNumber = Math.round(Math.random()*(1-4))+4;
if (SceneNumber==1)
{gotoAndPlay("pic1",1);
}
if (SceneNumber==2)
{gotoAndPlay("pic2",1);}
if (SceneNumber==3)
{gotoAndPlay("pic3",1);}
if (SceneNumber==4)
{gotoAndPlay("pic4",1);}
if (SceneNumber>4)
{gotoAndPlay(2);}
if (SceneNumber<1)
{gotoAndPlay(2);}

SceneNumber = Math.random(4)+1;
gotoAndPlay("pic" add SceneNumber);
( ,
Sun 12 Oct 2003, 12:06,
archived)
gotoAndPlay("pic" add SceneNumber);

Nevermind, looked at the filename
woo to sumo arnie.
( ,
Sun 12 Oct 2003, 11:43,
archived)
woo to sumo arnie.

what are the chances of 2 people posting simultaneous jap-inspired images?
( ,
Sun 12 Oct 2003, 11:44,
archived)

How many people are watching Japan vs Scotland in the Rugby really..
( ,
Sun 12 Oct 2003, 11:46,
archived)

And a HOLY FUCKING SHIT for good measure.
( ,
Tue 14 Oct 2003, 16:16,
archived)

he might come and scare you one night........wooooaaaaaaaaa
( ,
Sun 12 Oct 2003, 11:41,
archived)

is he related to Ant out of Ant and Dec?

you did a lot better with the colouring in :-)
( ,
Sun 12 Oct 2003, 11:42,
archived)

you did a lot better with the colouring in :-)

do a quick google image search for "mekon" - character from Dan Dare comic
( ,
Sun 12 Oct 2003, 11:46,
archived)

It's a song.
What's going on Mekon...
:p
( ,
Sun 12 Oct 2003, 11:51,
archived)
What's going on Mekon...
:p

didn`t reach the top 10 in the hit parade, I wouldn`t know it! :-p
( ,
Sun 12 Oct 2003, 11:53,
archived)

i'm reminded of it.
( ,
Sun 12 Oct 2003, 11:54,
archived)

And prone to giving clues.
I can splell just fine thankee.
( ,
Sun 12 Oct 2003, 11:50,
archived)
I can splell just fine thankee.

about Sol - it used to be about Emile :-)
still - what about "Teflon Boots" Beckham yesterday? *sigh*
( ,
Sun 12 Oct 2003, 11:37,
archived)
still - what about "Teflon Boots" Beckham yesterday? *sigh*

it will come in handy for Halloween......pfffff
( ,
Sun 12 Oct 2003, 11:42,
archived)

"c'mon, it's so cheap that it's legal to steal from lidl"
( ,
Sun 12 Oct 2003, 11:32,
archived)

very proud to announce that their sausage rolls contain a minimum of 14% meat
(thank god I`m a veggie)
( ,
Sun 12 Oct 2003, 11:36,
archived)
(thank god I`m a veggie)

Woo :D
You've made me think of Bo Selecta "Trisha" now lol
"But whaddaboudababy? Who's tha father? Think abboudababy"
( ,
Sun 12 Oct 2003, 11:33,
archived)
You've made me think of Bo Selecta "Trisha" now lol
"But whaddaboudababy? Who's tha father? Think abboudababy"

class!
just getting over flu and you`ve started me coughing again!
( ,
Sun 12 Oct 2003, 11:37,
archived)
just getting over flu and you`ve started me coughing again!

of your generic product.
/nerdy scientist
( ,
Sun 12 Oct 2003, 11:30,
archived)
/nerdy scientist

than i of your generic product
/A level maths mode
( ,
Sun 12 Oct 2003, 11:42,
archived)
/A level maths mode

But then Marks and spences would probably put an offer on it, square it up and then take one of the item away from you at the checkout
( ,
Sun 12 Oct 2003, 11:48,
archived)

excellent - it does everything ever, for a reasonable price!
( ,
Sun 12 Oct 2003, 11:32,
archived)

that the congo is a war-ravished country*. whoops.
( ,
Sun 12 Oct 2003, 11:31,
archived)

so i'm guessing you've crossed them?
Looks like a headswap.
Edit: Better looking? Arf!
( ,
Sun 12 Oct 2003, 11:25,
archived)
Looks like a headswap.
Edit: Better looking? Arf!
![Challenge Entry: Budget Cuts [challenge entry]](/images/board_posticon_c.gif)
Microsoft made cutbacks, and paid chimps from the zoo penuts, they used code from MS's archives and came up with this!

Click for fullsize
(This is a redo of what I did last night!)
( ,
Sun 12 Oct 2003, 11:15,
archived)

Click for fullsize
(This is a redo of what I did last night!)

Morning all.
Coincidently the tramps in Exetere do drink lambrini, since it had that offer on
*FACT*
( ,
Sun 12 Oct 2003, 11:19,
archived)
Coincidently the tramps in Exetere do drink lambrini, since it had that offer on
*FACT*
![Challenge Entry: Budget Cuts [challenge entry]](/images/board_posticon_c.gif)
I made this a while ago and then didn't post it, I thought it would be apporpriate for this challenge
big

so they have to use paint and stick figures to...
oh wait i forgot to say it was a movie
( ,
Sun 12 Oct 2003, 11:05,
archived)
oh wait i forgot to say it was a movie
![Challenge Entry: Budget Cuts [challenge entry]](/images/board_posticon_c.gif)
they couldn't afford it to pay it

Where they rightfully belong
( ,
Sun 12 Oct 2003, 10:56,
archived)

Where they rightfully belong

ooh, edit both these and change the "This is" to the budget cut competition!
( ,
Sun 12 Oct 2003, 10:57,
archived)

This person was smart and used the Preview function. And for their toil - they have it change the drop down back to "normal post".
Unless they didn't preview. And they just forgot. Just ignore everything up there.
( ,
Sun 12 Oct 2003, 10:59,
archived)
Unless they didn't preview. And they just forgot. Just ignore everything up there.

learning.
Next week they're going to let me use the sharp scissors to cut and paste
( ,
Sun 12 Oct 2003, 11:06,
archived)
Next week they're going to let me use the sharp scissors to cut and paste
![Challenge Entry: Budget Cuts [challenge entry]](/images/board_posticon_c.gif)

RadioTubbies
Probably been done,but I'm a newbie here so :OP

OH WAIT IT'S JUST THAT REALLY CRAPPY SCENE IN MATRIX RELOADED
( ,
Sun 12 Oct 2003, 10:43,
archived)

it was my lame attempt at bashing that over-long dancing scene in reloaded
( ,
Sun 12 Oct 2003, 10:46,
archived)

Placed next to the machine-like fighting.
( ,
Sun 12 Oct 2003, 10:55,
archived)

so make it three hours
(seen equilibrium? much better film!)
( ,
Sun 12 Oct 2003, 11:03,
archived)
(seen equilibrium? much better film!)

goooooooood morning
www.fucksocks.co.uk/?pid=forum i made the little message-board-thing on fucksocks a million times better yesterday, i always wanted it to be indented like b3ta, rather than just flat, yay!
( ,
Sun 12 Oct 2003, 10:47,
archived)
www.fucksocks.co.uk/?pid=forum i made the little message-board-thing on fucksocks a million times better yesterday, i always wanted it to be indented like b3ta, rather than just flat, yay!

but that always happens when i do something radical to something i made a year ago
( ,
Sun 12 Oct 2003, 10:50,
archived)

Exterminate them all! they crap in other peoples gardens
( ,
Sun 12 Oct 2003, 10:50,
archived)
« Older messages | Newer messages »
