Hi Bryan,

I can't really help you with the built-in flash components in director (actually I never fully understood what they are good for, at least if you own a copy of Flash). But the following would work for a "normal" flash component:

Create a flash movie that contains nothing than a DateChooser component, give it an instance name (e.g. "dc1"), and add the following actionscript to frame 1:
listenerObject = new Object();
listenerObject.change = function(eventObject){}; // function can be empty!
dc1.addEventListener("change", listenerObject);

save the fla, compile it, done.

now import the swf into director, put it on the stage/score, and attach a sprite script like:

property pDateChooser

on beginSprite me
 pDateChooser = sprite(me.spriteNum).getVariable("dc1", 0)
 sprite(me.spriteNum).setCallback(pDateChooser, "change", #change, me)
end

on change me
 tDate = pDateChooser.selectedDate
 -- now do something with the choosen date, like
 put tDate.toString()
 -- or
-- put integer(1900+tDate.getYear())&"-"&integer(tDate.getMonth()+1)&"-"&integer(tDate.getDate())
end


Cheers,
Valentin

Bryan Thompson wrote:
Greetings all,

I'm having trouble figuring out how to access the properties of the
DateChooser Flash Component.  I'm getting the change and scroll
events, but
can't do anything with them.

What I'm trying to do is initialize the calendar to a preset date,
then
retrieve the date selected by the user.

Win, DMX2K4.

Any advice would be greatly appreciated.

Bryan Thompson

[To remove yourself from this list, or to change to digest mode, go
to http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email [email protected]  (Problems, email
[EMAIL PROTECTED]). Lingo-L is for learning and helping with
programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to