Hm..can't get movie clip to play

If answer is correct, play movie clip

Page 1 of 1

13 Replies - 2576 Views - Last Post: 18 January 2009 - 01:28 PM

#1 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

Hm..can't get movie clip to play

Posted 17 January 2009 - 08:56 AM

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!

Is This A Good Question/Topic? 0
  • +

Replies To: Hm..can't get movie clip to play

#2 TomboFry  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 01-January 09

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).
Was This Post Helpful? 0
  • +
  • -

#3 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

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 : /
Was This Post Helpful? 0
  • +
  • -

#4 TomboFry  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 01-January 09

Re: Hm..can't get movie clip to play

Posted 17 January 2009 - 10:12 AM

View Postashgotti, on 17 Jan, 2009 - 08:56 AM, said:

I tried that first and it didn't work so I tried the label. Neither work : /

Well, I'm stumped. I'm not very good at Flash and LiveSwif and whatever else (even though I'm making an iPhone in Flash :S)
Was This Post Helpful? 0
  • +
  • -

#5 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

Re: Hm..can't get movie clip to play

Posted 17 January 2009 - 10:14 AM

I'm stumped too :D.

Thanks anyways.
Was This Post Helpful? 0
  • +
  • -

#6 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

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?
Was This Post Helpful? 0
  • +
  • -

#7 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,110
  • Joined: 07-September 06

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.
Was This Post Helpful? 0
  • +
  • -

#8 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

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)


Was This Post Helpful? 0
  • +
  • -

#9 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,110
  • Joined: 07-September 06

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...
Was This Post Helpful? 0
  • +
  • -

#10 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

Re: Hm..can't get movie clip to play

Posted 18 January 2009 - 09:51 AM

View PostBetaWar, 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)


Was This Post Helpful? 0
  • +
  • -

#11 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

Re: Hm..can't get movie clip to play

Posted 18 January 2009 - 11:27 AM

Incase it doesn't work, I've uploaded it here:
http://www.lemonlime...gns.ca/quiz.fla
Was This Post Helpful? 0
  • +
  • -

#12 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,110
  • Joined: 07-September 06

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:
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.
Was This Post Helpful? 0
  • +
  • -

#13 ashgotti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-January 09

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.
Was This Post Helpful? 0
  • +
  • -

#14 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,110
  • Joined: 07-September 06

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 :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1