TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

few fairly simple q's

Page: 1 2 Reply
Aug 3rd 2003#116247 Report
Member since: May 24th 2003
Posts: 212
hey,

how do i display things like...

time
date
seconds (counting up)
seconds (counting down)
time remaining (downloading eg. .swf)
pc specs


...in a dynamic text box ?

also is there a way to include such details like time remaining in a dynamic text box, under different sircumstances...

eg.

dynamic text box says;

"you have seconds remaining"

rather than the dynamic text box displaying one thing.

the last thing is very much like javascript;

document.Write('hello the time is' + thetime + 'thanks for visiting);




thanks
Reply with Quote Reply
Aug 4th 2003#116357 Report
Member since: Mar 18th 2001
Posts: 1604
not sure of the specifics on the first part, tho there are actionscript objects for most of those things. some research on the macromedia site should turn up most of those.

on the second part you can include a variable in a dynamic text box, again not something i know specifics on but something that can be done with a bit of research. hope that helps.

chris
Reply with Quote Reply
Aug 4th 2003#116409 Report
Member since: Aug 9th 2001
Posts: 2333
Yup, chris said basically about as much as anyone else here can about AS. Maybe check out getting Colin Mooks' Actionscript book? It's very good and easy to use. That or go to Ultrashock forums, you'll most likely get a fast answer. This is primarily a graphics board.
Reply with Quote Reply
Aug 5th 2003#116537 Report
Member since: May 24th 2003
Posts: 212
yer i know, oh well, yeah i got an idea bout the variable thing.

cheers
Reply with Quote Reply
Aug 14th 2003#117766 Report
Member since: Jul 31st 2003
Posts: 23
stop by the ActionScript.org/tutorials page , you can find pretty much any thing you might need to help you get thru this the way you explained it in your post.
Reply with Quote Reply
Aug 14th 2003#117769 Report
Member since: May 24th 2003
Posts: 212
hehe thanks desolate i'd forgotten bout that site, went on it ages ago.

got bored-i didnt understand it then lol cheers
Reply with Quote Reply
Aug 30th 2003#119759 Report
Member since: Apr 30th 2002
Posts: 98
Learn javascript first cause actionscript is his cousin. The Date() function is where you should start.

-Zwarte
Reply with Quote Reply
Aug 31st 2003#119883 Report
Member since: May 24th 2003
Posts: 212
so i cud copy the same javascript as i wud for a normal page into flash, then have a dynamic text box's variable to be "time()" or something??

if so... COOL :D i no javascript!! cchhhhhhhhhhhhhhhheerrs
Reply with Quote Reply
Aug 31st 2003#119892 Report
Member since: Jul 31st 2003
Posts: 23
ok buddy try this :
make a movie clip with 2 layers
(note this movie clip will only have 2 frames), name it- "mc_ timeDate"
LAYER 1-
1 frame F5'd 1 frame(so all you have is the dot in frame 1 and a square in the frame 2)
is a single line dynamic text box, the variable in your properties box will be labeled "textdate".
LAYER 2 ,name= actions
in frame one in the actions open your actions properties and paste this :
function howlong(arg) {
if (length(arg) == 1) {
arg = "0"+arg;
return arg;
} else {
arg = arg;
return arg;
}
}
myDate = new Date();
hr = howlong(String(myDate.getHours()));
mnt = howlong(String(myDate.getMinutes()));
daytext = myDate.getDay();
dd = myDate.getDate();
mm = myDate.getMonth();
yyyy = myDate.getFullYear();
switch (daytext) {
case 0 :
daytext = "Sunday";
break;
case 1 :
daytext = "Monday";
break;
case 2 :
daytext = "Tuesday";
break;
case 3 :
daytext = "Wednesday";
break;
case 4 :
daytext = "Thursday";
break;
case 5 :
daytext = "Friday";
break;
case 6 :
daytext = "Saturday";
break;
}
switch (mm) {
case 0 :
mm = "January";
break;
case 1 :
mm = "February";
break;
case 2 :
mm = "March";
break;
case 3 :
mm = "April";
break;
case 4 :
mm = "May";
break;
case 5 :
mm = "June";
break;
case 6 :
mm = "July";
break;
case 7 :
mm = "August";
break;
case 8 :
mm = "September";
break;
case 9 :
mm = "October";
break;
case 10 :
mm = "November";
break;
case 11 :
mm = "December";
break;
}
textdate = (hr+":"+mnt+" - "+daytext+","+dd+" "+mm+" "+yyyy);


Frame 2 in the actions properties paste this:
gotoAndPlay(1);


this will display the date in the form of military ( time) , day , date, year. let me know if you need any more ....
Reply with Quote Reply
Aug 31st 2003#119938 Report
Member since: May 24th 2003
Posts: 212
oh wow u star


that's well cool...

am i right in saying.... that i could make/find any javascript function and paste it into flash??

cheers and any other flash things like that would be VERY appreciated
cheers
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum