Solved

Check totalframes against currentframe-load next child node

Posted on 2008-10-13
2
775 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

758 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

21 Experts available now in Live!

Get 1:1 Help Now