'Dynamic' movieclip references

Posted on 2003-03-18
Medium Priority
Last Modified: 2010-04-03

I am trying to find out the values of some movieclip properties. I want to be able to tell Flash to check several movieclips, so I will pass a unique value for each movieclip to the function.

Can someone please tell me why, in the following function, trace 1 returns the length of _root.movieX but trace 2 does not?

function doTraces(whichMovie)
trace('1) movie X length = ' + _root.movieX._totalframes + ' frames');

myMov = ('_root.movie' + whichMovie)
trace('2) movie ' + whichMovie + ' length = ' + myMov._totalframes + ' frames');

Many thanks

Question by:__wired__
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

Accepted Solution

mickydunks earned 200 total points
ID: 8163842
Hey Dan,

give this a go...

forget your myMov line and implement this
trace('2) movie ' + whichMovie + ' length = ' + _root["movie" +whichMovie]._totalframes + ' frames');

Where you have myMov try _root["movie" +whichMovie]


Author Comment

ID: 8163873
Wicked. Thanks Micky.

Featured Post

Independent Software Vendors: 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 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…
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…
The goal of the tutorial is to teach the user how to how to record live broadcast.
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.
Suggested Courses

764 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