Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Check totalframes against currentframe-load next child node

Posted on 2008-10-13
2
Medium Priority
?
796 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

715 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