Hi Bryan,

totally untested, but the documentation says that selectableRange is specified like:

myDC.selectableRange = {rangeStart: new Date(2001, 4, 7), rangeEnd: new Date(2003, 5, 7)};

Those curly braces are just a short form for creating native Objects in Flash, so I think the following code might work in Director:

pDateChooser = pMySprite.getVariable("dc1", 0) -- see earlier email
selectableRange = pMySprite.newObject("Object")
selectableRange.rangeStart = pMySprite.newObject("Date", 2001, 4, 7)
selectableRange.rangeEnd = pMySprite.newObject("Date", 2003, 5, 7)
pDateChooser.selectableRange = selectableRange

Cheers,
Valentin


Bryan Thompson wrote:
Hi all,

I've been able to access and set the properties in the dateChooser
Flash
component (thanks for the info Valentin), but am now having trouble
setting
the selectableRange.  I'm sure it's a syntax issue.

This is what I'm working with:

on mSelectableRange me, st, en
 stYr = st.year
 stMo = st.month - 1
 stDt = st.day
 enYr = en.year
 enMo = en.month - 1
 enDt = en.day

 flst = pMySprite.newObject("Date",stYr,stMo,stDt)
 flen = pMySprite.newObject("Date",enYr,enMo,enDt)

 pMySprite.selectableRange = [rangeStart:flst, rangeEnd:flen]
end

Where pMySprite is the dateChooser sprite (obviously), and st/en are
lingo
date objects.
I've confirmed that the converted ActionScript date objects are
correct.

I've tried all syntax variations I can think of, but continually get
"property not found. #selectableRange".

Any suggestions?

Thanks,

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 lingo-l@penworks.com  (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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to