Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 06:02, 14 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:How to avoid auto rotation of Flash Lite content on Nokia 5800

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

This code snippet demonstrates how to avoid auto rotation of Flash Lite content on Nokia 5800 XpressMusic for Flash Lite 3.x supported from S60 5th Edition onwards. Enclosed in this article you will find a zip file containing all source code used in this article.

Article Metadata
Code ExampleCompatibility
S60 5th Edition
Created: felipebzr (19 Jun 2009)
Last edited: hamishwillee (14 May 2013)
Device orientation


Pros and cons

  • Pros
    • Disable auto rotation of Flash Lite content
    • Produce content for one unique screen resolution (e.g: 360x640 or 640x360)
  • Cons
    • Rotating movieclip objects are really processor intensive
    • Handle all application movieclips inside a main MovieClip

Real usage

  • Create a MovieClip and paste all application graphics.
  • Copy the MovieClip from the Library and paste on the main timeline.
  • Set the instance name for mcBase
  • Copy and past the following code inside the actions panel on the first frame of your Fla.
fscommand2("FullScreen", "true");
Stage.scaleMode = "noScale";
import com.i2tecnologia.base.UIBase;
var base:UIBase = new UIBase(mcBase);
  • Create the path structure com/i2tecnologia/base/UIBase.
  • Create the actionscript file at the above directory.
  • Paste the following code inside the actionscript file.
import com.i2tecnologia.utils.*;
class com.i2tecnologia.base.UIBase
private var stageSizeListener:Object = new Object();
private var mainMovie:MovieClip;
public function UIBase(aMain:MovieClip)
this.mainMovie = aMain;
this.stageSizeListener.onResize = Delegate.create(this, onAutoOrientation);
private function onAutoOrientation():Void
if(Stage.width > Stage.height)
this.mainMovie._rotation = -90;
this.mainMovie._x = -140;
this.mainMovie._y = 500;
} else {
this.mainMovie._rotation = 0;
this.mainMovie._x = 0;
this.mainMovie._y = 0;

Flash Lite 3.1

You can update your Flash Lite version to 3.1 on Nokia 5800 by using App. Update. The following code can be used to disable auto rotation on Nokia 5800 in Flash Lite 3.1

fscommand2("FullScreen", "true");
Stage.scaleMode = "noScale";
var deviceObject:Object = new Device();


The sample shown in this article is available for download here: Media:Disable rotation

--Felipe Andrade 15:04, 19 June 2009 (EEST)

This page was last modified on 14 May 2013, at 06:02.
27 page views in the last 30 days.