Programming: Flash CS5 Question

Recommended Videos

cartographer54

New member
Aug 23, 2009
148
0
0
I started learning flash through Kongregate's shootorials (http;//kongregate.com/), and I encountered a problem when I tried to make an animation with Pixen (http://opensword.org/Pixen/) because I had no clue how to make one in flash. As a side project, I tried to make the ship boost, i with an accompanying flaming exhaust animation. I made a two image animation of fire, and I saved it as a gif and imported into the stage, changed the properties so that its class and identifier were the same (center registration). I made a class for it, and I put in some code in my ship's class so that whenever I press shift it makes my ship go faster, sets a boolean variable named boost to true, and when i let go, it puts the speed back to normal, and sets boost to false. I have an if statement, that activates a function named boost if my boolean is true, which plays the animation. I set the animation to appear in the center, because I was going to worry about offsetting it to the side of the ship later.

So my problem: Whenever I try to even test it (I'm not pressing shift); it flashes my background and ship (resetting the position of my ship to the center each time) alternately with one of my images from my animation in the top left, the other is in the center of the screen, covering up my ship.

How can I fix this? I can send you some screenshots and the gif file if you post your email.
 

Sleekgiant

Redlin5 made my title :c
Jan 21, 2010
12,948
0
0
I'm so confused after reading your post, I never had trouble animating in GIMP
 

cartographer54

New member
Aug 23, 2009
148
0
0
I already have the animation down, but i have problems because it spazzes every time i try to implement it. I'm not sure if the code is wrong or not.
 

DazZ.

Elite Member
Jun 4, 2009
5,542
0
41
Feck loads of things that could be wrong there, and your description isn't really enough.
How big is the .fla? I'd take a look at it but you'd need to save it as cs4.

Also exactly what do you add before it fecks up? Is it the .gif? If it's just a 2 image animation why can't you not import a gif and make it in Flash.
 

cartographer54

New member
Aug 23, 2009
148
0
0
DazZ. said:
Feck loads of things that could be wrong there, and your description isn't really enough.
How big is the .fla? I'd take a look at it but you'd need to save it as cs4.

Also exactly what do you add before it fecks up? Is it the .gif? If it's just a 2 image animation why can't you not import a gif and make it in Flash.
I added all the code associated with the boost, and it got screwed up.
BTW: I actually tried to fix it by deleting everything related to boost, and now my program is more fucked up. It just flashes at random times. I can post all of the code on a google doc, if that would help?
 

cartographer54

New member
Aug 23, 2009
148
0
0
I fixed it, there was a problem with my timeline, proly cuz of my faulty animation. And how would i make an animation in flash? personally i prefer pixen for animation, cuz its really simple compared to flash. And i can edit it on the fly real quick.
 

DazZ.

Elite Member
Jun 4, 2009
5,542
0
41
cartographer54 said:
DazZ. said:
Feck loads of things that could be wrong there, and your description isn't really enough.
How big is the .fla? I'd take a look at it but you'd need to save it as cs4.

Also exactly what do you add before it fecks up? Is it the .gif? If it's just a 2 image animation why can't you not import a gif and make it in Flash.
I added all the code associated with the boost, and it got screwed up.
BTW: I actually tried to fix it by deleting everything related to boost, and now my program is more fucked up. It just flashes at random times. I can post all of the code on a google doc, if that would help?
It will help whoever tries to help, likely not me though as it's 2 in the morning and I plan on sleeping.

It's not something to do with the timeline though? With some of your clips having more frames than you want so they flash or something simple like not having a stop(); somewhere that needs it?

Edit: FUCK! Wish I got this in a minute before, sounded timeline based. :p
 

Brotherofwill

New member
Jan 25, 2009
2,566
0
0
cartographer54 said:
I fixed it, there was a problem with my timeline, proly cuz of my faulty animation. And how would i make an animation in flash? personally i prefer pixen for animation, cuz its really simple compared to flash. And i can edit it on the fly real quick.
I'm starting to learn animating and programming in flash. It seems pretty simple, although I'm only at the start of it. You use the timeline for each frame and then you trigger the animation. I think flash plays the whole animation on a loop indefinetely so you need a stop() command or something in there. I can't really help you too much right now. Anyway just look at tutorials on programming and animating in flash, it should explain it to you.

Personally I got a book called something like Foudation Game Design with Flash and I'm starting to plow through it. Works kinda well, also good to have code readily available in book form since programming is mostly copying and then understanding anyway.
 

cartographer54

New member
Aug 23, 2009
148
0
0
Brotherofwill said:
How much did that book cost? I was also looking at the 'missing manual' series, but it seems kind of a steep price at $40, when I'm already paying $600 and some for Flash.

I'll probably end up trying a test for it, so I don't mess up my program again. I just had some problems when I tried to import that gif, I had some weird images from my animation called bitmaps (I have no clue where they came from)
 

cartographer54

New member
Aug 23, 2009
148
0
0
Do you know how buttons work? I see the option under modify-convert to symbol, but how do you control what happens when you click it? Ugh i guess thats what the books for.