Archive for the ‘ AS3 ’ Category

StageWebViewBridge Update

I have updated the StageWebViewBridge class to fix some errors as the 5.0. doNotBackup directive problem…

See more a the projects page at http://code.google.com/p/stagewebviewbridge/

How to enable iTunes FileSharing on AIR for iOS Devices

I was searching the net to find a way to enable FileSharing with itunes on my AIR for IOS app.

After some research, this is the simple way it can be done:

  • Edit your application descriptor xml file
  • In the InfoAdditions section add the next two lines of code
  • Recompile you project and update the app via iTunes
  • After sync with iTunes, your app now can share files within the app Documents directory
1
2
<key>UIFileSharingEnabled</key>
<true/>

Enjoy!!

dropbox-as3. Creating new accounts

I have made some changes in the fantastic dropbox-as3 library that allow us to create new dropbox accounts.

Example code to create a new account:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// create dropbox instance
var config:DropboxConfig = new DropboxConfig( "ConsumerKey","ConsumerSecret");
var dropAPI:DropboxClient = new DropboxClient(config);

// assign createAccount events
dropAPI.addEventListener(DropboxEvent.ACCOUNT_CREATE_RESULT, onCreationResult );
dropAPI.addEventListener(DropboxEvent.ACCOUNT_CREATE_FAULT, onCreationFault );

// call createAccount and pass ( email, password --&gt; min 8 chars, first name, last name )
dropAPI.createAccount('email@example.com','12345678','first_name','last_name');

// Event fired on success
public function onCreationResult( e:DropboxEvent ):void
{
trace( 'ACCOUNT_CREATE_RESULT '+e.resultObject.status );
}

// Event fired on error
public function onCreationFault( e:DropboxEvent ):void
{
trace( 'ACCOUNT_CREATE_FAULT '+(e.resultObject as AccountCreationError).toString() );
}

Download source code: dropbox-as3-create-account

UPDATE: This code has been merged into the original repository at http://code.google.com/p/dropbox-as3