View Full Version : Counting Numbers [MX]
mx-guest2004
March 12th, 2004, 08:54 AM
Hi!
I have a counting movie which displays numbers from 1 to 1000 (action scripts) in a dynamic text box. First 1 and then 2 and so on. It works very well.
I convert this movie to a movie clip and drag this new movie clip to the main stage on frame 1, but anything happens now.
Could somebody help me whit this?
Thanks
MX-Guest
senocular
March 12th, 2004, 08:56 AM
Please keep your questions to one forum, thanks ;)
mx-guest2004
March 12th, 2004, 08:59 AM
Ok. Sorry. I'm new here.
MX-Guest
claudio
March 12th, 2004, 12:33 PM
Its probably a path problem. If your textfield is inside a movieclip the path will change. So if you want to reference the textfield now:
mymovieclip.mytextfield
mx-guest2004
March 12th, 2004, 05:41 PM
But I don't understand where I must put this code. I thought that the movie clip will begin to play in a given frame on the timeline.
Could you please tell me some details about your code?
You know, I am not so good in AS.
Thanks
claudio
March 13th, 2004, 06:35 PM
The code should go in the timeline where the movieclip is located.
mx-guest2004
March 14th, 2004, 07:21 AM
Thanks Claudio. But as I told, I am not so good in AS. My movie has not any interactivity. So my question is: when we come to the frame in the timeline how I reference the textfield in the MC on the stage to tell the right path?
mx-guest2004
claudio
March 14th, 2004, 11:53 AM
Okay, explain your file structure and where is your code to count the numbers located.
mx-guest2004
March 14th, 2004, 12:14 PM
Thanks again for spending some time to look at this code Claudio.
I have a dynamic text file and this code on the 1st frame in the timeline. I don't want a button. I want the counter MC play a few seconds and then I can fade that out. I can do these things but my problem is that the code dosen't work as a MC. Here is the code in the timeline:
showCount = function () {
_root.count_txt.text = _root.countNum+"";
};
step = function () {
_root.countNum++;
showCount();
if (_root.countNum == 1000) {
clearInterval(_root.count_int);
finished();
}
};
init = function () {
_root.countNum = 0;
_root.countTime = 150;
_root.count_int = setInterval(step, _root.countTime);
};
countDown = function () {
init();
showCount();
};
countDown();
*************************
claudio
March 14th, 2004, 12:47 PM
The count_txt is inside the counterMC?
mx-guest2004
March 14th, 2004, 12:52 PM
Yes Claudio.
The whole code is inside MC.
mx-guest2004
claudio
March 14th, 2004, 12:55 PM
Just remove all the _root then.
mx-guest2004
March 14th, 2004, 01:34 PM
Thank you very much Claudio.
Everything works now. :beer:
Just one thing more. As I have a dynamic text field, if I use a particular font for my numbers can other see this font even they don't have this font installed in their PC ?
Sorry if this is a stupid question.
mx-guest2004
claudio
March 14th, 2004, 01:51 PM
No, unless you embed the font for your textfield.
Select the textfield, go to properties panel Character -> All Characters
mx-guest2004
March 14th, 2004, 02:00 PM
Thanks.
It's good having such helping members in this forum.
mx-guest2004
claudio
March 14th, 2004, 02:01 PM
welcome ;)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.