I am working to make a script to interact with flash and in doing so I am forced to deal with non-existent objects. That is, at any point in time the object may or may not exist. I started out by writing a very rough conceptual program to make sure I could successfully timeout until objects exist and then click on them and through some effort I got that to work. However, I want modularity in the program and need to find a way to pass non-existent objects into a function that waits for the object to exist. An example of what I mean - This is the code that works: This is the code that does not work - I get the error that the passed object does not exist Code: on LoadObject(targetObject, targetName, loadThreshold) set loadTime to 0 log_event("Loading " & targetName & "... " & loadTime) repeat with loadTime from 0 to loadThreshold try if targetObject exists then log_event("Loaded " & targetName) return true else delay 1 log_event("Loading " & targetName & "... " & loadTime) end if end try end repeat log_event("Failed to load " & targetName) return false end LoadObject Furthermore, in this code, I get the error that the object does not exist and cannot pass it Any tips would be much appreciated!