Question : listener to gotoandplay in the loaded swf file and not container swf file on complete

I put the below code in a file called trailer.swf. The trailer.swf is loaded into main.swf. I want the trailer.swf to gotoandstop on frame ten in trailer.swf and not main.swf. What is the necessary syntax..?
this. doesnt work nor does root.

Your Help is appreciated...here is the link to the website

http://btcmovie.com/btcultimate/phase1/

Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
import mx.video.*;
this.attachMovie("FLVPlayback", "my_FLVPlybk", 1, {width:640, height:360, x:147.6, y:-21.5});
 
this.my_FLVPlybk.width = 640;
this.my_FLVPlybk.height = 360;
this.my_FLVPlybk.contentPath = "http://journeybeyondthechair.com/preview/flv/640by360.flv";
this.my_FLVPlybk.skin = "http://journeybeyondthechair.com/flash/ClearExternalPlaySeekMute.swf";
 
var listener = new Object();
listener.complete = function(evt)
{
  removeMovieClip(my_FLVPlybk);
gotoAndStop(10);
}
this.my_FLVPlybk.addEventListener( "complete", listener );
Open in New Window Select All

Answer : listener to gotoandplay in the loaded swf file and not container swf file on complete

you can't use this because this will refer to the listener object.
so how you target your trailer.swf file will depend on how you loaded it.

i.e. if you used loadMovieNum("trailer.swf", 1);
then you'll target it with _level1.gotoAndStop(10);

etc.

Random Solutions  
 
programming4us programming4us