Sublime Forum

as3 import libraries

#1

In every AS3 class there’s an import statement for using external classes.

Usually something in this form

//Adobe
import flash.events.Event;
import flash.display.Sprite;
import flash.utils.*;

The current AS3 package does not recognize Adobe’s libraries… and in Textmate there was a very useful command to auto import a class. You would write “Sprite” press a command, and you got “import flash.display.Sprite” automagically written.

I’m thinking about findin a solution to this problem, not necessarily using a command. My skills aren’t that good… so I’d like to find a simple way to do it.

I’m thinking of typing “import” press tab. Choose “flash” from a list, then choose “display” from a list, then choose “Sprite” from the final list.

What would be the best approach?
Is there a way to solve this with snippets?

TIA

0 Likes

#2

I’ve been reading about completion lists, in the sparse documentation…

I know I could simply write all classes with their namespace in a .sublime-completions file. But… is that the best approach in terms of performance?

Would it be possible to create some kind of conditional nested completion list with Python?

0 Likes