-
Game style website; character left and right
Hi guys,
I really need some help with a code for a website I am developing - i thought i could avoid the issue but it has made it way too complicated and im sure someone will know the answer on here!
Basically, i have my stage and i have a long background image that only a small percentage is visable in the stage area at any one time. I have a character who i want to walk left and right and when the character gets infront of certain things on this background image i would like to hit enter or up and for a movie clip to play overlaying the background image, which will load the text for that link. Does anyone have anyidea the actionscripting i would need for this? The character barely needs to move - the background is what should scroll left and right when the keys are pressed....
I would REALLY appreciate any help at all.
Thankyou!
-
Qwaizang:syntax_entity_
this won't help much, but if you're scrolling a very large background or even too many segments at one time, you're going to wind up with a really super slow framerate during playback.
Break your background down into pieces and use an array of locations that represent where they are placed on the screen during a scroll. Only allow a piece of background to move when its array location can be seen on the screen.
This means if the piece's _x property is less than negative _width, the movieClip stops moving but the location in the array continues to decrease during the scroll function. The same with _x greater than the width of the stage.
See? That way only a few move and there's no slowdown.
+Q__
-
Avoiding the real world.
mabye look at tonypa's tutorials, they might be more comlicated than what you want to do but they could help.
http://www.tonypa.pri.ee/
Knowledge is power, power corrupts, study hard, be evil.
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
|