Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-11
1
Medium Priority
?
272 Views
Last Modified: 2013-11-11
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/


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

0
Comment
Question by:jmanstorm
1 Comment
 
LVL 39

Accepted Solution

by:
blue-genie earned 2000 total points
ID: 22697437
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.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question