Solved

Check totalframes against currentframe-load next child node

Posted on 2008-10-13
2
784 Views
Last Modified: 2013-11-11
Hello All,

I am having some issues for some reason getting my code straight for this test project I am doing.  I have an XML file that I am using to manage and load external swf's into a "wrapper" exe file.

I would like to write a bit of code that will evaluate the total frames of a swf and when that swf reaches a certain current frame it calls the next child node in the XML.

I thought that would look something like this but I am afraid I am wrong.

function checkFrames (){
for (i=1;i<dZone._totalframes;i++){
//_____call to the next child node_____\\
}

thanks for your help,

-FB
0
Comment
Question by:frankybones
2 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 250 total points
ID: 22708290
below is the sample code, update it as per your requirement...
var intId = setInterval(this, 'checkFrames', 100);
function checkFrames() {
	if (dZone._currentframe>=20) {
		clearInterval(intId);
		trace("reached frame number 20");
	}
}

Open in new window

0
 

Author Closing Comment

by:frankybones
ID: 31505688
Excellent response and great timing...thanks again for all of your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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. …
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.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

820 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