Hi Sri,
What it looks to me is:
Either you have to make different classes for each of your movie clips
or have different characters embedded in the timeline of a movie clip
and after embedding you can do gotoAndStop('frame_label').
something like below:
private var characters:LoadMovieClipObject = new LoadMovieClipObject
();
private function bt1EventListener(e:MouseEvent):void
{
characters.gotoAndStop("archer");
}
private function bt2EventListener(e:MouseEvent):void
{
characters.gotoAndStop("archer2");
}
Alternately, you can use flex component kit for CS3 and create flex
components out of your movie clips and use.
Thanks!
Vpn
On Dec 18, 5:47 pm, sri space hero <[email protected]> wrote:
> Hello,
>
> I have a small problem here.
>
> i need to load the movie clips from flash(swf file)in to flex at runtime.
> Here i have a class LoadMovieClipObject. which extends MovieClip.
>
> i have 4 movie clips in swf file. Basically we do it by writing this code.
>
> package com.golive.characters
> {
> [Embed(source="assets/body.swf",symbol="archer")]
> public class LoadMovieClipObject extends MovieClip
> {
>
> }
>
> }
>
> By doin so that particular character embeds with this class. But what i want
> is i have 4 buttons and based on the button i clicked, an instance of the
> class LoadMovieClipObject is created and my desired movieclip from swf file
> should be attached to it. if i click scnd button again the same instance of
> this class is created but this time with different mc from swf file.
>
> Thank You,
>
> Sri Tej.
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.