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




Else If Problems



ok i dont quite understand this yet. i have 2 small buttons on the right, and 1 button out of screen to handle all my keypress functions. the 2 buttons on the right are used to bring out windows from the right when pressed. i have a on keypress <space> on the button out of screen that is used to advance the main timeline one frame (nextframe). frame 1 has no buttons showing and should be a starting point. space bar is pressed and frame 2 has all buttons showing and gives the user a choice on which to press. space is pressed again and frame 3 has all buttons hidden and all windows open. but this is where my problems come in. i want the user to be able to press a button on frame 2 and after that when the space bar is pressed, it should show which windows are still closed and then open them and move to frame 3. this is the actionscript for my hidden button which advances frame when space bar is pressed.

code:
on (keyPress "<Space>") {
if (_root.dtmove._currentframe == 1 || _root.weather._currentframe == 20) {
_root.dtmove.gotoAndPlay(2);
_root.nextFrame();
} else if (_root.weather._currentframe == 1 || _root.dtmove._currentframe == 20) {
_root.weather.gotoAndPlay(2);
_root.nextFrame();
} else {
_root.nextFrame();
/*_root.dtmove.gotoAndPlay(2);
_root.weather.gotoAndPlay(2);*/
}
}


keep in mind that im still learning and this could be a stupid question!

thanks for your time,
j-son

EDIT: Added as tags to make code more readable - jbum



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-12-2004, 09:01 PM


View Complete Forum Thread with Replies

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

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