The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:40 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 3 posts ] 
[Question] Merging Events 
Author Message

Joined: Sat May 09, 2009 3:41 pm
Posts: 31
Is there a possible way to make a sprite so it could be like...

If A & B are pressed at the same time do ____________
Or if collision with ___ & ___ do _____

_________________
Image Pure Awesomeness


Tue May 19, 2009 4:07 pm
User avatar

Joined: Mon Aug 11, 2008 1:09 pm
Posts: 166
Location: England lol
Gender: Male
Currently Playing: Minecraft
Code:
if((Key.isDown(65) && Key.isDown(66)) || (_root.mcA.hitTest(_root.mcB))) {
  //Code goes here
}


This will execute if buttons A and B are pressed at the same time OR if the movieclip 'mcA' touches 'mcB'.

Code:
if((Key.isDown(65) && Key.isDown(66)) {
  //Code goes here
}else if(_root.mcA.hitTest(_root.mcB))) {
  //Code goes here
}


This will execute one chunk of code if buttons A and B are pressed at the same time OR a different chunk of code if the movieclip 'mcA' touches 'mcB'.


Hope these might help.


Thu May 21, 2009 9:34 am
WWW

Joined: Sat May 09, 2009 3:41 pm
Posts: 31
o.o I didn't know where to add that but I found out :lock:

_________________
Image Pure Awesomeness


Sun May 31, 2009 5:52 pm
Display posts from previous:  Sort by  
 [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.