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
Solved

attachMovie and FListBox

Posted on 2003-10-28
3
176 Views
Last Modified: 2010-04-03
Hi all,
I have a movie clip with an instance of an FListBox in it. Whenever I try to attach a new instance of this movie to the stage, the instance name of the FListBox does not get picked up and I cannot access it!

Is there any particular reason for this, and is there a suitable workaround?

Thank you,
-Dan
0
Comment
Question by:SuperMario
  • 2
3 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9640221
How do you do it?
0
 
LVL 3

Author Comment

by:SuperMario
ID: 9642894
Ordinarily I'd do something like

_root.attachMovie("myMovieLinkageSymbol", "movieClip2", 1);
movieClip2.ListBoxInstance.addItem("Screw", "This");

This doesn't work, but if I drag an instance of myMovieLinkageSymbol onto the stage, call it movieClip2, and write the same line of code, it's added.

Thanks,
-Dan
0
 
LVL 27

Accepted Solution

by:
negatyve earned 75 total points
ID: 9642958
It's normal, when you fire this line:

movieClip2.ListBoxInstance.addItem("Screw", "This");

the ListBox instance loading (initialization) is not complete. Try this way:


_root.attachMovie("myMovieLinkageSymbol", "movieClip2", 1);
movieClip2.ListBoxInstance.onLoad = function()
{
      this.addItem("Screw", "This");
};
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

828 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