# Controlling components from class file?

**URL:** <https://forum.kirupa.com/t/controlling-components-from-class-file/283481>\
**Category:** Uncategorized\
**Created:** [March 6, 2009, 6:06pm UTC](https://forum.kirupa.com/t/controlling-components-from-class-file/283481 "2009-03-06T18:06:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppdc](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@ppdc](https://forum.kirupa.com/u/ppdc)\
**Post date:** [March 6, 2009, 6:06pm UTC](https://forum.kirupa.com/t/controlling-components-from-class-file/283481/1 "2009-03-06T18:06:15Z")

</div>

I’m trying to control a component (a Slider) from a class, but it won’t work, because I can’t load the definitions (import fl.controls.Slider; import fl.events.SliderEvent; --\> Error 1172: Definition not found).

The Class I’m using loads the .swf containing the Slider, that’s working fine and I can also adress the slider-component and read it’s value. But I can’t invoke a SliderChange.Event …  
I read, that you have to add components to the library to be able to load the definitions, but that’s only possible in .fla files…

Thank you

Peter
