nitinmukesh123
04-20-2007, 06:30 AM
Hi All,
Just a brief overview of what i am trying to achieve.
I frequently face problem of corrupted fonts in Flash files because some smart graphic people rather then selecting the font from the list of fonts type in the box which makes it corrupt.
To solve this problem I have started creating a JSFL which will find all textfields on Stage and in library and correct the font. It works fine except in the case where the textfield is inside a group means it is grouped. This issue is solved by ungrouping an element but creates further problem with shapes :(
Suppose there is a shape on stage and is grouped and i execute the jsfl it successfully ungroup the shape but in case the shape is ungrouped and i execute the JSFL it throws an error
The function unGroup() is currently unavailable
I tried to put the condition to avoid the issues
if ((elms[i].elementType == "shape") && elms[i].isGroup){
fSelectElement(elms[i])
currentDoc.unGroup();
}
but isGroup property returns true for both grouped shape and ungrouped shape. Thats why the error and i am unable to solve the problem :(
Hope somebody can help with this..
Here is the complete JSFL
http://www.2xupload.de/file/dfd82bb334a36f2fba4934d95e48db57/JSFL.txt.html
Path to be copied
C:\Documents and Settings\<user name>\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Commands
Steps to replicate this problem:
1. Create a shape on stage. Select the shape and group it (CTRL + G).
Run the jsfl work fine ungroups the shape.
2. Create a shape on stage.
Running the jsfl throws the error.
Just a brief overview of what i am trying to achieve.
I frequently face problem of corrupted fonts in Flash files because some smart graphic people rather then selecting the font from the list of fonts type in the box which makes it corrupt.
To solve this problem I have started creating a JSFL which will find all textfields on Stage and in library and correct the font. It works fine except in the case where the textfield is inside a group means it is grouped. This issue is solved by ungrouping an element but creates further problem with shapes :(
Suppose there is a shape on stage and is grouped and i execute the jsfl it successfully ungroup the shape but in case the shape is ungrouped and i execute the JSFL it throws an error
The function unGroup() is currently unavailable
I tried to put the condition to avoid the issues
if ((elms[i].elementType == "shape") && elms[i].isGroup){
fSelectElement(elms[i])
currentDoc.unGroup();
}
but isGroup property returns true for both grouped shape and ungrouped shape. Thats why the error and i am unable to solve the problem :(
Hope somebody can help with this..
Here is the complete JSFL
http://www.2xupload.de/file/dfd82bb334a36f2fba4934d95e48db57/JSFL.txt.html
Path to be copied
C:\Documents and Settings\<user name>\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Commands
Steps to replicate this problem:
1. Create a shape on stage. Select the shape and group it (CTRL + G).
Run the jsfl work fine ungroups the shape.
2. Create a shape on stage.
Running the jsfl throws the error.