Rotating a picture in Flex Mobile

Our mobile app which serves Android and iOs, contains feature which allows users to take a picture and upload the picture to a remote server.
Everything is working fine, except that iOs rotates the picture. I read http://forums.adobe.com/message/3788374#3788374 which does a great job detailing the steps you need to take to figure out whether the picture is rotated or not.
What is missing in this discussion is which code to write to actually rotate the picture. This must be something very trivial, but it alludes me.
Is there anyone who can shed some light on this?
Thanks,
-Rogier

I am using below code for HTML files
private var appFile:String="index.html";
if (StageWebView.isSupported)
                    currentState = "normal";
                    webView.stage = stage;
                    webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                    var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                    webView.loadURL(fPath);
                    addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                else {
                    currentState = "unsupported";
                    lblSupport.text = "StageWebView feature not supported";
above code is working fine for me.

Similar Messages

  • Flex Mobile Auto Switch To Landscape

    I am building a Flex Mobile app for a final project at school and I would like it to automaticly switch to landscape mode when debugged. As of right now it starts out in portrait mode and I have to click rotate left.
    Any help would be awesome!
    Thank you.
    --Logan

    ok for anyone with the same problem......
    open up your xml file     example    test.xml   
    change the line.....
    <aspectRatio>landscape</aspectRatio>
    delete the comment charaters around it.
    --Logan

  • Flex Mobile Best Practies

    Hi to every one!!!
    I'm try to building an app for mobile with a flex mobile project.
    The UI is gonna be something like in the picture:
    I would like to know witch is the best practies to put all the grafics element into my views.
    For example, for the bricks (that comes from an xml) i created a component, inside the component i put my fxg file in a group with a gap:
    My View:
    <s:VGroup gap="10">
            <customComponents:BrickComponent/>
            <customComponents:BrickComponent/>
            <customComponents:BrickComponent/>
        </s:VGroup>
    BrickComponent:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark" xmlns:assets="assets.*">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <assets:Brick/>
    </s:Group>
    The same for the tshirt.
    It is a good way like this?
    And draw and import from flash catalyst?
    Thanks a lot

    You might want to look into using .FXG files for your graphics.
    These blog posts should be useful for tips on improving performance in your mobile Flex applications:
    http://flexponential.com/2011/10/05/performance-tuning-mobile-flex-applications/
    http://flexponential.com/2011/04/20/flex-performance-tips-tricks/

  • Flex Mobile Images

    Hi, I am unable to see my Images in the adobe flex mobile project. I am able to see the picture before load but once the program is run the image disappears? I have tried changing the picture. The source path and the source path in source code. I really do not see what the problem is the path must be correct because the picture would not appear. I also have tried embedding the picture which still does not work. Can anyone suggest any options for me please?
    The image is Source I have tried: -
    <s:Image id="pic" x="48" y="53" smooth="true" source="@Embed('Assets\cat.jpg')"/>
    Also attempted: -
    <s:Image id="pic" x="48" y="53" smooth="true" source="('Assets\cat.jpg')"/>
    In design the source: -
    Assets/cat.jpg
    Also: -
    @Embed('Assets\cat.jpg')
    Can anyone please help me as I am really struggling to find a soloution.
    The images are saved in the Assets folder

    Thanks. So size of the file really doesn't matter much when it comes to loading/performance because it's basically a local file (embedded with the apk) is it.
    Also, if my source image is a jpg file, should I convert it to a PNG?

  • Flex mobile add emoticons and text

    I created a chat program in the mobile project, but I can not add emoticons,I know textarea can not display pictures,So I reluctantly use RichEditableText, it can add a picture, but why can not I enter characters (letters and Chinese characters) in the phone debugging, just enter only numbers, and punctuation symbols。Or there are other ways to solve add text and pictures?

    Thanks much for your response.
    Hmmm...  That appears to work but also causes a runtime exception where there was none before the 4.6 upgrade.  It occurs when I autoscroll on receiving a new message in the chat, something that worked fine in 4.5.
    I guess I'm kind of wondering what the best practice is here.  Maybe I'm just doing this wrong altogether.  I'm finding it very difficult to implement probably one of the most basic features one would find in any collaborative app - something that was very easy in Flex 3 - the chat pane.  I've had one functioning fine for about 3 years.  Not so much in Flex mobile.
    Chat is very simple functionality.  When you receive a new message from afar...
    1.  add it to a TextArea with some nice formatting
    2.  auto scroll far enough so the user can see the new message in its entirety. 
    Nothing difficult at all.
    Why are these two things difficult to find in the TextArea in Flex mobile?  It almost seems as though it's something we're not supposed to be doing? 
    The answer here seems to be don't use Stage Text.  Revert to an older TextArea skin.  Why?  What text area doesn't need formatting as an option?  What text area doesn't need to be auto scrolled here and there?  Or am I just going about this wrong?  Maybe using the wrong components?
    I guess for now I can revert to 4.5 skin, but now the code I used to auto scroll on receiving a new message throws a null pointer exception.  I've been using the valueCommit property to auto scroll, as follows:
    valueCommit="textArea.scroller.verticalScrollBar.value = textArea.scroller.verticalScrollBar.maximum"
    Haven't had a problem prevously.  But this now throws:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.components::ChatWindow/__textArea_valueCommit()
    What's the best practice to accomplish this and also to be able to take advantage of the latest and greatest?

  • Skinning Flex Mobile TextInput

    Hi,
    I need to skin the Flex Mobile Text Input with a gradient in the background. I have created a skin for that. It works fine on Android devices but in case of iOS devices, the keyboard doesn't even comes up. If I remove the skin, it works fine. I guess the issue is with skinning, but how can I fix this? Below is the skin I created, if it helps:
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
        alpha.disabledStates="0.5" blendMode="normal">
        <fx:Metadata>
        <![CDATA[
             * @copy spark.skins.spark.ApplicationSkin#hostComponent
            [HostComponent("spark.components.TextInput")]
        ]]>
        </fx:Metadata>
        <fx:Script>
            <![CDATA[
             * @private
            private static const focusExclusions:Array = ["textDisplay"];
             *  @private
            override public function get focusSkinExclusions():Array { return focusExclusions;};
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="normal"/>
            <s:State name="disabled" stateGroups="disabledStates"/>
            <s:State name="normalWithPrompt"/>
            <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
        </s:states>
        <!-- border -->
        <!--- @private -->
        <s:Rect left="0" right="0" top="0" bottom="0" id="border"
                                  radiusX="5" radiusY="5">
            <s:stroke>    
                <!--- @private -->
                <s:SolidColorStroke id="borderStroke" color="0xFFFFFF" weight="1" alpha="0.05" />
            </s:stroke>
        </s:Rect>
        <!-- fill -->
        <!--- Defines the appearance of the TextInput component's background. -->
        <s:Rect id="background" left="1" right="1" top="1" bottom="1"
                                  radiusX="5" radiusY="5">
            <s:fill>
                <!--- @private Defines the background fill color. -->
                <!-- s:SolidColor id="bgFill" color="0xFFFFFF" alpha="0"/-->
      <s:LinearGradient rotation="90">
      <s:GradientEntry color="0x131516"
                                                                                     alpha="1"/>
      <s:GradientEntry color="0x282b31"
                                                                                     alpha="1"/>
      </s:LinearGradient>
      </s:fill>
        </s:Rect>
        <!-- shadow -->
        <!--- @private -->
        <s:Rect left="1" top="1" right="1" height="1" id="shadow" alpha="0"
                                  radiusX="5" radiusY="5">
            <s:fill>
                <s:SolidColor color="0xFFFFFF" alpha="0.25" />
            </s:fill>
        </s:Rect>
        <!-- text -->
        <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
        <s:RichEditableText id="textDisplay"
                  verticalAlign="middle"
                  widthInChars="10"
                  left="1" right="1" top="1" bottom="1" />
        <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
        <s:Label id="promptDisplay" maxDisplayedLines="1"
                    verticalAlign="middle"
                    mouseEnabled="false" mouseChildren="false"
                    includeIn="normalWithPrompt,disabledWithPrompt"
                    includeInLayout="false" />
    </s:SparkSkin>

    You are using a non-mobile skin:
    <s:RichEditableText id="textDisplay" 
                  verticalAlign="middle" 
                  widthInChars="10" 
                  left="1" right="1" top="1" bottom="1" /> 
        <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
    Pls Read here about mid page- wont call keyboard and have scrolling issues, etc:
    Adobe Flex 4.6 * Use text in a mobile application
    Here are the mobile skins: spark.skins.mobile - Adobe ActionScript® 3 (AS3) API Reference ... apply to base components you need to use.
    Good luck.

  • Can't convert Flex Mobile project to desktop project

    I'm using the Flash Builder 4.6 trial, and I'm very new to flex development. I've been asked to convert an existing Flex Mobile project (appears to have been developed in Flash Builder 4.5) into an AIR desktop app.
    The project imported without complaint. However, the Add/Change Project Type > Convert to Flex Desktop Project menu item is disabled.
    I created a blank Flex Mobile project, then a blank Flex web project, then a blank ActionScript project. It's greyed out for those, too. I checked with the projects closed and open; the rest of the items on that submenu are enabled for all projects when closed.
    Is this feature disabled in the trial version?  Is something else going on?

    Clearly the device from verizon works, I would try to contact a computer tech to repair your computer
    Really it should be as simple as turn on, connect, go. If it isn't there is a break down somewhere in that computer
    What error msg?

  • Flex Mobile Project unable to run on android device

    Hi,
    I Have created basic flex mobile project using flash builder and i could able to run on desk top, but while running the same on device i am getting force close exception also dint get any error log. i am using samsung galaxy pop GT-S5570 as my testing device. i have configured usb driver and enabled usb debugging in  my device too. any help to resolve this process?

    08:20:45.751 Raw device 'sd=sd1,lun=/dev/rdsk/c3t5000CCA03EC50D5Dd0s0' does not exist, or no permissions.
    Looks like either your lun doesnt exist  OR you running vdbnech session not as root.
    (Only a guess )

  • Is there a way to use Stage3D in Flex Mobile projects on iPad?

    When I create a project of type "Action Script Mobile Project" the Stage3D works on iPad, Android device and in the AIR desktop simulator.
    But when I create a project of type "Flex Mobile Project" it works in the desktop simulator and on Android device but does not work on iPad.
    When running on iPad the stage.stage3Ds[] collection is empty.
    Is it a sort of limitation made by intent? Or a bug? Or maybe I am doing something wrong?
    What I actually need is an ability to render offscreen bitmaps with GPU in an application that uses Spark UI. This is why I need Flex Mobile project.
    My configuration is the following:
    iPad with retina display
    Sony Xperia Tablet Z
    AIR SDK 3.7 (and I have also tried AIR SDK 3.8 today)

    Hi,
    Check this thread, discussing the similar issue
    Re: What video format that is compatible with Muse

  • Is there a way to save data to just one view in Flex Mobile applications?

    I am having trouble handling data between views in a Flex Mobile application that I am writing. I know how to pass data from one view to another, but I was wondering if there is a way to save that data to a view, then get more data from another view (in this case it would be the same view that the original data came from) and put that data on the same view without overwriting the original data. I would be glad to post some code if anyone needs to see it.

    I think we realise that this is the same question as the other thread.

  • How to insert a background image in VGroup in Flex Mobile

    I want to insert a background image for this VGroup. Help me out. I'm new to Flex !!
    I'm using this code in Flex Mobile Application
    <s:VGroup height="100%" width="100%"
              paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">   
        <s:List id="homeList" height="100%"
                labelField="title"
                dataProvider="{homeNews}">
            <s:layout>
                <s:TileLayout requestedColumnCount="1"
                              verticalGap="5"/>
            </s:layout>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:VGroup>
                            <s:BitmapImage source="{data.source}"/>
                            <s:Label text="{data.title}" />
                        </s:VGroup>
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:VGroup>

    I don't think you can add a background image to a VGroup directly, nor can VGroup be skinned.
    As far as I am aware there are probably 2 solutions
    1) use a SkinnableContainer instead skin the container to have a background image and set its layout to VerticalLayout
    2) enclose the VGroup in a Group with a BasicLayout. you can then add a background image to the Group and overlay the VGroup

  • Two styles for a native look (Flex Mobile App)?

    Hello,
    is it possible to use two styles/looks for the same App, that this one will look native on iOS AND on Android?
    Or will I have to build the same App twice to get this?
    - BB

    Check out Jason San Jose's blog posting here: http://blogs.adobe.com/jasonsj/2011/06/ios-theme-for-flex-mobile-projects-proof-of-concept .html

  • Flex Mobile project scaling with Retina display iPad (3rd gen).

    Adobe et al,
    With the new iPad 3 we now have a ton more pixels to utilize. I'm familiar with and have already successfully tested the AIR 3.1+ commandline compiler option (-platformsdk) to get Retina display on the new iPad. In ActionScript mobile projects the content is rendered beautifully on the new iPad. But with Flex Mobile projects, something is happening that causes it to render incorrectly. It's retina display alright, but the size is way too small.
    Below is an image WITHOUT the -platformsdk build tag, that causes the app to be pixel doubled to fit on the new iPad:
    Notice that it's scaled proportionally, even though the text and components are slightly pixelated. Not a big deal, but noticeable on the device.
    This image is taken with the app rendering in Retina display (setting the -platformsdk pointing to iOS 5.1 SDK):
    As you can see, the text/components are rendered really clear, but the scale is way off. Obviously it's getting the width of 2048x1536 from the device, but it's way too small.
    How do I fix this? I've tried changing the applicationDPI, but it doesn't fix it. Setting a width/height of 1024x768 does nothing either. It seems we need to overrride a behavior that causes it to fit everything in so small.
    A little help?
    Thanks,
    iBrent

    Alright, kevinkorngut's answer was the right one. It appears that even though AIR 3.x can render high resolution apps, it still returns the incorrect DPI for the new iPad. In a Flex Mobile project you have to override the DPI using the method mentioned above.
    Here are the results I got:
    Using the runtimeDPIProvider property on the TabViewApplication tag (works for any of the three project types) I created a class that extends RuntimeDPIProvider. To detect which iPad I was on, I used the following code:
    override public function get runtimeDPI():Number
         var os:String = Capabilities.os;
         if(os.indexOf("iPad") != -1)
              if(Capabilities.screenResolutionX > 2000 || Capabilities.screenResolutionY > 2000)
                   return DPIClassification.DPI_320;
              } else {
                   return DPIClassification.DPI_160;
         } else {
              return Capabilities.screenDPI;
    I'm returning a DPI of 320 as this gives the best result that matches the proportions of the device. In other words, even though the iPad DPI is 264, setting the app to 320 gives the correct size at the new Retina display.
    In order for this to work, you must compile the app with the -platformsdk flag pointing to iOS 5.1 SDK, and currently that means you need a Mac running Lion with Xcode 4.3.1. Here's the adt command I used:
    adt -package -target ipa-test -storetype pkcs12 -keystore ~/Desktop/iOS_DevCert.p12 -provisioning-profile ~/Desktop/iOS_DevProfile.mobileprovision newiPadTest.ipa newiPadTest-app.xml newiPadTest.swf -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS5.1.sdk
    Also, the -app.xml descriptor file must have the <requestedDisplayResolution>high</requestedDisplayResolution> within the <iPhone> tags.
    Thanks everyone for their replies!
    iBrent

  • How do I rotate a picture in Photoshop cs5

    How can i rotate a picture with photoshop cs5

    Ctrl-t on windows and command-t on a mac. That with let you rotate, scale and skew a picture on a layer.
    Image>Image rotation>{Choose one} That will rotate the entire document by what you choose.

  • Adobe Flex Mobile + AIR - Custom iOS Build Setting

    I am building some Adobe Flex Mobile application using Flex 4.6.0 + AIR 3.5 only for iOS
    This app involves some iOS Native Extension created also by me.
    The thing is that this ANE uses some third party framework (GD.framework from Good Dynamics Technology). That framework requires GD FIPS linker to be used, and for that, i need to set some custom build settings in a .xcconfig file, with this content:
    FIPS_PACKAGE=$(CURRENT_ARCH).sdk LDPLUSPLUS=/Good Technology/Good.platform/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld LD=/Good Technology/Good.platform/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
    The ANE compiles OK, but then, I add the ANE to the app, I compile the app, but when I launch the app, it crashes because the FIPS linker was not properly got set on my Flex Mobile project.
    So, my question is:
    Is there a way to set the above configuration on my project like somebody would do in a Xcode project?
    Regards!

    I see your key as a reserved key for iOS. I haven't tested it myself but here's the keys you cannot change. Sure enough, MinimumOSVersion is reserved.

Maybe you are looking for