Basic thing about StageWebView class is that it is used to display html content in your app. To be more clear on that it is ‘rendered above all display list content’. Now having said that you cannot place/put other content like flex controls/components like a Button or List on above it.
Packaging a native extension (Example batch file with all the options necessary to make one)
January 5, 2013There has been a lot of questions and confusion on actually writing your batch file to compile/package your ANE file. Well i have decided to create a prototype of the batch file and share it here on my blog.
Your .bat file contents are as below.
set adt_directory=C:Program FilesAdobeAdobe Flash Builder 4.6sdks4.6.0bin
set root_directory=C:Projects
set library_directory=%root_directory%NativeExtLibrary
set native_directory=%root_directory%NativeExt
set signing_options=-storetype pkcs12 -keystore "C:Projectsp12key.p12" -tsa none
set dest_ANE=%root_directory%nativeExtPackagingANE.ane
set extension_XML=%library_directory%srcextension.xml
set library_SWC=%library_directory%binNativeExtLibrary.swc
set SWF_directory=%library_directory%binNativeExtLibrary
"%adt_directory%"/adt -package %signing_options% -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Android-ARM -C "%SWF_directory%" library.swf -C "%native_directory%" NativeExt.jar
Below explaining the variables in your bat file.
root_directory – root folder of your flex projects.
library_directory – location of your Native extension wrapper Flex library project.
native_directory – location of your native extension project(for Android-ARM it will be android project location).
signing_options – signed certificate for your extension and its options (-tsa none option to discard timestamp).
dest_ANE – location to create your ane file.
extension_XML – location of Native extension wrapper Flex library project extension descriptor file.
library_SWC – location of your Native extension wrapper Flex library project compilation file.
SWF_directory – location of your library.swf file.
Android-ARM – packaging ane for Android
Interaction Mode in Flex
December 28, 2012Interaction mode defines how you allow your app to interact with an app user. Interaction mode is again based on Theme you choose for your app, namely Halo, Spark, Modile. Default Interaction mode for Halo, Spark is mouse and for Mobile its touch.
But what if you want a different interaction mode rather than the default one, well its simple to change by using ‘interactionMode’ property and its usage is given below.
Load schema and access the loaded schema of database in SQLite, AIR.
December 21, 2012As always lets do things in steps.
- Create necessary variables.
- Open connection to database file already created.
- Read schema from opened connection to database.
1. Create necessary variables
private var sqlConnection:SQLConnection; private var dbFile:File; private var sqlStatement:SQLStatement;
2. Open connection to database file already created
dbFile=new File(); dbFile=File.applicationStorageDirectory.resolvePath("myDatabase.db"); sqlConnection = new SQLConnection(); sqlConnection.addEventListener(SQLEvent.OPEN, onDBOpened); sqlConnection.addEventListener(SQLErrorEvent.ERROR, onDBError); sqlConnection.open(dbFile);
3. Read schema from opened connection to database
Read the rest of this entry »
Tips on Spark List control and Spark DataGrid control
May 30, 2011In Halo DataGrid control and Halo List control you would use the property scrollToIndex(index:int) to specify to make the item at that index visible.But in Spark List control and Spark DataGrid control you should use different properties like below.
For Spark List
ensureIndexIsVisible(index:int);
For Spark DataGrid (version 4.5)
ensureCellIsVisible(index:int);
and then there’s also setSelectedIndex(index:int); for Spark DataGrid
Enjoy the tip.