# Totally perplexing preloader

**URL:** <https://forum.kirupa.com/t/totally-perplexing-preloader/139293>\
**Category:** Uncategorized\
**Created:** [March 2, 2005, 12:00am UTC](https://forum.kirupa.com/t/totally-perplexing-preloader/139293 "2005-03-02T00:00:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellare](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@ellare](https://forum.kirupa.com/u/ellare)\
**Post date:** [March 2, 2005, 12:00am UTC](https://forum.kirupa.com/t/totally-perplexing-preloader/139293/1 "2005-03-02T00:00:16Z")

</div>

why does this happen?  
i built this preloader and it works fine … until i add the information that is supposed to be loading while the preloader works.

at the “start” frame starts my embedded video clip

bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadbar.\_width = getPercent\*100;  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(“start”);}

//this counts button clicks  
var i = 0;  
filenamea = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);  
trickBtn.onPress = function() {  
a = filenamea.length;  
k = Math.floor(Math.random()_a);  
m = Math.floor(Math.random()a);  
this.\_x = k20; //randomly x axis of moves button  
this.\_y = m_20; // randmomy moves y axis of button

i++;  
trace(i);

if (this.\_x \>= 410) {this.\_x = 400} //limit x value to screen size  
if (this.\_y \>= 280) {this.\_y = 270} //limit y value to screen size  
if (this.\_y \<= 5) {this.\_y = 10}//limit y value at top of screen

if (i == 10) {  
\_root.loadMessage = "Isn’t this annoying? ";  
}  
if (i==12) {  
\_root.loadMessage = " ";  
\_root.loadMessage2 = “message 2 here”;}  
if (i==15) {  
\_root.loadMessage2 = " ";  
\_root.loadMessage3 = “message 3 here”;}

if (i==18) {  
\_root.loadMessage3 = " ";  
\_root.loadMessage4 = “message 4 here”;}

if (i==25) {  
\_root.loadMessage4 = " ";  
\_root.loadMessage5 = " ";}

if (i==29) {

\_root.loadMessage4 = " ";  
\_root.loadMessage5 = “You can keep clicking until your movie starts if you want to”;  
this.\_x = 400;  
this.\_y = 50; }

if (i==30) {  
\_root.loadMessage5 = " ";  
i = 0;}  
};

on frame 2 i have  
this.gotoAndPlay(1);

NOTHING works if i do not have this script in frame 2

once i put these actions on frame one before my embedded video (which starts at frame 5 labeled as “start”) - my loadMessage dynamic text boxes will not do anything. the button works, but the loadMessage etc. dynamic text boxes do not work/

same thing happens for another preloader i built where on a button click a movieclip plays - as part of the preloader. once i add the embedded video frames that are loading while the preloader plays, the buttons that are supposed to play a certain movie clip do not play the movie clip.

please help. i can email FLAs if needed, they are too big to post on here.

Thanks!
