|
-
Hi...
I have added some custom functions to movie clips via the prototype method (in level0)...and I'm just curious whether these functions will be inherited by movie clips in loaded movies on higher levels...or whether each movie needs to include it's own prototype function declarations...
TIA,
K.
-
President, save the New Zealand dollar foundation
prototype method?
whats that?
If your function is resident in _level0 then it won't be resident in any other _level unless you put it there also....
you can always call a function from anywhere though:
_level0.functionName(args);
-
President, save the New Zealand dollar foundation
turned to the manual,
yeah I get it, very cool method 
I don't think it applies across _levels, but I'd give it a try anyway (you never know with flash)
I'm pretty sure it only gets applied to instances created with the custom function,
and it looks to me like you also have to pass inheritence -
name the prototype properties of a function so that any new objects it creates can use the __proto__ values
cool to play with
8)
-
Hi...
Having done a bit of testing on this, it appears that the scope of the prototype functions is the Flash Player instance itself...so as long as one of the loaded movies declares the custom functions, they are accessible to all loaded levels...

K.
-
All *movieclips* can use the functions you set in the Movieclip prototype object:
Code:
Movieclip.prototype.tracer=function(){
trace("im saying hello from +"this)
}
_level1.tracer()
-
President, save the New Zealand dollar foundation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|