Hello
can any one help me in this Experiment
iam building a seconds convertor to minutes in flash
i have the fig like this
1) text box ( instance name -> sec_txt ) input text box
1) text box ( instance name -> min_txt) dynamic text box
1) button ( instance name -> convertor_btn)
i wanted that .. in a way !
user enter seconds in SEC_TXT and click on the button ( CONVERTOR_BTN)
and it converts to MINUTES
and it the shows the resullt in ( MIN_TXT ) which is dynamic text box
plz help in this plz
by sending me a ( .fla file )
thank you !
16 6590
Hi 4183mal0we, welcome to TS IT/DN!
That is one easy task.
You just need to divide the input value by 60.
Are you willing to do this in AS 3 or 2?
Please, know that we are here to provide help, and by that I mean, to guide you through and letting you put some brains on it too, so we assume that you have some knowdlege and experience in the matter. If not, first try to learn, and then, when you encunter a problem, we will try to help you overcome it.
Best regards,
The_Nephilim
Hello
can any one help me in this Experiment
iam building a seconds convertor to minutes in flash
i have the fig like this
1) text box ( instance name -> sec_txt ) input text box
1) text box ( instance name -> min_txt) dynamic text box
1) button ( instance name -> convertor_btn)
i wanted that .. in a way !
user enter seconds in SEC_TXT and click on the button ( CONVERTOR_BTN)
and it converts to MINUTES
and it the shows the resullt in ( MIN_TXT ) which is dynamic text box
plz help in this plz
by sending me a ( .fla file )
thank you !
hello thank you for replying me back
the thing is I tried but its not working
i will be using in actionscript 3
plz can you send me the code over here
thank you !
the thing is I tried but its not working
i will be using in actionscript 3
plz can you send me the code over here
well if i divide the number / 60
that means you know the number ---> that user is going to enter this
number of your choice
but ... you don't know what number the user is going to put !
my question was that the user enter any number after that he / she clicks on the convertor button and that seconds number which is entered by the user is
showing in minutes !
plz help me in this
thank you !
Hi!
Please, post the code you got, so I can tell you where yo went wrong, andexplain you how you can correct it.
Kind regards
The_Nephilim
hello thank you for replying me back
the thing is I tried but its not working
i will be using in actionscript 3
plz can you send me the code over here
thank you !
if i knew the code
i was able to do it then
..
iam new in this category !
plz help me in this !
can you post me the code over here !
so what should i put under the buton ( convertor )
because when you will send me the code , i will under stand that
and after that i will go for further !
plz help
thank you !
If you divide the number by 60 does not mean you know the number!
You said your input text was sec_txt, your textbox is min_txt and your button is convertor_btn, well, I'll explain.
You should know that to dispatch events in AS 3 you must use event handlers, so if you want to register a click event, you should use the addEventListener function:
DisplayObject.addEventListener(event:String, callback:Function);
So, using your names will be something like this:
convertor_btn.addEventListener(MouseEvent.CLICK, onClick);
now the function onClick will be recieving the event object, so your function must have a parameter that will be the event itself, even if you won't use it at all: -
function onClick(e:MouseEvent):void {
-
min_txt.text = String(Number(sec_txt.text) / 60);
-
}
-
See, I did what I told you and without knowing the number.
The complete code would be: -
convertor_btn.addEventListener(MouseEvent.CLICK, onClick);
-
-
function onClick(e:MouseEvent):void {
-
min_txt.text = String(Number(sec_txt.text) / 60);
-
}
-
Best regards,
The_Nephilim
the thing is I tried but its not working
i will be using in actionscript 3
plz can you send me the code over here
well if i divide the number / 60
that means you know the number ---> that user is going to enter this
number of your choice
but ... you don't know what number the user is going to put !
my question was that the user enter any number after that he / she clicks on the convertor button and that seconds number which is entered by the user is
showing in minutes !
plz help me in this
thank you !
thank you for replying me back
you said
complete code would be -
convertor_btn.addEventListener(MouseEvent.CLICK, onClick);
-
-
function onClick(e:MouseEvent):void {
-
min_txt.text = Number(sec_txt.text) / 60;
-
}
-
so thats it only i need to enter this code under the button !
and iam done
...
Now, not under the button, in the frame.
And yes, thats the whole code.
I reccomend you to start learning how to programfirst. Then, and only then start learning ActionScript.
Best regards,
The_Nephilim
thank you for replying me back
you said
complete code would be -
convertor_btn.addEventListener(MouseEvent.CLICK, onClick);
-
-
function onClick(e:MouseEvent):void {
-
min_txt.text = Number(sec_txt.text) / 60;
-
}
-
so thats it only i need to enter this code under the button !
and iam done
...
i tried it but its giving error
it says
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: The class or interface 'MouseEvent' could not be loaded.
function onClick(e:MouseEvent):void {
Total ActionScript Errors: 1 Reported Errors: 1
Try importing it at the beggining of the code:
import flash.events.MouseEvent;
Kind regards
i tried it but its giving error
it says
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: The class or interface 'MouseEvent' could not be loaded.
function onClick(e:MouseEvent):void {
Total ActionScript Errors: 1 Reported Errors: 1
hello
i tired this also, but it still gives the same ERROR
**Error** Scene=Scene 1, layer=actions, frame=1:Line 3: The class or interface 'flash.events.MouseEvent' could not be loaded.
function onClick(e:MouseEvent):void {
Total ActionScript Errors: 1 Reported Errors: 1
Are you sure you are using AS3???
hello
i tired this also, but it still gives the same ERROR
**Error** Scene=Scene 1, layer=actions, frame=1:Line 3: The class or interface 'flash.events.MouseEvent' could not be loaded.
function onClick(e:MouseEvent):void {
Total ActionScript Errors: 1 Reported Errors: 1
yes
iam using actionscript 3
iam using flash professional 8
There's no way you are using AS3 in Flash 8.
AS3 is only available since Flash 9, Flash CS3 and Flex 2
yes
iam using actionscript 3
iam using flash professional 8
iam sorry dear support team my mistake
it was typed in a hurry
well now ..what to do
Ok then. If you are using AS2 it's basicly the same, the only thing that changes is the event handling part. It woud be like this: -
convertor_btn.onRelease = function() {
-
min_txt.text = String(Number(sec_txt.text)/60);
-
}
-
And in AS3: -
convertor_btn.addEventListener(MouseEvent.CLICK, onClick);
-
-
function onClick(e:MouseEvent) {
-
min_txt.text = String(Number(sec_txt.text)/60);
-
}
-
Best regards
The_Nephilim
iam sorry dear support team my mistake
it was typed in a hurry
well now ..what to do
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Kription |
last post by:
Hello,
I am having a nightmare of a time getting seconds converted to
hour-minute-seconds
I have a third party application that outputs only in seconds since
so if someone has been logged...
|
by: fred14214 |
last post by:
I need to be able to enter an elapsed time into a text
field. This time then needs to be converted into seconds
and stored in a field in some table.
The user will enter a time (format is...
|
by: MLH |
last post by:
I have a procedure that runs. It takes 3-5 minutes generally.
I would like to display the timelapse at the end of the process.
I would like the approximate timelapse value of 0.002141 to be...
|
by: tshad |
last post by:
Is there a quick function in vb out there that will convert seconds to
minutes and seconds?
Thanks,
Tom
|
by: vunet.us |
last post by:
How can I convert today's time (9:30:00) to seconds (34200) without
using calculations like (9*3600)+(30*60)+0? Is there an easy function?
Thank you
|
by: markdp |
last post by:
I'm trying to write a program that takes a user inputted number of seconds and converts it into hours, minutes and seconds. So for instance, the program prompts the user for seconds, lets say 1000...
|
by: poorna |
last post by:
Hai all
Can any one help how to use currency convertor in Web application as I need
to implement the currency convertor into my project. I tried in so many ways
and was unable to gather any...
|
by: =?Utf-8?B?U2hlbGRvbg==?= |
last post by:
Hello -
I have about ten integer values that each need to be converted to days,
hours, minutes and seconds. I can't seem to find a formula for same that
works. These integer values come from a...
|
by: =?Utf-8?B?U2hlbGRvbg==?= |
last post by:
Hello -
I have various times formatted like 00:00:00, so for example, 01:32:05 would
be one thirty-two with five milliseconds.
I need to convert this into seconds (an integer).
First of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |