Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-07-2011 11:08 AM
I've got a nice simple actionscript game going, and I'd like to polish it up before I submit it to the app world. Thing is, I'm not sure how to do various animations and effects. For now, these are the most important ones to me. As always, thanks so much for your help.
I'm still not sure how to make different "screens" (I'm an actionscript noob, so I'm picking it up as I go along). Suppose I have a title screen. How could I make it transition nicely into the game (fading, 3D flipping, making the components fly away, etc)?
A banner runs across the screen, then some text ("Round X") runs across the banner, pauses in the middle then runs off to the side, after which the banner dissipates. Some combination of timers and transformations? Can you use tweens in Flex Builder like that?
There are some balls moving around in the game. I'd like it if I could give them an afterimage effect as they bounce around. Think something like the light trails from the bikes in tron, except not permanent. It must be able to follow the ball at any angle, including bounces. How could I make the edges of the trail "glowy" and have the tip fade out? Sorry for the ASCII art, I can photoshop an example later if it isn't clear. The "O" is the ball, the lines are glowing edges, and the space in between is a low alpha color.
How can I distort parts of an image and have it return to normal? If you've ever played Geometry Wars, you may have noticed that the background ripples for large explosions. I'd like to produce something similar.
Rolling Score Counter
I'd like to make the numbers in the score counter roll, sort of like an odometer. Not necessarily a 3D wheel, but more like the new number fades in and translates from above while the current number does the opposite. Is there any kind of neat way to do this with text, do should I just go ahead and make it using bitmaps?
03-07-2011 11:44 AM
Hi there, GoldenJoe. You will be able to do many of the effects that you are looking for with Tweener. You should look for Tweener tutorials and play around with some tests to get the look and effect you are going for.
Here is a video on youtube that might help you out a little:
That video is about a year old, but should still be usefull to you.
Good luck with your development.
03-07-2011 01:46 PM
For any screens I was switching to and from I used Tweener as well. Mind you I'm not loading a game, however it worked well move containers, lists, etc around the screen and I would think if you had both your title screen and game as two separate childs you could simply tween from one to the other.
For the title of each round (IE round 1) you can easily add an eventListener for when the game starts that adds the child off screen, tweens it to the middle, adds an eventListener for EventComplete, then tweens it off stage after a delay. (from there I would add a third eventListener to removeChild as well).
Hope this helps a bit!
03-07-2011 02:27 PM
Thanks for the suggestions, guys. I'll check that Tweener class out shortly. How about the afterimage and grid distortion? Those ones seem a bit more difficult to tackle...not sure where to start.
03-07-2011 02:35 PM
I have to admit that even the idea of making a game is way beyond my knowledge of Actionscript (and coding in general) so I can't really help there.
As for your grid distortion question, not sure if this helps, but it might:
(assuming that is what you're trying to achieve).
03-07-2011 04:45 PM
Good find on the grid. I think I can modify that into looking pretty close to the effect I have in mind. This is a very simple game, so details like that don't have to be perfect. Now I just need to figure out the glow trail.
As for game development, I'm new to Actionscript too, but I've done games before. It's not that dissimilar from developing games in J2ME...nicer in alot of ways, actually. I wouldn't mind writing a simple game tutorial for the PlayBook or BlackBerry in general, but first I need to see what the final SDK is like since that is likely to become the "real" way to make games for this thing.
03-07-2011 06:44 PM
Keep in mind that AS3 itself has been around for a long time, and been used for plenty of games, so chances are somebody's already done whatever you want to do.
In this case for the glow effect you have two options. You can use built-in glow filters (e.g. something like this -it's AS2 but there's an AS3 version in the comments) or you can just make an image yourself externally (e.g. photoshop) and then constantly create new images and have them follow your object and slowly lose opacity and when they hit 0 opacity kill them.
e.g. very roughly, have this going in an EnterFrame event:
var glowTrailomeImage = new SomeImage();
glowTrail.x = objectYouWantToFollow.x;
glowTrail.y = objectYouWantToFollow.y;
and then for the SomeImage EnterFrame:
this.opacity -= 5;
if(this.opacity <= 0)
Or something to that effect. Play around with it. Probably better to do it the second way as filters (espically moving) are very expensive.