Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

930 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now