My mind is blanking on how to do this right. It's been a while since I have done much AS3.
I have a movieclip that contains 4 different states. Each on an individual keyframe. Content needs to be added to each of these states, however you can't do that because the state doesn't exist on the frame where you're adding content. A loop runs through multiple instances of this movieclip to add content to.
Simplified and shortened version (gets error because target "textFillArea1" doesn't exist when this runs):
function contentMedia ()
{
var textFillArray:Array = new Array(Lots of things in here);
var contentSelector:MovieClip;
for (var i:int; i<textFillArray.length; i++)
{
var textFillBox1:TextField = new TextField();
textFillBox1.htmlText = textFillArray[i];
contentSelector = MovieClip(contentPanel.getChildByName("contentArea" + i));
contentSelector.textArea.textFillArea1.addChild(textFillBox1);
}
}
Any ideas?
Any good actionscripters?
Moderator: Ghost Hip
- jfrey
- Supporter

- Posts: 5240
- Joined: Wed Apr 14, 2010 10:58 am
- Location: Boston, MA
Any good actionscripters?
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
My music rec Twitter: https://twitter.com/MostlyEssentialfriendship wrote:one cool thing about living is that things get worse and worse and worse until you die
- jfrey
- Supporter

- Posts: 5240
- Joined: Wed Apr 14, 2010 10:58 am
- Location: Boston, MA
Re: Any good actionscripters?
Well nevermind. I figured out what to do.
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
My music rec Twitter: https://twitter.com/MostlyEssentialfriendship wrote:one cool thing about living is that things get worse and worse and worse until you die
- snipelfritz
- IAMILFFAMOUS

- Posts: 11703
- Joined: Fri Dec 31, 2010 7:28 pm
- Location: Milwaukee
Re: Any good actionscripters?
For a second I thought this was another bot thread.
BOOM-SHAKALAKALAKA-BOOM-SHAKALAKUNGA
Behndy wrote:i don't like people with "talent" and "skills" that don't feel the need to cover their inadequacies under good time happy sounds.
- jfrey
- Supporter

- Posts: 5240
- Joined: Wed Apr 14, 2010 10:58 am
- Location: Boston, MA
Re: Any good actionscripters?
snipelfritz wrote:For a second I thought this was another bot thread.
Nah. I just didn't want to work late again today. Figured I'd go out on a limb and see if anyone here knew about AS3 coding. Ended up figuring out a workaround though.
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
My music rec Twitter: https://twitter.com/MostlyEssentialfriendship wrote:one cool thing about living is that things get worse and worse and worse until you die