PDA

View Full Version : Another simple targeting problem


Dran
11-02-2001, 09:48 AM
Hello All,

As I am still having difficulty getting my head around paths and targets etc. Could someone explain how to do the following:

I'm still making my interactive quiz and I have a movie clip full of images that I want to move through depending on what question you are currently looking at:


tellTarget (_root.QuestionImage) {
gotoAndStop (CurrentQuestionNumber);
}


Of course it works if I put gotoAndStop(1); but I want it to use the variable. However this doesn't work and I am guessing that I'm not doing something vital to get the current frame number that is in the variable CurrentQuestionNumber.

Can sombody explain how to do it correctly and why?

Thanks! Dran

Dran
11-02-2001, 10:04 AM
Sorry for the trouble guys....

I worked it out. My variable CurrentQuestionNumber was on the main timeline and so by not using its full path, it did not work.

I managed to work it out because the trace command.

trace(typeof(CurrentQuestionNumber));

This told me that it was undefined which of course it was within the movie clip itself.

Cheers! <hanging his head in shame> Dran.