-
executing script in a child swf
Is there any way to execute some actionscript in a child swf from the parent without actually having the script in the child swf,or having to add a callback.I'm new to flash so i don't know what can be done,or if it's easy to do.to be more specific,i need search a array.
ANY help would be thanked......
-
What do you mean execute script in a child swf without having script in the child swf? That doesn't make any sense.
Where is the array you need to search? Where do you need to trigger the search from, and where do you need to use the result?
-
You must know that it's possible to call some functions in a child swf from the parent,and what i'm trying to say is,what if you want to execute a function but don't have it already in the child swf?Can you maybe inject it in?Or is there some method i have overlooked?,i want to trace the results,and instead of displaying it in the output panel,i want to show it in a text box.
-
You are asking if you can inject a method into a child SWF that does not already exists? Sounds like kind of a security risk.
As far as I know, you can only call methods of child SWF that have been created in the child (i.e., already exists). If you know the variable name of the array you need to search, maybe you can access it if it is public.
-
If your child swf is a MovieClip, you could use the undocumented addFrameScript method to inject timeline code. This will overwrite any code that's already on that frame.
Otherwise, you might be able to do something with a plain Function (not a method bound to a class or instance) and the call or apply method of that function, passing the child swf as the thisArg.
But the fact that you think you need to do this is a big red "bad design" flag to me.
-
You guys have helped me a lot,I have seen it done in as2 but never in as3.it was a flash file designed to debug the child by the listvariables method and compiled into a exe by swfkit,you could add some script in the soft too, so I don't know if the scrpt was from the swf or the exe(i did not make it)in the end it just traced it.so you could do the same with debug,but anyway I know now sth I did not.where did you hear of addframescript?I have never until now.how do you use it?,explian some more
-
IT works!!!!!!!!!!!!!!!!!!
THANK YOU!
accept my thanks.~o(≧v≦)o~
Tags for this Thread
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
|