Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,553 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,302 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



button that appears after a certain event...

 
Reply to this topicStart new topic

button that appears after a certain event...

cadeownz
post 16 Jul, 2008 - 07:34 PM
Post #1


New D.I.C Head

*
Joined: 12 Jul, 2008
Posts: 30

Hey guys,
what im doing is making an inventory system. So far its working and iv got 6 slots and when my character walks over an item it goes into a slot. thats all gud. but what i need now is that when the item goes into the slot i can click on the item once its in the slot but i cant click on it when its on the playng field. I dont know if this makes much sense but if it does and you know how to help heres the code..
ITEM SLOTS CODE:


CODE
currentslotnum = 1;
stop();
function addToSlot(item) {
if(!item.found) {
item._x = eval ("itemSlot" + currentslotnum)._x;
item._y = eval ("itemSlot" + currentslotnum)._y;
item.found=true;
currentslotnum++;
}
}

ITEMS CODE:


[code]onClipEvent(enterFrame) {
if(_root.char.hitTest(this)) {
_root.addToSlot(this);
}
} [code]

Thanks in advance biggrin.gif biggrin.gif
User is offlineProfile CardPM

Go to the top of the page


stayscrisp
post 16 Jul, 2008 - 09:05 PM
Post #2


D.I.C Head

**
Joined: 14 Feb, 2008
Posts: 199



Thanked 4 times
My Contributions



pah u didn't reply to the last advice given

your on your own bananaman.gif
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/7/08 10:47PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month