View Full Version : function help
02-09-2004, 08:33 PM
For a while I have been attempting to write this “function” that would open a set of doors on this site when the mc has loaded. On _levelx when a mc loads and the getTotalBytes ==100% (I am using a text field that will display “100%”when completed loading) which will evoke the doors to open. And this will be called for every mc that is loaded into this level. If the mc has not loaded (and the total bytes do != 100% the lights a loading stuff will continue to play until mc has loaded. I would have loaded the mc but it is in like 15-20 separate mc to decrease the load time and, I think, better functionality. You may view the site to get a better understanding of what I am trying to do http://www.profilespc.com/glassnpowder/
If you click on “shop” and then click on “snowboards” you will see it work, but it is not the way I want it to. I am using this for a work around
bLoaded = _parent.getBytesLoaded();
bTotal = _parent.getBytesTotal();
factor = Math.ceil(bLoaded / bTotal * 100);
if (factor < fcomp)
percentloaded = factor + "% LOADED";
} // end if
It takes a second or two to load and I have not implemented any preloads yet.
I have reviewed many books and tutorials but they don’t seem to go into detail what I am trying to accomplish or more than likely I am just not getting it. I am extremely frustrated by now. If something close to this has been asked and answered I apologize. I searched this site. If I have over looked a explanation or tutorial please refer me to it. Here are some peripheral questions:
Am I going about this the best way?
Is there a better way?
How would I have the doors close and then load the next mc when the user has pressed a button to load a new mc?
Thank you for any assistance you can lend. Peace
02-11-2004, 09:43 PM
OK! No one is going to help. Cool. This site is pretty useless people. This is the second time I have posted a ?? and no help. Is it that you have no idea or have I “not followed the geek, I mean correct procedure of posting a ? Can you guys get your heads out of you’re a$$ for one second. Give a dogg a bone here! I would accept any light shined on this subject, reference, tutorial, a hint or something. I will probably be banned from this site now. Man! If I have posted in the wrong forum or something at least let me know. I guess it’s time to move on. Nice! I am crushed!
02-11-2004, 10:08 PM
Originally posted by Dev-Ash
OK! No one is going to help. Cool. This site is pretty useless people. This is the second time I have posted a ?? and no help. Is it that you have no idea or have I “not followed the geek, I mean correct procedure of posting a ? Can you guys get your heads out of you’re a$$ for one second. Give a dogg a bone here! I would accept any light shined on this subject, reference, tutorial, a hint or something. I will probably be banned from this site now. Man! If I have posted in the wrong forum or something at least let me know. I guess it’s time to move on. Nice! I am crushed! Woah... Nice... Have a nice life... You are saying as if we are bound to help you... It's not like the forum is paid support section... It is voluntary job... :confused:
If I were you, I wouldn't brag about why other people are not helping you... I'd rather spend that time and energy to make some sample that tells what you are trying to do to boost your chance... But then, what useless people can do for you, right??? :mad:
02-11-2004, 10:11 PM
Finally a response. But it's too late. Have a nice life!!
02-11-2004, 10:13 PM
Yeah, whatever... :)
02-11-2004, 10:21 PM
I dear u to list your home page or are u only man/ or girl enough to stand behind your anonymous name. Your action shoes me that all your concerned about is yourself not helping people. You would rather sit here and flame me rather than help me. The entire purpose of this site I thought was to help people. I guess not. Also it hurts to know that people are reading but not helping. You should be so happy with your 5000th post. If they are anything like what you posted just now, they should mean nothing. Thanks.
02-11-2004, 10:22 PM
I mean dare, before you flame me on spelling.
Why are you so hostile? And CyanBlue has helped me on a number of occassions, so I'd say the forum works just fine.
02-12-2004, 05:18 AM
This guy is fairly amusing... :D
Let me tell you WHY you did not get the answer for your qeustion...
I am sure you have no eyes for searching since you don't know where I hid my name... ;)
What you have asked is very common preloader problem which has been asked more than thoughsand times... Do I want to answer another preloader question??? No... Would you do the same thing over and over with no merit on it??? I don't think so... I am sick of answering those questions... But your example looked interesting... So, I said that you might want to make some sample so that it might boost up your chance for getting an answer which can be easily found by searching the forum... If you don't want to do it, that's fine... :)
BTW, the post count does not mean anything to me... and I have not picked on your spelling before and I don't think I am going to waste my time on that either... But you should really know how to type though for your own good... :)
02-12-2004, 07:22 AM
I know it looks like a simple preloader but I want to make it a function so I can reuse the code for different mc loading into a level. I want to put the code on the first frame of the main mc. This function would load an external mc into level14. My door mc is sitting on level15 with doors “closed” when the bytesTotal == 100% the function sitting on the main timeline will tell the doors sitting on level15 to open. The external mc would have loaded into level14.
I don’t want to rite the code on every external mc. This is my goal.
Can I use the dynamic text box on a different level, level5, when the when the getbytesTotal== 100 and that is displayed in the text box the doors will be invoked.
Should I use a trace action to see if the doors are open? I have an idea about how the trace command works but not 100%.
Look I really have searched everywhere on this site and many others for a function like this and I have read many many books I haven done the Lynda.com video tutorials. I am just not getting how turn something even as simple as a preloader into a reusable function.
So in a nutshell I would like to use a preloader turned function script on the main timeline of the main mc sitting on level2 interacting with 3 separate external mc sitting on or being loaded into 3 separate levels.
I can’t find anywhere an example of a preloader that will do all this. I know it appears to be a simple preloader but I think if you look closer you will see that it’s not. If you still believe it’s simple just tell me to go away and I will understand, cast me out into the world amongst the wolves.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.