Unregistered Avatar

Reply

Why won't inventory work inside a mc?


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 08-03-2006, 09:50 AM

Question Why won't inventory work inside a mc?

Hi, I made an inventory and it works, the problem is that I need it to be inside a movieclip (menu) but it won't work. Here's how I made it:

I made movieclips that are squares with no fill and gave the instance "itemSlot" + number (I made 16). Then I added this code to the main actions frame:

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++;
 }
}
And items are movieclips smaller than the slots with instance "item" + number with this code:

Code:
onClipEvent (enterFrame) {
 if (_root.player.hitTest (this)) {
 _root.addToslot (this);
 }
}
("player" is the user)

It works, I've tested it, but only when it is out of the movieclip. Can anyone tell me how to make this work inside the movieclip?

Thanks in advance
RDG

RDG is offline registered.

Join Date: Jul 2006

Posts: 6

  #2 (permalink)  

Old 08-04-2006, 05:18 AM

Re: Why won't inventory work inside a mc?

_root.(mc things are in).(things)

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

I think.
__________________

Last edited by AtomicHype; 08-04-2006 at 05:21 AM.
AtomicHype

AtomicHype is online now Ping Island

AtomicHype's Avatar

Join Date: Apr 2005

Posts: 2,509

Send a message via AIM to AtomicHype
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transformers: A History Conan The VOID! 19 06-03-2007 11:59 PM
my first work! agne Digital Art Showcase 11 07-12-2006 08:28 PM
El Diablo de Lag! The Anti-Bob The VOID! 5 05-01-2006 09:42 PM
Some of my really old work. Sword Tip Signature Showcase 2 06-15-2004 09:21 PM


All times are GMT -7. The time now is 10:51 PM.