PDA

View Full Version : Use variables to set frame in Movie Clip


onemunki
09-13-2005, 01:27 PM
Folks, I'm really hoping someone can help me with a problem I'm having.

Basically I have a calendar graphic on which is a movieclip named numbers, which has 31 frames each with a corresponding number that will display the days remaining in a competition.

Using load variables the variable 'daysleft' will be imported from an asp page, at present I'm using a text file to test the animation. I can get the file to read the variable 'daysleft' currently set at 21, but I'm having real problems then getting the movie clip numbers to gotoAndStop on that frame.

I've attached the .fla for you to see as I'm having a real headache with this and the client needs to see something tomorrow.

Cheers all.

Munki

Cota
09-13-2005, 07:31 PM
Code you post your code for those of us without MX2004.

mayur_vnit
09-13-2005, 08:01 PM
I saw your text file and fla too..
there is problem in your text file..
if you put two Consecutive trace like

trace(daysleft);
trace(daysleft);
in your fla.. its taking a newline character in between

just put this much in your text file

&daysleft=21
with no spaces or enter after 21 then
this.gotoAndStop(daysleft.toString());

in your onClipEvent

it then works..
i have checked it