Best viewed in Firefox

Awesty Productions

Smiley with actionscript.

April 21st, 2007 by awesty

This took alot longer for me to do than I thought it would. Just open up flash, click the link below and paste all the code onto the frame. (You will need Flash 8 or MX 2004

LINK

If you test your movie (Ctrl+Enter) You should see a smiley face :D

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • del.icio.us
  • digg
  • Furl
  • MyShare
  • NewsVine
  • Netscape
  • Reddit
  • Simpy
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

RSS feed | Trackback URI

14 Comments »

Comment by omg Subscribed to comments via email
2007-04-22 08:05:00

omg! first comment!

 
Comment by awesty
2007-04-22 13:21:20

*sigh*

 
Comment by Calum Subscribed to comments via email
2007-04-22 22:17:59

Hi Awesty,

I was wondering if you could email me the codes on how to make it that if ur guy picks up like 7 items it takes him to a new frame??? could you please email me or tell me the codes or code. Thanks

Comment by awesty
2007-04-22 22:25:12

Well first I would have to see the code you are using to pick up the items, then I could help you.

 
 
Comment by Calum Subscribed to comments via email
2007-04-22 23:13:56

Thats the thing i dont know how to… all i have at the moment is a guy with actionscrip tha allows him to move up, down, left an right. Also ive drawn the items but they havnt got any code. Think you can help?

 
Comment by Calum Subscribed to comments via email
2007-04-22 23:53:03

hello? are you there awesty?

Comment by awesty
2007-04-23 17:28:01

Yea… I was actually asleep when you posted that, so give me more than 40 minutes to answer.

Try this tutorial for the items:
http://www.awestyproductions.c.....pe-game-2/

 
 
Comment by Pelaez Subscribed to comments via email
2007-04-23 07:47:40

I e-mailed you for some help, but i think you didnt get it or something, i don’t know what’s wrong with my code (it’s the code that goes in a brick and checks if the ball hits it):
onClipEvent (enterFrame) {
if (_root.ball_mc.hitTest(this._x, this._y-(this._height/2), true)) {
if (_root.bally0) {
_root.bally = -(_root.bally);
}
}
if (_root.ball_mc.hitTest(this._x-(this._width/2), this._y, true)) {
if (_root.ballx>0) {
_root.ballx = -(_root.ballx);
}
}
if (_root.ball_mc.hitTest(this._x+(_width/2), this._y, true)) {
if (_root.bally

Comment by awesty
2007-04-23 17:39:06

Well the second if statement doesn’t make much sense. _root.bally0 can’t end up being either true or false.

Also, _root.bally = -(_root.bally) should be _root.bally =-(_root.bally). And all that is saying is that bally should subtract itself from itself, which again doesnt really make any sense.

You should go back through your code and try and fix any things like that.

 
 
Comment by Calum Subscribed to comments via email
2007-04-24 01:06:21

Awesty it’s fine you don’t need to post code i foun outa way to o it myself. I made it that if u touch an item it goes to an inventory off-screen and every time u touch the item it deducts a var by 1.(the default points is 5) So if u collect 5 items, ive made it that if the var (points) is equal to zero then it goes to a new frame. :) That took me a
while to code :p

 
Comment by Pelaez Subscribed to comments via email
2007-04-25 12:01:59

The -(_root.bally) changes the variable’s sign, if it is 5 it will be -5, so the ball starts going the other way. The second “if” is to check if the ball is going up or down, so i don’t have problems with the ball hitting and going down and then hit again and go up. I think the error is in the hitTest, because i made it using a lot of MovieClips inside the brick MC, and it worked (It didn’t work good enough though, so i tried this one). Is there anything bad with the hitTest? I can go back to my old way, but i didn’t like it much…

Comment by awesty
2007-05-04 14:24:57

The hitTests look fine but half the code is missing. :\

 
 
Comment by Bryce K Subscribed to comments via email
2007-06-06 12:25:03

beef is a delicious snack

 
Comment by izzy Subscribed to comments via email
2007-11-22 10:36:53

is there a way to add another key frame through action script?

example I’m makin a drawing game where the person can just doodle and stuff but that seems stupid so i want to be able to click a button and create another key frame where they draw something different. then click a button to where it plays the first key frame so it’s like flash 8 in flash 8

here’s what i got:
http://showcase.sfdt.com/viewmovie.php?t=56682

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.