Functions

part 1:\r\ri have this little mc that i want to play before every new mc (i.e. ‘about us’ mc; ‘services’ mc and so on) to give the impression that something is loading (it’s just eye-candy, really). \r\rhttp://www.tnlc.co.uk/z/loading.htm\r(it’s a bit rough, though)\r\rnow…\r1 do i place this mc somewhere in the timeline and give it a label (playLoading) then create a function that accepts a string (frameLabel) and call it from my buttons?\r2 do i place the mc in a layer on it’s own (or maybe a layer that contains only mc’s called up by functions? \r3 can i call the mc ‘into existence’ without having to place it anywhere?\r\rpart 2:\r\ri want each button to:\r1 call the loading_mc\r2 then go to the appropriate label\r\ri’ve got this:\r\ron (release) {\r _root.gts(“playLoading”);\r if (_root.playLoading_mc.finished=true) {\r _root.gts(“about_us”);\r }\r}\r\ri’ve created a var called finished and placed it at the end of the playLoading mc, and i’m trying to get the button script to check whether the condition is true. but at the moment the code seesm to run straight through to about us\r?\r\r

hmm\r\rthis is prob not the best way to do this, but i thought i might just call the playLoadng clip from the button, and then at the end frame of the playLoading insert another call to the function, passing it the labelName variable which it gets from the button\r\rbut the button doesn’t seem to pass it the var\r\rin the button i have this:\r===\rlabelName = “about_us”;\r_root.functionname(playMovie);\r===\r\rthen the playLoading movie plays and on teh last frame i have a new call to the function:\r===\r_root.functionname(labelName);\r===\r\rthe labelName should be about_us, because it came from that button, but it seems to be empty\rdoes the variable expire when i try and pass it to something other than a function?

I’ll apologize for the quick answer… I’ll come back and edit, if needed.\r\rTwo things:\r\r1) you can call/load the mc without placing it anywhere. Just use the attachmovieclip() method.\r\r2) you’re not evaluating your values properly.\r \r If you’re trying to check to see if something is true or false, use == \r\rI believe in your code you typed if(something=true){\r\rwhen it should say if(something==true){\r\rhope this helps.\r