?
Solved

Script for a date on my flash

Posted on 2003-03-09
13
Medium Priority
?
200 Views
Last Modified: 2010-04-03
HI,

I want to have the date on my flash site to be showing like, ex: january 2, 2003

I want it to update itselfs with what ever the date is that day.


Can somebody help me please.

Thanks,

Ryan
0
Comment
Question by:daddydesign
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8099501
This may not be the best answer, as there is supposed to be a way to spell out the month name use one of the date objects methods, but it will work.


//setup an month array
months = new Array("January", "February", "March", etc...);

//create date object
today = new Date();
thisMonth = today.getMonth();
thisDate = today.getDate();
thisYear = today.getFullYear();

fullDate = months[thisMonth] + " " + thisDate + ", " + thisYear;


The method that returns the month spelled out looks like:
thisMonth.toString();

But like I said, since that didn't work, I just spelled out the names of the months manually in the months array.

Good luck

-styles

0
 

Author Comment

by:daddydesign
ID: 8099689
How do I put it in the flash.  I'm sorry I'm just learning flash.

Thanks.

P.s. The whole month desnt have to be spelled out.
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8099738
I made a quick FLA for you.

http://www.elementfixe.net/ee/date.fla

Take a look at the actions in the first frame.  They are pretty similar to what is above, except that I added a short format too.

In the "var" field (in properties window) you can type the name of the variable you want to get the value from.  You will see that I created two textboxes, with "var" named shortDate and longDate.  the values for these textboxes are taken from the variables in the first frame.

-styles
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:daddydesign
ID: 8100235
I cant open that file for some reason!  Thank You for your help
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8100297
what version of flash are you using?  that was saved in MX version....

-styles
0
 
LVL 5

Accepted Solution

by:
ocgstyles earned 500 total points
ID: 8100307
here is one saved in flash 5 format:

http://www.elementfixe.net/ee/date5.fla

-styles
0
 

Author Comment

by:daddydesign
ID: 8100423
I cant open that file for some reason!  Thank You for your help
0
 

Author Comment

by:daddydesign
ID: 8100475
I got it opened! Thank you so much.  I'm starting to understand how you did it.  

1 more stupid question.  How do I take away that border adn make the background go away or change the color of the background.

thanks
0
 

Author Comment

by:daddydesign
ID: 8100482
Can you tell me how to get rid of the border and how to change the background color of it

thank you so much for your help[

ryan
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8100536
i don't remember where exactly to make the adjustment in flash 5.  i uploaded a pic of the textbox properties from MX, maybe the buttons look the same...

http://www.elementfixe.net/ee/border.jpg

when you deselect this, the background color becomes transparent.  unfortunatly, you can't change the background color of the textbox, unless you have Flash MX.

-styles
0
 

Author Comment

by:daddydesign
ID: 8100585
Once again... thank you.

Let me know what you think of the site I'm creating !

http://www.iipga.com

Thank you again for all your help!



ryan
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8100617
looks good!
0
 
LVL 6

Expert Comment

by:henryww
ID: 8101374
wow ... big O ... that's fast ...
very quick response.

hmmm now u are getting ahead of me answering all the questions b4 i wake up...  LOL ...


cheers O
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question