PDA

View Full Version : Create instance of the media component


ericb1
01-27-2006, 06:07 PM
I've searched this forum, but couldn't find what I was looking for. I know you can create an instance of a button and place it on the stage with Actionscript, as opposed to doing it in design mode.

But I was wondering if it can be done with an instance of a component, like the media player. I have a MC and I'm trying to make a video presentation, but the videos are of different sizes, so I would like to be able to click a button and have the video player appear in a specific spot, so I'd want to customize the X and Y coordinates and pass the video parameters such as .flv file and volume, etc.

Any help is greatly appreciated, thanks!

Slowburn
01-27-2006, 06:15 PM
The MediaPlayback component is already has an exportedname, so you don't need to fill in the linkage Identifier.
(just make sure that the component is in your library)

attachMovie("MediaPlayback", "newName", 1);