Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FW: FLASH: get current time within flash?
From: Jason Bouwmeester
Date: Mon, 24 Apr 2000 17:47:16 +0100

This is for U-Neek who missed it the first time =0).

HTH,
jb

-----Original Message-----
From: Matt Wobensmith [mwobensmithatmacromedia [dot] com (mailto:mwobensmithatmacromedia [dot] com)]
Sent: Thursday, April 20, 2000 4:25 PM
To: flasheratchinwag [dot] com
Subject: RE: FLASH: get current time within flash?


Marcus wrote:

>Sounds like the pressure is ON Matt.

Yeah, I guess it is!

OK people, this one should probably be a TechNote.
For now, the info is below. Forward at will. :>)

Additionally, I would appreciate all questions regarding this to go the
list, and not to myself or MM Tech Support.

Matt

---------------
Matt Wobensmith
Macromedia Tech Support
Flash Team Lead



Here are the steps to pass the browser's date and time to Flash via
JavaScript. You need to follow them all exactly or it won't work. If you are
afraid to touch your HTML or JavaScript, then don't do it. :>)

1. Quit Flash. This is important.

2. Copy the text below, and paste it inside a BRAND NEW text file. It is a
*customized* Flash HTML template that your Publish Settings will use for
this exercise.
Mac - use SimpleText, PC - use Notepad. Or equivalent. Save the file and
call it "Flashdate.html" and put it inside the Flash 4 > HTML folder.

$TTFlashDate
$DS
Pass the browser's Date string to Flash.
$DF
<HTML>
<HEAD>
<TITLE>$TI</TITLE>

<script language="JavaScript">
<!--
function flashDate() {
window.document.$TI.SetVariable("date", new Date());
}
//-->
</script>

</HEAD>
<BODY bgcolor="$BG" marginwidth="0" marginheight="0" leftmargin="0"
topmargin="0" onLoad="flashDate()">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=4,0,2,0"
ID=$TI WIDTH=$WI HEIGHT=$HE>
$PO
<EMBED $PE WIDTH=$WI HEIGHT=$HE NAME=$TI
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash" swLiveConnect=true></EMBED>
</OBJECT>

</BODY>
</HTML>


3. Open a new file in Flash, and save it - call it "mmrules.fla".

4. Create an editable text field on the stage. Assign it variable name
"date".

5. Add one more blank frame - not a keyframe - just a frame, to the timeline
for a grand total of two frames.

6. From the File > Publish Settings, go to the HTML tab, and under the
templates, choose "FlashDate".

7. Save it all and choose F12 - Preview in Browser. The data from the new
Date() function should populate the text field on the stage.

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: get current time within flash, U-Neek

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]