Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Keypressing



is there a way to have to different movies at the same time, each one ondependent from the other... So that when a key is pressed each movie plays a different frame????
need help with this...



FlashKit > Flash Help > Flash Newbies
Posted on: 01-15-2002, 04:31 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help On KeyPressing
is there a way to have to different movies at the same time, each one ondependent from the other... So that when a key is pressed each movie plays a different frame????
need help with this...

KeyPressing Not Working Right
Hi All - I could really use your help here.

I've tried using keyListeners and am getting extremely buggy results so I decided to put my keyPress commands directly on a button. I know, I know, not best practice - but I'm at the end of my rope here and I just need it to work, now.

Here's my scenario:

I'm working on a presentation where there is a Main.swf and a Retailer.swf. The Main.swf loads in the Retailer.swf which in turn loads in it's own other .swf files when it needs to.

In my Retailer.swf I have a hidden button that has the following code:


Code:
on (release) {
trace("pressed");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Space>"){
trace("SPACE");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Enter>"){
trace("ENTER");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Right>"){
trace("RIGHT");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<PageDown>"){
trace("PAGE DOWN");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Down>"){
trace("DOWN");
this.gotoAndPlay("logoIn");
}
As you can see they are all doing the same thing. Tracing for identification and telling the current movie to go somewhere.

The problem is that when I run Retailer.swf on it's on the Button Press and keyPress commands work perfectly. However, when I run the Main.swf and it loads in Retailer.swf the keyPress commands are ignored. The button Press works properly but not the keyPresses.

It's not a pathing problem because if the button Press is working then there seems to be no reason why this crap isn't working for me.

PLEASE ADVISE!!! I'm pulling out my hair!

-mikey

KeyPressing Not Working
Hi All - I could really use your help here.

I've tried using keyListeners and am getting extremely buggy results so I decided to put my keyPress commands directly on a button. I know, I know, not best practice - but I'm at the end of my rope here and I just need it to work, now.

Here's my scenario:

I'm working on a presentation where there is a Main.swf and a Retailer.swf. The Main.swf loads in the Retailer.swf which in turn loads in it's own other .swf files when it needs to.

In my Retailer.swf I have a hidden button that has the following code:


Code:
on (release) {
trace("pressed");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Space>"){
trace("SPACE");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Enter>"){
trace("ENTER");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Right>"){
trace("RIGHT");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<PageDown>"){
trace("PAGE DOWN");
this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Down>"){
trace("DOWN");
this.gotoAndPlay("logoIn");
}
As you can see they are all doing the same thing. Tracing for identification and telling the current movie to go somewhere.

The problem is that when I run Retailer.swf on it's on the Button Press and keyPress commands work perfectly. However, when I run the Main.swf and it loads in Retailer.swf the keyPress commands are ignored. The button Press works properly but not the keyPresses.

It's not a pathing problem because if the button Press is working then there seems to be no reason why this crap isn't working for me.

PLEASE ADVISE!!! I'm pulling out my hair!

-mikey

Copyright © 2005-08 www.BigResource.com, All rights reserved