PDA

View Full Version : flash game, complex questions :(


rabsterb
06-16-2001, 08:23 AM
hi there,
i'm really right in the middle of making it so, it's unfinished, but a lot of the ain features are there:
http://www.flash-i.com/hidden/sxtray.html

ok, here i go

1. if you notice, there are some trees near to where you start off which 'grow' when it detects a hittarget from the sheep. now the problem is - when you go near the tree again, it goes back small and then tweens up to being big again... is there any way so that once it's big.. it stays big

2. ok, this is my main problem that i really have no idea about.. .

as you'll see if you play the game when the light blue bg ends, the sheep can continue to travel into the black, how can i stop this...

the ultimate main problem >> part b) ... i want the bg to be longer than the stage so it's a quite a long level for the game... how do i achieve this? ... any help with the actual actionscripting would be great along with where to place it in the movie... (ps. i don't want it to repeat the background or anything... i want one massive playable level

------
if anyone can provide me with any significant help, i'll put you in the credits... my last game is listed at ultrashock.com ... it's the least i could do :)

many thanks,
jeev

Jesse
06-16-2001, 11:00 AM
can't help with question 1 without knowing how the trees work. I assume it works like this: when the sheep hits the trees they grow. So if you don't want them to grow again you can use a basic conditional:

treesNotHit = true; // this code goes in Frame 1 of your movie

then you can have you conditional like this:

if (treesNotHit) {
if (your hittest code) {
// grow code
treesNotHit = false;
}
}

That way, the grow code will only be executed once.

The other problem could be overcome in much the same way. You could effectively dissable your right button when the sheep reaches the right hand side of the screen for instance, again using an IF.

Mortimer Jazz
06-17-2001, 10:05 AM
As for the continual scrolling.....
Have you seen the fla for the 'Barney's' style menu?
The menu items are placed vertically on the screen but when you run the fla it joins them up so they scroll vertically as one long menu item.

I don't claim to know enough about Flash to be able to build a game yet but it may be possible to use a similar technique to fool the eye and achieve the effect you want.
...maybe...
I can post you the fla if you want.