Hey guys,
I'm building a quiz and have almost all of it figured out except for this:
function checkAnswer(ans:String) {
clipHolder.attachMovie("result_mc","clip",0);
clipHolder.clip.title_txt.text = "Question #"+n_curr+":";
clipHolder.clip.correct_txt.htmlText = a_xml[n_q].answer;
clipHolder.clip.pigscore.text = n_right;
if (correct == ans) {
clipHolder.clip.words.gotoAndStop(2);
clipHolder.clip.piggybank.gotoAndPlay("coindrop");
n_right++;
} else {
clipHolder.clip.words.gotoAndStop(1);
}
n_q++;
n_curr++;
completedText();
}
I bought the quiz from FlashDen and have been able to modify it pretty well except for the part in bold. I've added a movie clip that's suppose to play if the answer is right. I have a stop(); on the movie clip's first frame. I added a label to it's second frame called "coindrop". Any ideas why the clip won't play?
Thanks!
Hm..can't get movie clip to playIf answer is correct, play movie clip
Page 1 of 1
13 Replies - 2142 Views - Last Post: 18 January 2009 - 01:28 PM
Replies To: Hm..can't get movie clip to play
#2
Re: Hm..can't get movie clip to play
Posted 17 January 2009 - 09:01 AM
I thought you could have just typed in the frame number instead of adding a frame label. That way, you know that it will definitely work (well, for me anyway).
#3
Re: Hm..can't get movie clip to play
Posted 17 January 2009 - 09:56 AM
I tried that first and it didn't work so I tried the label. Neither work : /
#4
Re: Hm..can't get movie clip to play
Posted 17 January 2009 - 10:12 AM
#5
Re: Hm..can't get movie clip to play
Posted 17 January 2009 - 10:14 AM
I'm stumped too
.
Thanks anyways.
Thanks anyways.
#6
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 07:30 AM
Anyone else have any ideas?
Anyone else have any ideas?
Anyone else have any ideas?
#7
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 08:57 AM
Could we see the .fla? It is probably a problem with your parents/ children placements for the movieclips, but I can't be sure as I can't actually transverse the movieclip orders.
#8
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 09:14 AM
I have attached the FLA. Thanks!
Attached File(s)
-
multi_preview_v8.fla.zip (95.74K)
Number of downloads: 54
#9
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 09:23 AM
Did you zip the file, or just change the extention? I am having errors opening it with both flash and winzip...
#10
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 09:51 AM
BetaWar, on 18 Jan, 2009 - 08:23 AM, said:
Did you zip the file, or just change the extention? I am having errors opening it with both flash and winzip...
I'm on a mac and just right clicked the .fla and hit compress. Does this one work?
Attached File(s)
-
multi_preview_v8.zip (95.74K)
Number of downloads: 51
#11
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 11:27 AM
#12
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 01:02 PM
It took a while, but I did find a way that it seems to work (at least on my computer).
Use this as your check answer function:
and remove all the actionscript from the m_piggybank movieclip, then it seems to work.
I would upload the .fla, but I am on CS4 and not sure what you are using so it may be incompatible...
Hope that helps.
Use this as your check answer function:
function checkAnswer(ans:String) {
clipHolder.attachMovie("result_mc","clip",0);
clipHolder.clip.piggybank.stop();
clipHolder.clip.title_txt.text = "Question #"+n_curr+":";
clipHolder.clip.correct_txt.htmlText = a_xml[n_q].answer;
clipHolder.clip.pigscore.text = n_right;
if (correct == ans) {
clipHolder.clip.words.gotoAndStop(2);
clipHolder.clip.piggybank.play();
n_right++;
} else {
clipHolder.clip.words.gotoAndStop(1);
}
n_q++;
n_curr++;
completedText();
}
and remove all the actionscript from the m_piggybank movieclip, then it seems to work.
I would upload the .fla, but I am on CS4 and not sure what you are using so it may be incompatible...
Hope that helps.
#13
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 01:04 PM
Hi! thanks for the help. It looks like its working! I don't think I would have been able to figure it out myself.
#14
Re: Hm..can't get movie clip to play
Posted 18 January 2009 - 01:28 PM
No problem. Just glad to have been of assistance
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|