Drahcir
Drahcir

Reputation: 11972

Working with OOP and TimeLine

I'm having a problem using flash CS6 (or CS*), where I want to be able to create symbols in the interface and link them to an as3 class. The problem is that when editing the class the code hints don't work correctly, i suppose because the CS* interface doesn't tell the code the object types.

For example:

I create a symbol and link it to a class (myclasses.SomeDisplayObject) I now create and edit this class in the flash pro code editor, but the editor doesn't know any of the object properties.

To combat the problem I've been creating private properties on the class and assigning them in the construct. This way I can set the type and code hinting works. This is a real nuisance and I have in one class 50 lines of variable assignments.

There must be a better way of doing it and I'm hoping someone here knows about it.

Upvotes: 0

Views: 88

Answers (2)

Amy Blankenship
Amy Blankenship

Reputation: 6961

Just turn off "declare stage instances automatically" and declare them as public properties. For more specifics on how to deal with OOP on the timeline, check out http://www.developria.com/2010/04/combining-the-timeline-with-oo.html and http://www.meetup.com/atlflex/files/

The IDE (or any other code tool you choose to use, like Flash Builder), should then recognize your instances.

Upvotes: 1

Will Kru
Will Kru

Reputation: 5212

You could use a different editor. For instance, there is FlashDevelop

Upvotes: 1

Related Questions