# Loading dynamic text into swf loaded into a preloader

**URL:** <https://forum.kirupa.com/t/loading-dynamic-text-into-swf-loaded-into-a-preloader/262033>\
**Category:** Uncategorized\
**Created:** [June 2, 2008, 8:05pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-into-swf-loaded-into-a-preloader/262033 "2008-06-02T20:05:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![askneevel](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@askneevel](https://forum.kirupa.com/u/askneevel)\
**Post date:** [June 2, 2008, 8:05pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-into-swf-loaded-into-a-preloader/262033/1 "2008-06-02T20:05:17Z")

</div>

Does that title make any sense?  
I’m loading a .swf into a preloader, which is working fine. Here’s how the preloader’s working:[INDENT][SIZE=1][COLOR=Blue]var myMCL:MovieClipLoader = new MovieClipLoader();[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]var myListener:Object = new Object();[/COLOR][/SIZE]

[SIZE=1][COLOR=Blue]myMCL.addListener(myListener);[/COLOR][/SIZE]

[SIZE=1][COLOR=Blue]myListener.onLoadProgress = function(target\_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue] var loaded:Number = Math.round((bytesLoaded/bytesTotal) \* 100);[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue] progressBar.gotoAndStop(loaded);[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]}[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]myListener.onLoadInit = function (target\_mc:MovieClip) {[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue] progressBar.\_visible = false; [/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]}[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]myListener.onLoadStart = function (target\_mc:MovieClip) {[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue] progressBar.\_visible = true;[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]}[/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue]myMCL.loadClip(“[http://www](http://www).\*\*\*\*[bird.org/main\_preloaded.swf","container](http://bird.org/main_preloaded.swf%22,%22container)”);[/COLOR][/SIZE]

[/INDENT][SIZE=1][COLOR=Blue]  
[COLOR=Black][SIZE=2]I’m running into trouble though when I try to dynamically load text into the swf loaded into “container.”  
Here’s the code that I’ve used to get the text into that swf when it’s not preloaded:

[/SIZE][/COLOR][/COLOR][/SIZE][INDENT][SIZE=1][COLOR=Blue][COLOR=Black][SIZE=2][SIZE=1][COLOR=Blue]myData = new LoadVars();[/COLOR][/SIZE][/SIZE][/COLOR][/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue][COLOR=Black][SIZE=2][SIZE=1][COLOR=Blue]myData.onLoad = function(){[/COLOR][/SIZE][/SIZE][/COLOR][/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue][COLOR=Black][SIZE=2][SIZE=1][COLOR=Blue] newstextbox.news.htmlText = this.news;[/COLOR][/SIZE][/SIZE][/COLOR][/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue][COLOR=Black][SIZE=2][SIZE=1][COLOR=Blue]};[/COLOR][/SIZE][/SIZE][/COLOR][/COLOR][/SIZE]  
[SIZE=1][COLOR=Blue][COLOR=Black][SIZE=2][SIZE=1][COLOR=Blue]myData.load(“[http://www](http://www).\*\*\*\*[bird.org/mainnews.html](http://bird.org/mainnews.html)”);[/COLOR][/SIZE][/SIZE][/COLOR][/COLOR][/SIZE]

[/INDENT]My hope was to just add “\_root.container.” to the beginning of line 3 there and have it work. It doesn’t though, I just wind up with “undefined.” in the text box.

Any help is much appreciated!
