Welcome to Dream.In.Code
Getting Help is Easy!

Join 131,567 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,171 people online right now. Registration is fast and FREE... Join Now!




Label Navigation with a var

 
Reply to this topicStart new topic

Label Navigation with a var, buttons on a frame to jump around. Then the mySlide var doesn't g

jskog
post 3 Oct, 2008 - 02:25 PM
Post #1


New D.I.C Head

*
Joined: 26 Sep, 2008
Posts: 4

This is the code.. I label anchor frames as s1 - s30...
Update mySlide on keypress. and on Next / Previous button

when i use a combo box or a in frame button.. I don't get mySlide updated.

How do is use a button in a frame
How do I update Myslide after using a combo box to change frames?

Appreciate your time.

Jackson
jskog
______

CODE
mySlide = 1;
maxSlide = 70;
trace (mySlide);
box1.changeHandler = function(){
    gotoAndPlay (this.value);
    trace (mySlide);
    }
// I have the paramaters set here and the nav works good.

box2.changeHandler = function(){
    gotoAndPlay (this.value);
//        trace(mySlide);  -  It always traces >> 1
        }
// list.addEventHandler
box3.changeHandler = function(){
    gotoAndPlay (this.value);
        trace(mySlide);
        }
box4.changeHandler = function(){
    gotoAndPlay (this.value);
    }
box5.changeHandler = function(){
    gotoAndPlay (this.value);
    }
box6.changeHandler = function(){
    gotoAndPlay (this.value);
    }
box7.changeHandler = function(){
    gotoAndPlay (this.value);
//        trace(mySlide);
        }
box8.changeHandler = function(){
    gotoAndPlay (this.value);
//        trace(mySlide);
    }
// Next and Previous Button Action with Mouse
//Now add on keypress.
// these below work.
next_btn.onRelease = function() {
    if (mySlide<maxSlide) {
        mySlide = mySlide+1;
    }
    trace(mySlide);
    gotoAndPlay("s"+mySlide);
};
previous_btn.onRelease = function() {
    if (mySlide>1) {
        mySlide = mySlide-1;
    }
    trace(mySlide);
    gotoAndPlay("s"+mySlide);
};

var keyListener:Object = {};
keyListener.onKeyDown = function () {
    if (mySlide<maxSlide) {
        mySlide = mySlide+1;
    }
    gotoAndPlay("s"+mySlide);
    Key.addListener( keyListener );
};
//mission_btn.on(release){
//_parent.gotoAndPlay("s49");
//}


Mod edit - Please code.gif
~BetaWar
User is offlineProfile CardPM

Go to the top of the page


jskog
post 22 Oct, 2008 - 12:01 PM
Post #2


New D.I.C Head

*
Joined: 26 Sep, 2008
Posts: 4

So maybe this is advanced? Is there more information needed?

Anybody?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 03:02AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month