Flash global search and replace
When developing a flash file, is it possible to do a global search and replace throught the entire file or do you have to go through each clip/button code individually?
| SitePoint Sponsor |
Flash global search and replace
When developing a flash file, is it possible to do a global search and replace throught the entire file or do you have to go through each clip/button code individually?





I think you'll have to go through each clip and button individually. Could this be fixed by changing something in the first frame? What is it you are trying to change?
i need to change the paths as set because i need to put the file into a placeholder.
if you include the placeholder path in the file initially, it won't work in the flash development device.





I think it can be done but I am still a little fuzzy on what needs to be changed as
is pretty vague, could you elaborate a little more?i need to change the paths as set because i need to put the file into a placeholder.
when developing the site, i create a path say,
_root.square1
this allows me to test the site as i am developing it
however, the final swf will be put into a placeholder in another .swf say, placeholder3
therefore i need to change the
_root.square1
to
_root.placeholder3.square1
right throughout the program.
i suppose creating a placeholder file in the directory
where the main file is might work???





Okay I see what you are saying, well normally I would use relative paths when working in movies that will be loaded into placeholders. Thus seeing the need for global search and replace. I think you are gonna have to do it manually. But by using _parent. or even _parent._parent you can keep this problem from happening.
Thanks for your help.
Please explain how i use _parent in conjunction with
_root.placeholder3.square1





Where are you referring to square1 from, if its in the movie that holds square1 its this.square1 or in a movieclip _parent.square1. Am I missing how you are trying to use this.
so that instead of using
_root.placeholder3.square1
ie root of placeholder.swf which holds an empty movie clip called placeholder3 which holds mysquares.swf which contains a movieclip called square1
i use
_parent.square1
????





If you are referring to square1 from within mysquares.swf yes use this.square1 instead of _root.placeholder3.square1 or if you are inside of a movieclip within mysquares.swf _parent.square1
If you are referring to square1 from within
placeholder.swf then you already know the path since you used createEmptyMovieCLip to create placeholder3.
Originally posted by freddydoesphp
If you are referring to square1 from within mysquares.swf yes use this.square1 instead of _root.placeholder3.square1 or if you are inside of a movieclip within mysquares.swf _parent.square1
THIS I NOW UNDERSTAND
If you are referring to square1 from within
placeholder.swf then you already know the path since you used createEmptyMovieCLip to create placeholder3.
THIS I DON'T UNDERSTAND because i created the empty movie clip manually, not with createEmptyMovieCLip.
Please gimme a clue!





I'll give a try.
Since when you are viewing mysquares.swf through placeholder.swf, you already know the name of the blank movieclip that will hold mysqaures.swf. So you can code inside of placeholder.swf as such like _root.placeholder3.square1, but in mysquares.swf this movie does not know what placeholder is going to be called, so you should use relative paths, its as simple as that.
Thank you very much.
![]()
Bookmarks