-
loading a movie on button press
I'm not really too sure how to go about this. I imported an avi file and flash turned it into an flv file and made an FLVPlayback symbol and stuff and now I want to be able to load up and play that movie on a button press but the code that I have doesn't work. I don't even particularly think it's right.
Code:
stop();
function showMovie(linkageId, xpos, ypos) {
var linkageId :String;
var xpos:Number;
var ypos:Number;
var mc = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc._x = xpos;
mc._y = ypos;
mc.attachMovie(linkageId,dodge,this.getNextHighestDepth());
}
btn1.onPress = function(){
trace("gotem");
showMovie("FLVPlayback",0,0);
};
-
I got it to work by converting the FLVPlayback thing into a movieclip and then linking it to that movie clip. However when I try and allow multiple movies, the next movie I import also gets called FLVPlayBack and they have the same linkage id's and it won't let you change the linkage id of flvplayback so what do I do?
-
it doesn't seem to matter about that but something weird is that, I can only get it to load one video. It will load any video but only one of them. I need a way to I guess get rid of whatever just loaded.
Code:
btn1.onPress = function(){
mc.clear();
showMovie("dodge",172,-150);
};
This doens't seem to be good enough
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|