How do I loop through AFrames?
I feel dumb asking this but I really think the code I have should work. All I want to do is loop through all the aframes in a document. To do this, I assign the first Aframe to a variabe named vAFrame. Then, I created a while loop where the test is vAFrame.ObjectValid(). however, the while loop never tests to true even though the data browsers shows that the vAFrame variable contains a valid object AND it supports the ObjectValid() method AND the valid object is an AFrame. I must be missing something really obvious here. Any ideas?
main ()
function main()
{
var vDoc=app.ActiveDoc;
var vFlow=vDoc.MainFlowInDoc;
var vTextFrame=vFlow.FirstTextFrameInFlow;
var vAFrame=vTextFrame.FirstAFrame;
while (vAFrame.ObjectValid())
{
vAFrame=vAFrame.NextAFrame;
}
}
