Page 1 of 1

Any good actionscripters?

Posted: Tue Aug 02, 2011 2:02 pm
by jfrey
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?

Re: Any good actionscripters?

Posted: Tue Aug 02, 2011 4:19 pm
by jfrey
Well nevermind. I figured out what to do.

Re: Any good actionscripters?

Posted: Tue Aug 02, 2011 8:27 pm
by snipelfritz
For a second I thought this was another bot thread.

Re: Any good actionscripters?

Posted: Tue Aug 02, 2011 9:41 pm
by jfrey
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.