It was quite inconvenient to test all Flash Player 10's goodies with non debug version of player. I remember that every version of Flex SDK has installers of FP in it. So I've looked at SVN repository of opensource.adobe.com and, oh my... it is here!!!
Here it is the link: Flash Player 10.0.0.525
I haven't tested versions for Windows and Linux, but Mac version didn't seem to install at the beginning and just told me that I've already had newer version installed. I took a look at installer script and there was a wrong version specified.
So here is guide how to install it on Mac OS X:
1. Download Install Flash Player 10 UB.dmg file
2. Mount it and copy Adobe Flash Player.pkg to Desktop
3. Right click on Adobe Flash Player.pkg and select Show Package Contents from contexts menu
4. Locate Info.plist and open it with any suitable editor ( TextMate for example)
5. Replace "
6. Replace "
7. Save it, you will be prompted to overwrite it - confirm it.
8. That's all folks - double click on Adobe Flash Player.pkg and install it ( Do not forget to uninstall any previous version of Flash player before installing)
Have fun,
Oleg
Labels: Flash Player, Flex
Swfobject 2.1 Flex template. HistoryManager and DeepLinking supported as well
Posted by Oleg Filipchuk at 12:37:00[UPDATE] I've updated template to SWFObject 2.1
And there is a bit smarter way to register flexApplication with BrowserHistory:
var flashvars = {
name1: "hello",
name2: "world",
name3: "foobar"
};
var params = {
menu: "false"
};
var attributes = {
id: "${application}",
name: "${application}"
};
swfobject.embedSWF ( "${swf}.swf", "${application}_div", "${width}", "${height}", "${version_major}", "expressInstall.swf", flashvars, params, attributes );
swfobject.addLoadEvent(loadEventHandler);
function loadEventHandler() {
BrowserHistory.flexApplication = swfobject.getObjectById("${application}");
}
name1: "hello",
name2: "world",
name3: "foobar"
};
var params = {
menu: "false"
};
var attributes = {
id: "${application}",
name: "${application}"
};
swfobject.embedSWF ( "${swf}.swf", "${application}_div", "${width}", "${height}", "${version_major}", "expressInstall.swf", flashvars, params, attributes );
swfobject.addLoadEvent(loadEventHandler);
function loadEventHandler() {
BrowserHistory.flexApplication = swfobject.getObjectById("${application}");
}
I have been using Geoff Stearns' SWFObject for a long time. I think it will be useful to share my index.template.html that tuned for using with SWFObject
Project Archive [updated - 07-07-2008] ( broken link has been fixed)
Have fun with it!
Cheers!
I had to implement update mechanism into one of my Air applications. After searching in Flex help and googling the only reasonable solution I've found was one from Rich Tretola (everythingflex.com). It is really easy to use library but with that simplicity I missed some freedom while using it:
- no events - main application that uses Rich's UpdateManager doesn't know if update required or not, if UpdateManager started downloading update etc...
- notifying user about update file downloading progress
The API is quite simple
- Constructor has 3 arguments
- _versionXmlUrl: String
- autoUpdate: Boolean = true ( optional)
- autoCheck: Boolean = false (optional)
- Public methods:
- checkForUpdate (): void
- update (): void
- Events:
- public static const EVENT_UPDATE_AVAILABLE: String;
- public static const EVENT_UPDATE_DOWNLOAD_STARTED: String;
- public static const EVENT_UPDATE_DOWNLOAD_COMPLETE: String;
- public static const EVENT_UPDATE_DOWNLOAD_PROGRESS: String;
- public static const EVENT_UPDATE_NOT_REQUIRED: String;
- public static const EVENT_UPDATE_FAULT: String;
- Read only properties:
- get currentVersionString (): String
- get newVersionString (): String
- get updateType (): String - critical, major, minor
- get updateMessage (): String
- get bytesLoaded (): int
- get bytesTotal (): int
Simple (silent update) example:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="doInit ()"/>
<mx:Script>
<![CDATA[
import com.cloud17.air.managers.UpdateManager;
private var um: UpdateManager;
private function doInit(): void
{
um = new UpdateManager ( "http://mysite.com/air/getlatestversion.xml", true, true );
um.addEventListener ( UpdateManager.EVENT_UPDATE_FAULT, start );
um.addEventListener ( UpdateManager.EVENT_UPDATE_NOT_REQUIRED, start );
}
private function start ( evt: Event = null ): void
{
//main app logic
}
]]>
</mx:Script>
<mx:WindowedApplication>
Complex example:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="doInit ()"/>
<mx:Script>
<![CDATA[
import com.cloud17.air.managers.UpdateManager;
import com.justversus.controls.ProgressWindow;
import com.justversus.utils.Prompt;
import mx.managers.PopUpManager;
private var um: UpdateManager;
private var progressWindow: ProgressWindow;
private function doInit(): void
{
um = new UpdateManager ( "http://mysite.com/air/getlatestversion.xml", false, true );
um.addEventListener ( UpdateManager.EVENT_UPDATE_AVAILABLE, updateAvailableHandler );
um.addEventListener ( UpdateManager.EVENT_UPDATE_DOWNLOAD_STARTED, updateDownloadStartedHandler );
um.addEventListener ( UpdateManager.EVENT_UPDATE_DOWNLOAD_PROGRESS, updateDownloadProgressHandler );
um.addEventListener ( UpdateManager.EVENT_UPDATE_DOWNLOAD_COMPLETE, updateDownloadCompleHandler );
um.addEventListener ( UpdateManager.EVENT_UPDATE_FAULT, start );
um.addEventListener ( UpdateManager.EVENT_UPDATE_NOT_REQUIRED, start );
}
private function updateAvailableHandler ( evt: Event ): void
{
Prompt.show( "You have installed " + um.currentVersionString + " version of application. \n" +
"Would you like to update your application to " + um.newVersionString + "?\n\n" + um.updateMessage,
"New version available -- " + um.newVersionString, doUpdate );
}
private function doUpdate(): void
{
um.update();
}
private function updateDownloadStartedHandler ( evt: Event ): void
{
progressWindow = PopUpManager.createPopUp ( this, ProgressWindow, true ) as ProgressWindow;
progressWindow.title = "Updating application...";
PopUpManager.centerPopUp( progressWindow );
}
private function updateDownloadCompleHandler ( evt: Event ): void
{
PopUpManager.removePopUp( progressWindow );
}
private function updateDownloadProgressHandler ( evt: Event ): void
{
progressWindow.setProgress ( um.bytesLoaded, um.bytesTotal );
}
public function start( event: Event = null): void
{
//do some application logic
}
]]>
</mx:Script>
<mx:WindowedApplication>
Feel free to use it...
Subscribe to:
Posts (Atom)