|
-
XRave
ActionScripting HELP!!
Ok so if I have a MC called guy and a MC called shop, I can use Keyboard to navigate guy and this is what I am trying to do #
If guy is hit-testing shop, I want a dynamic Txtbox to say: - Press Space to Acess Shop - Better get your wallet first! -
And If I press SPACE while guy is hit-testing shop, I want to gotoAndStop to another location.
This is the AS i dreamed up:
Code:
onClipEvent (load) {
if (this.hitTest(_root.guy)) {
description = "Shop Keeper, Its best if you have some money on you though";
if (Key.isDown(Key.SPACE)) {
_parent.gotoAndStop("eleswhere",1);
}
}
}
So could anyone tell me what's wrong and how do i fix it?
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
XRave
er.. not meaning to pester..
Er can anyone just reply at least an Idea?
I am really stuck, and I don't get it.
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Howdy, your pretty close to what you want to get. Instead of using onClipEvent (load) try (enterFrame). Also is description your text box or is that just a variable?
-
XRave
its a text to put INTO the the text box.. i think it makes perfect sense.
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Oh, okay. Where exactly do you have it stated at first? Like is it just used inside shop, like in your code above, or is it on the maintime line?
-
XRave
its used on shop movieclip and the AS is FOR the movieclip, so its set on the movieclip, I find it hard to explain but it is under " actions for shop ".
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
I gotcha, when refering to it in a MC use either _root. or _parent for your textbox.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|