PDA

View Full Version : A class vs. frame script mystery


rakaloof
07-18-2005, 11:00 AM
I usually never use actionscript in frames, and generally always make class .as files which, if I only need one instance of them, import as a Movie Clip symbol with linkage to the class. I'm not sure if this is the common way, or if there are other ways, anyhow I'd be glad to hear about it.

To the mystery: This time I used my usual method and in this application I have a Movie Clip with three ComboBoxes in it. And the mystery is that when I have my functions and variables in a class imported as a Movie Clip symbol, the program seems to get stuck in an infinite loop when the ComboBoxes are used. This although this perticular class has nothing to do with the ComboBoxes.

My solution to the problem was that I just copied over the entire class into the _root frame script (without the actual class definition of course). Although this works fine I have no idea why it works and personally I think it's a very ugly solution and it wouldn't have worked if I had more than one class.

Does anyone have any ideas? For me there's just no logical explanation..

Thanks in advance.

/Dan-Martin

snapple
07-18-2005, 03:19 PM
How do you know it's an inifnite loop that is causing the problem?

rakaloof
07-18-2005, 06:38 PM
With infinite loop I was trying to describe the application reaction when the ComboBoxes where used. The program actually freezes. The cause I don't know anything about, since it's such a strange problem. Do you have any ideas?

Thanks.

cancerinform
07-18-2005, 07:37 PM
May be this explains:

http://flashscript.biz/components/comptricks/combo.html

You can also just place a combobox into the library of your movie.