# \[F8\]AS2.0 dynamically load jpg into MovieClip and apply class instance

**URL:** https://forum.kirupa.com/t/f8-as2-0-dynamically-load-jpg-into-movieclip-and-apply-class-instance/269348
**Category:** flash
**Created:** [August 26, 2008, 2:06pm UTC](https://forum.kirupa.com/t/f8-as2-0-dynamically-load-jpg-into-movieclip-and-apply-class-instance/269348 "2008-08-26T14:06:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![agentfooze](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@agentfooze](https://forum.kirupa.com/u/agentfooze)
#### Post date: [August 26, 2008, 2:06pm UTC](https://forum.kirupa.com/t/f8-as2-0-dynamically-load-jpg-into-movieclip-and-apply-class-instance/269348/1 "2008-08-26T14:06:22Z")

</div>

I’m working on a photo-sharing demo using AS2.0, and I have a question that I would very much appreciate help with. I would like to dynamically load photos (stored as jpgs in the .fla’s local directory) into MovieClips, and apply a class instance to them. Currently, for debugging, I’ve imported jpgs to the Stage, converted them to MovieClips, and then accessed their linkage properties, setting them to the class I need them to implement. But for the final application all of this will have to be done with code.

I know how to dynamically load the jpg into a MovieClip using loadImage(), and I know how to create a MovieClip that is an instance of a class by using attachMovie() with a library symbol and the class name. How do I combine the two? Is there a way to access the linkage properties of a MovieClip dynamically?

Thanks!
