Checkbox and gotoAndPlay()

I'm not feeling all that smart this morning...I thought I could do something really simple with a checkbox.

I dragged a checkbox component out to the stage and when it is checked I want to go to another frame in the same movieclip.

So my actionscript looks like this


on (click) {
    this.gotoAndPlay("default expand");
}

that does't seem to do anything.  If I replace it with trace(this);  and then click the box I do get a trace window.  Can the default checkbox event (click) execute goto commands or do I have to build an event listener?

Dan
dankazupAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DrakkonCommented:
this.gotoAndPlay("default expand");

"this" in your case would mean the checkbox and its trying to play the "default expand" frame of the checkbox. I think what you are wanting is:
_root.myMovieClip.gotoAndPlay("default expand");

or_root being level or whatever the path to the movieclip your "expanding" is
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dankazupAuthor Commented:
I must not be understanding the timeline layers...I should add some more information


On my main timeline I have 5 frames with an instance of the scrollpane component named "scrollimage".

The scrollpane component content path is set to the movie clip ScrollImage7

Now the movie clip Scrollimage7 has three layers actions, buttons, background and 79 frames divided up into sections with the labels default, default expand, cl, cl expand, pl, pl expand, specialty, bond

if I was understanding your comment, for the on (click) I should use...

on (click){
  ScrollImage7.gotoAndPlay ("default expand");
}

I still think that is wrong because I also added a symbol on the same frame and the actionscript

on (release){
    this.gotoAndPlay("default expand");
}

works.....however the actionscript

on (release){
    ScrollImage7.gotoAndPlay ("default expand");
}

doesn't....so I must still be screwed up in my movieclip path.

I could use symbols instead of the checkbox...except I want the check to stay once clicked and the symbol doesn't give me that capability by default.

Dan


0
dankazupAuthor Commented:
I think I got it...

I used _parent.gotoAndPlay.... ad that seems to work..


I'm finding that the timeline issues are the most difficult for me...thanks for answering so quickly and helping to rattle my brain around a little.


Dan
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.