-
1. Re: need to check of mc contains movie
Ned Murphy Feb 28, 2010 3:19 PM (in response to acid king)What kind of movie and what would make it not be where you're looking for it? What version of actionscript are you using?
-
2. Re: need to check of mc contains movie
acid king Feb 28, 2010 11:40 PM (in response to Ned Murphy)movie clip instance on stage, AS2
not where i am looking for it? what do you mean? i just need to check if there was a loadMovie action on this instance and if it contains a movie, if yes, perform an action, if not, do nothing. i was think maybe use a variable that would toggle between 1 and 0?
-
3. Re: need to check of mc contains movie
Ned Murphy Mar 1, 2010 5:03 AM (in response to acid king)You can always check if an object exists by simply testing for it... if(instance_name)...
The reason I asked why it would not be there is because I suspected it would involve waiting for a loadMovie action to have occurred. If you use a MovieClipLoader.loadClip() instead of loadMovie you can assign a listener that will be able to set a variable to indicate whether the object has been loaded or not.
-
4. Re: need to check of mc contains movie
acid king Mar 1, 2010 1:45 PM (in response to Ned Murphy)yes i should probably use if (instance) ... the scenario is that i have a continuosly playing mc, all of the frames have a loadMovie function, the mc loops and is not intended to stop playing, but on entering the same frames again i don't want it to load the movie again. Quesion is will it actually not attempt to load again when it finds that the same movie is already there? or will it unload and load again?
-
5. Re: need to check of mc contains movie
Ned Murphy Mar 2, 2010 5:45 AM (in response to acid king)If you execute the load command it will load. It will not unload unless you execute a command to unload, except... If it is being loaded into the same location it will replace whatever is in that location.
-
6. Re: need to check of mc contains movie
acid king Mar 2, 2010 7:06 AM (in response to Ned Murphy)so (suppose its loaded and no longer loading) theres no point in checking whether there's a movie in the mc i suppose, it will just ignore it when it passes over the frames again? hence its the same movie?
-
7. Re: need to check of mc contains movie
Ned Murphy Mar 2, 2010 8:28 AM (in response to acid king)If you have code in a frame that is readily executable (not sitting inside a function), that code will execute. If you re-enter that frame, the code will re-execute.
-
8. Re: need to check of mc contains movie
acid king Mar 2, 2010 10:20 AM (in response to Ned Murphy)but it can't load 2 copies of the same or any movie in 1 mc, so even if it executes nothing will happen, if it don't unload, and if nothing happens that'll be fine.
-
9. Re: need to check of mc contains movie
Ned Murphy Mar 2, 2010 11:08 AM (in response to acid king)If it executes a load command, the load will be performed. Yourbest bet at this stage is to try something and see how it works. If you have a problem, start a new posting for the new topic.