Solved

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

Posted on 2008-10-11
1
265 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 500 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

777 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