Home Download Buy Blog Forum Support

as3 import libraries

as3 import libraries

Postby pier on Tue Nov 06, 2012 1:56 am

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

Usually something in this form

Code: Select all
//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
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: as3 import libraries

Postby pier on Tue Nov 06, 2012 2:47 am

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?
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 21 guests

cron