Smoke graphics

Hey Guys!
So I’ve been trying to do some VERY simple smoke Graphics and I’m not sure what’s wrong! it’s just a circle with alpha off and transitioning to on… in a loop! I’m, not sure why it isn’t working so here’s the code for it

[code]function smoke:enterFrame(event)
smokea=1
if (smokea= 1) then
smokea=0
end
if (smokea < .9) then
smokea= smokea+ .01
end

smoke.alpha= smokea

end

Thanks!
~Caleb [import]uid: 95032 topic_id: 16240 reply_id: 316240[/import]

Line 3 should be
[lua]if (smokea == 1) then
smokea=0;
end[/lua]

== is the relational operator in lua. [import]uid: 64174 topic_id: 16240 reply_id: 60459[/import]

It worked! Thanks so much! [import]uid: 95032 topic_id: 16240 reply_id: 60462[/import]

One thing… It’s not resetting to 0.

[code]
function smoke:enterFrame(event)
–smokea=1
if (smokea== .8) then
smokea=0;
end
if (smokea < .9) then
smokea= smokea+ .03
end

smoke.alpha= smokea–.5
debugtext.text= "SMOKE ALPHA "…smokea

end [import]uid: 95032 topic_id: 16240 reply_id: 60463[/import]

0.3+0.3+0.3 = 0.9 [import]uid: 81188 topic_id: 16240 reply_id: 60464[/import]

Thanks, that helped alot…! [import]uid: 95032 topic_id: 16240 reply_id: 60465[/import]