Hi,

I've drawn a red rectangle, then pulled a v2 Checkbox and
a Button inside of it, named them my_checkbox and my_button
and then converted all of that into a MovieClip which I called
"Settings" and removed from the stage.

Finally I've pulled a Window on the stage and called it my_win.

While I'm able to resize the my_win in its "complete" event,
I can't find the way to change the labels of the checkbox and
the button programmatically:

import mx.containers.Window;

var my_win:Window;
my_win.contentPath = 'Settings';

function complete(evt_obj:Object){
       var metr_obj:Object = my_win.getViewMetrics();
       my_win.setSize(my_win.content._width + metr_obj.left + metr_obj.right,
              my_win.content._height + metr_obj.top + metr_obj.bottom);

       my_win.content.my_checkbox.label = 'Green';
       my_win.content.my_button.label = 'Save';
}
my_win.addEventListener('complete', this);

And if I try to use an object casting:

       var my_set:Settings = Settings(my_win.content);
       my_set.label = 'Green';
       my_set.label = 'Save';

then I get this misterious error message:

**Error** Scene=Scene 1, layer=Actions, frame=1:Line 17:
The class or interface 'Settings' could not be loaded.
       var my_set:Settings = Settings(my_win.content);

I feel that I've done my homework by rereading the Flash8
help on the Window component and the nice book "Advanced
ActionScript Components: Mastering the Flash Component
Architecture", but I'm still missing something... Any help please?

The test case source code is here:
   http://preferans.de/Settings.fla
   http://preferans.de/Settings.swf

Regards
Alex



--
http://preferans.de


--
http://preferans.de
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to