I use the code, included here, on the Movie Clip (MC) form directly // code to open the calendar MC, placed on one of the main's forms on(reveal){ this.contentPath = "calendar_040.swf"; this.load(); // needed in case user unloads the movie and needs to reload it again } // click detection routine var startDateLst:Object = new Object(); startDateLst.change = function(evt){ endDate_cb.enabled = true; var tempVar1 = evt.target; var tempVar2 = tempVar1.selectedDate; var startDayNum = tempVar2.getDate(); var startMonth = tempVar2.getMonth() + 1; var startYear = tempVar2.getFullYear(); fullStartDate = startYear + "-" + startMonth + "-" + startDayNum; reDoHotList_btn.enabled = true; }; // startDate_cb.addEventListener("change",startDateLst);
I've tried using the loader component with the _lockroot parameter, to load my movie clip, but it didn't fix the datefield not working issue. Any further insight would be greatly apreciated createClassObject(mx.controls.Loader, "loader", 100); loader.autoLoad = false; loader.scaleContent = false; loader.content._lockroot = true; loader.contentPath = "calendar_040.swf"; loader.load();
At your sugestion I tried putting the datefield component in the Movie that loads my calender movie and it worked. Although I still find it strange. Any idea why the need to put the component in the library of the top Movie Clip? Thx for help!!!!!
yes, the _level0 movie needs to access the properties of the component: that component is more than a simple movieclip with code on its timeline. the _level0 movie doesn't have access to those properties unless you tell it where that component resides. i thought using _lockroot would work as the author of that cited article stated. but in a pinch you can always do the brute-force thing and add the component to the _level0 library to give the _level0 movie access to all the properties of that component. using shared library assets is a little more polished and should work, too. but bottomline is, i think, a failing of the v2 components to handle this problem internally so users do not encounter these problems.
Don't see what you're looking for? Try a search.
|