I’m experiencing a problem with my inventory system. I have a inventory that will hide/show itself whenever the mouse is over it. And inside “inventory”, I have a couple of slots that should trace “Pres” whenever I click on them. Problem is, it doesn’t. I think it has something to do with my inventory hide/show code because when I took it out, everything worked. Heres the code for the inventory:
//This is so that it stays in one spot when the movie loads.
onClipEvent (load) {
yMove = _y;
easeSpeed = 5;
}
onClipEvent (enterFrame) {
_y += (yMove-_y)/easeSpeed;
}
on (rollOver) {
_root.inventory.yMove = 96.8
}
on(rollOut) {
this.yMove = -42
}
i guess you are writing code inside the MC. Congrat, you will have to make 200% extra time editing the code. And you will have about 400% more syntaxes.
onClipEvent = Movieclips only
on = buttons only
But, this could be made in root:
clip.onEnterFrame ()
clip.onPress
clip.rollOver
clip.rollOut
Yes, I put the trace code on the “slot” mc thats inside the inventory MC. But I did that b4 in another project and it worked…both my inventory and slot are all MCs. What should I do?
yes, I tried that already didn’t work either. Although I tried doing onMouseDown + if(mouse hittests target) which is basically the same thing as onPress and THAT worked. Should I keep using that or find a way to make the onPress work?
I had the same problem.
What I did was giving up on the target.onRollOver = function, and replaced it with a listener inside (yep Macsy, inside ) the menu_mc (the mc that supposed to show/hide itself) that checked if the mouse was in the area of my menu, and placed the action for the buttons on frame 1 of my script.