Looked at this for about 15 min. and for some reason neither component is available for me to change. Strange...

----- Original Message -----
From: "Alexander Farber" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, January 17, 2007 8:57 AM
Subject: Re: [Flashcoders] A v2 Window with a Checkbox and a Button

Hello Thomas,

is your question related to the 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);

after me trying the object casting? No I don't have a Settings.as

Regards
Alex

On 1/17/07, Thomas Fowler <[EMAIL PROTECTED]> wrote:
So, you have a symbol in your library with a  linkage identifier of
"Settings". Does this symbol also have the name of your class that is
supporting the symbol? This class would be called Settings also.

----- Original Message -----
From: "Alexander Farber" <[EMAIL PROTECTED]>

> 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

--
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

_______________________________________________
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