11
May
08

Adobe Share ActionScript library goes community - Updated! Now with PDF Support!

sharelogolong.jpg

Don’t you just love an exciting headline. If you haven’t heard by now, Share (Document Services API) is an online service provided by Adobe that allows you to share, publish, and organize documents online. Share is already a good service, but it can be an even better service with a little help from all of us. How can we make the service better?

1. Use the service and give feedback on the Share Forum. Whether you’re happy or not they want to hear about it. Have a feature idea, pass it on.
Share Forum
Share API Forum

2. Tell other people about the service. Its 1gb of free space for your documents. Who doesn’t like free.
https://share.acrobat.com

3. Create and share your own projects around the service.

4. Contribute to open source projects that use the Share API.

There are many open source libraries that allow you to easily use the Share Service in your applications (listed at the bottom). One of these libraries is the ActionScript library. Developed internally at Adobe, it has the full original functionality of the service but has fallen behind in the latest revisions of the Share Service. So when speaking to Fang Chang (Adobe Product Manager in charge of the Share APIs) this past week I offered to help bring an updated version of the ActionScript library into the hands of the community. Fang who is a very patient man, (listened to all my feature idea ramblings) felt like it would be a great move. So here we are.

What has been done?

1. The as3 library has been updated to work with the new endpoint and pdf creation support has been added
2. Updated AirShare demo for the release version of AIR.
3. The code has been checked into subversion

4. Documentation has been generated

5. A release has been made that includes the updated source/example.

Example of upload with pdf creation:

import com.adobe.share.api.ShareAPIToken;
import com.adobe.share.api.ShareAPIEvent;
import com.adobe.share.api.ShareAPIUser;
import com.adobe.share.api.ShareAPI;
 
private var _shareAPI:ShareAPI = new ShareAPI("<api key>", "<secret>");
private var _shareAPIUser:ShareAPIUser = new ShareAPIUser("<share user name>", "<share password>");
 
private var _file:File = new File();
 
private function initApp():void{
	var shareAPIToken:ShareAPIToken = _shareAPI.login(_shareAPIUser);
 
	shareAPIToken.addEventListener(ShareAPIEvent.API_AUTHENTICATED, function():void{
		_file.browse();
		_file.addEventListener(Event.SELECT, onFileSelected);
		_file.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, onFileUploadComplete);				
	});
 
}
private function onFileSelected(event:Event):void{
	_shareAPI.uploadFile(_shareAPIUser, _file, null, _file.name, "", true, true);
}
private function onFileUploadComplete(event:DataEvent):void{
	trace("complete");
}

Want to contribute to the Library?
Please contact me or select join from the project site.

Other Share Libraries:
Java Library
Ruby (Developed by Hideyuki KATO) Ruby
Python (Developed by Vivek Kapoor) Python
Cold Fusion (Developed by Ray Camden) Cold Fusion


7 Responses to “Adobe Share ActionScript library goes community - Updated! Now with PDF Support!”


  1. 1 Chris Charlton May 11th, 2008 at 8:03 pm

    When will we see BuzzWord have Share integration… and Brio love too? I smell a tri-force there.

  2. 2 admin May 11th, 2008 at 9:04 pm

    Agreed Chris, I to enjoy a good tri-force. Possibly throw some digital editions into the mix as well. :)

  3. 3 Erik Lembke May 12th, 2008 at 3:58 am

    Hi Steven,

    the source is still only for Adobe AIR, right? Do you know if there is already a Flex/Flash version? The problem with the authorization header - which is only allowed to send via AIR - is really bad and my hope was a modified official release for Flex/Flash.

  4. 4 admin May 12th, 2008 at 8:23 am

    Hi Eric,

    Good point. This is true, the current version is limited to AIR. However, with the release of flash player 9,0,124,0 it should now be possible to change this. The auth header is no longer blacklisted but does require a crossdomain.xml that is setup to allow it. Here is an excerpt from an article on developer connection about it.

    “Flash Player will continue to allow any header not on the blacklist to be sent to the host of the SWF, and additional headers will be added to the blacklist as needed. As a result of this new security feature, the HTTP Authorization header, which was added to the blacklist in Flash Player 9,0,115,0, will be removed from the blacklist but will follow the new cross-domain policy file rules.”

    http://www.adobe.com/devnet/flashplayer/articles/flash_player9_security_update.html

    allow-http-request-headers-from

    So the next step is to put in a request for this change.

    I would also be interested in knowing what you’ve used the library for up til now? and what you would use it for if this was opened up?

    - Steven

  5. 5 Erik Lembke May 13th, 2008 at 1:14 am

    Hi Steven,

    this sounds very good. I’ll try that and hopefully all my sorrow will be gone.

    Our team is currently working on the first online 3D modeling application based on Papervision3D. The concept is a server-side file management which allows users to store their work and also share it among each other.

    As I noticed Adobe SHARE last year I was impressed from the features. I contacted Fang Chang and talked to him about our project and the plans we got on an implementation of Adobe SHARE. Since the project will be mainly free of charge we got permissions do it.

    If you are interested in the project itself you can see some preview videos on http://www.g-nero.com

    Thanks!

  6. 6 Kuldeep Atil Jun 6th, 2008 at 1:52 am

    Hi Steven,

    Can we modify the AIRShareDemo?
    and republish them?

    Thanks
    Kuldeep Atil

  7. 7 admin Jun 6th, 2008 at 7:58 am

    Absolutely, that would be great. You can send me your changes and i’ll update or we can see about getting you setup with the svn project. You can email me directly at sgemmen AT hotmail.com to discuss further.

    Regards,
    -Steven


Vote

flickr