"Wacky problems using 'with' when movieclip frame labels are numbers"

Here's a problem I had using numbers for frame labels within movieclips and trying to reference them with the with statement in Flash 5.

On one layer, "Panel Layer", I have a series of 7 keyframes separated by about 3 or 4 frames each on the main/root timeline, and each keyframe has a frame label of "1.0", "2.0", and so on.

On another layer, "Clip Layer", a have movieclip instance labeled "stepcount", which on it's own timeline has an identical pattern of keyframes separated by 3 or 4 frames each, where each keyframe has a frame label of "1.0", "2.0", etc. through "7.0".

Now, on another layer on the main timeline, "Button Layer", there's a series of keyframes which match the frames in the Panel Layer (the first layer), with each keyframe having a button with the following code (this one is for the frame labeled "1.0"):
Code:
on (release) {
   with (_root.stepcount) {
      gotoAndStop ("2.0");
   }
   gotoAndStop("2.0");
}
So, basically, when the button is used, the movieclip advances to it's own frame label "2.0" on it's timeline and the main timeline advances to it's own frame label "2.0".

However, when I tested the movie, it nothing happened when I pushed the button. (There is no button at frame label "7.0" on the main timeline, so when the button disappears after 6 presses, I know it's completed the sequence.)

Now, the problem shows its ugly head when the with statement is replaced with the TellTarget statement, the deprecated predecessor of with:
Code:
on (release) {
   TellTarget (_root.stepcount) {
      gotoAndStop ("2.0");
   }
   gotoAndStop("2.0");
}
... and IT WORKS! "What's going on here?" I asked myself. So with a little further experimentation, I changed the format of all of my frame labels from "#.#" to "##", so that the frame label "2.0" was now "20", and so on for each frame label. So now my buttons had to be changed too, and the code looked like this (this one is for the frame labeled "10"):
Code:
on (release) {
   with (_root.stepcount) {
      gotoAndStop ("20");
   }
   gotoAndStop("20");
}
Something happened, but not quite what I expected. Everything on the main timeline worked the way I expected, but the "stepcount" movie clip was advanced to frame label "40" instead of frame label "20"! What the heck?! Looking at the movieclip's timeline, it turns out that the frame label "40" is was on frame #20: it was going to the frame number, not the frame label!

Hmm... and what happened when I used TellTarget?
Code:
on (release) {
   TellTarget (_root.stepcount) {
      gotoAndStop ("20");
   }
   gotoAndStop("20");
}
Yes, it worked correctly again! TellTarget works like you'd expect, but with doesn't, at least when numbers are used for frame labels.

"What about when numbers aren't used for frame labels?" you ask. Well, I asked the same question. I changed all of my frame labels from numbers to the words for those numbers, "one" for "1.0", "two" for "2.0", etc. So this is what the code in the buttons ended up looking like (this one is for the frame labeled "10"):
Code:
on (release) {
   with (_root.stepcount) {
      gotoAndStop ("two");
   }
   gotoAndStop("two");
}
Low and behold, it worked correctly. So that pretty much summed it up for me: don't use numbers for frame labels in movieclips if you plan on referencing those frame labels in code later. I checked out www.macromedia.com, and I came up with:
TechNote 14727: Naming strategies for Flash: (http://www.macromedia.com/support/fl...strategies.htm)
Avoid spaces or special characters.
Start with a letter.
Use a system for identifying type and scope of variables.
Use multi-word descriptive names.
Capitalize the first letter of subsequent words.
Match cases.
Avoid reserved words.
Declare variables with var or set variable.
Include a legend.
That, and two TechNotes: one titled "TechNote 14719: Goto actions may not work with expressions in Macromedia Flash Player 5" (http://www.macromedia.com/support/fl...expression.htm) which is similar to the situation (and probably related), but not the same. The other titled "TechNote 14732: Issues with the Macromedia Flash Player 5" (http://www.macromedia.com/support/fl...er5_issues.htm) has the following section:
Goto action not working correctly with expressions

A goTo action will fail if the argument is an expression, and if the first character resolves to a number. The player incorrectly interprets the action and goes to the frame number corresponding to the first character. This is not expected behavior. For a complete explanation and example, refer to Goto actions may not work with expressions in Macromedia Flash Player 5 (TechNote 14719)
If anyone can find anything else on this subject, I'd be interested in knowing; for now, I'll avoid using numbers for frame labels.

Hope all of you found this informative,
TotalMonkey!