Reposition StageWebView With Orientation?

I've been following the "Admob - Google Ads?" post (http://forums.adobe.com/message/3434770) with success.  However, I have one issue that I can't seem to figure out.  The banner displays at the bottom of my app initially, but if I rotate it horizontally if is out of view.  If I start the app horizontally it loads at the bottom initially, but is right in the middle of screen when the device is vertical. I added an orientation event listener that resets the viewport property, but that doesn't seem to work.
My next plan of attack was to create two different banners.  One for vertical display and one for horizontal.  That is working great position wise, but I can't seem to figure out how to hide a StageWebView.  I tried deleting/recreating it with orientation changes but that throws an error.
Can anyone answer one or both of these questions:
Is it possible to reposition a StageWebView dynamically?
Is it possible to hide/unhide a StageWebView?

Thanks for the reply Saumitra!
Neither is working for me.  I setup an event listener to respond to orientation changes, but it doesn't seem to get called.  Here is an example of my code:
<fx:Script>
     <![CDATA[
          private var admob:StageWebView = new StageWebView();
          private function admobBanner():void  //***** GETS CALLED FROM addedToStage() *****
               admob.stage = this.stage;
               admob.viewPort = new Rectangle(0, stage.stageHeight - 40, stage.stageWidth, 48);
               admob.loadURL('http://www.mojackllc.com/admob/myMeetup.html');
               admob.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, updateAdmobBanner);
               admob.addEventListener(LocationChangeEvent.LOCATION_CHANGE, clickAdmobBanner);
          private function updateAdmobBanner(event:StageOrientationEvent):void
               admob.viewPort = new Rectangle(0, stage.stageHeight - 80, stageWidth, 48);
               //admob.stage = null;
          private function clickAdmobBanner(event:LocationChangeEvent):void
               if (admob.location != "http://www.myurl.com")
                    event.preventDefault();
                    navigateToURL(new URLRequest(event.location));
     ]>
</fx:Script>

Similar Messages

  • Smart Form Error Page format 2 with orientation 1 unknown

    I have created smart form with Page Format DINA4 (297x210). While executing the smart form i am getting error as "Page format 2 with orientation 1 unknown".

       Same Attributes on each page only Next Page is in increment order.

  • Finder - Images With Orientation Data

    Hi,
    I'd like to discuss the way Finder handles images/photos with Orientation data embedded in them. I have a portrait photo here. When I open it with Preview it appears the correct way up, with its longest dimension running vertically. The same is true for Cover Flow and Quick Look. All of these methods show the photo the correct way up. However, when I view the file in Icon View or in List View in the Finder, the photo appears on its side, with its longest dimension running horizontally.
    My question is, why is this happening? If Preview, Cover Flow, Quick Look and even Safari understand Orientation data, why doesn't the Icon and List View modes of the Finder? Is this intentional or something that Apple forgot to implement?

    You need to have an application like  EXIF Viewer for Mac OS X  to check the files once you've exported them with the various checkboxes checked:
    Happy Holidays

  • Need some help with orientation  when Printing Tickets

    Hi Guys,
    We use an online ticketing system which when clicked on "print ticket" Safari window comes up showing the ticket as a PDF. You move the mouse to the bottom of the page, where adobe reader icon bar appears so you can print.
    Now currently when the ticket comes up, The ticket is shown horizontally and the part you would normally tear off (stub) is on the left hand side, However when we go to print, because the ticketing paper is setup as the stubs first then the rest of the ticket, this orientation has the ticket being printer first then the ticket stubb, which is the opposite to the way the paper in the printer is, causing the ticket to be printed incorectly. If I was to rotate the image twice, so that the text appears upside down, with the stub on the right side, and print the ticket it prints correctly, since the stubb is printed first and matches the paper.
    Is there a way to have the ticket appear as it is now so you can read it on the preview but flip the pdf 180 degrees up side down, so the stub is on the right side, and gets printed first, before it goes to the printer.
    Forgive me but I have looked and haven`t found,  any setting that work. I have tried the flip horizontally option as well as the reverse page orientation, which hasen`t fixed the problem.
    I want to be able to get the orientation, correct and be able to save as default, the settings so its a simple click print, type of operation, without having to readjust it everytime.
    It is important that I get this orientation correct, as it affects the print stubs, and ticket.
    also keep in this on Mac's as well, and my layout direction option is greyed out.
    Hopefully that makes sense.
    Any help is greatly apreciated, as I do need to get this problem resolved fairly soon, as our box office is getting buys.
    Thanks,
    soundguy

    soundguy911 wrote:
    Is there a way to have the ticket appear as it is now so you can read it on the preview but flip the pdf 180 degrees up side down, so the stub is on the right side, and gets printed first, before it goes to the printer.
    If you "flip" the PDF, any text on the document will be mirrored; you will need to rotate it.
    One method I can imagine is to use JavaScript to rotate the PDF, but I'm not sure that this function actually exists.  Check for yourself: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
    Note that if you build a "rotate" JS into Adobe Reader, every PDF document that is opened will appear rotated.

  • How does the SDK and Reader handle printing with orientation?

    I have a document that I want to print, and it contains a portrait page on Page 1, and a landscape page on Page 2.  Acrobat Reader correctly prints these pages (with a single print job), and I'm assuming it's because of the auto-rotate option on the print dialog.  Is this a feature of Reader, the API, or how the printer handles the request.  I've tried printing this PDF just using the JAva API, but the orientation remain portrait for all pages.  How does the Adobe Acrobat API deal with mixed orientation pages?  Ignore the fact that I did my test printing with Java, because my question is whether or not the auto orientation is a feature of the UI, the SDK, or the printer (or a combination).

    Same as the current Ipod Video or "Classic" there is an option under settings to toggle between original aspect ratio or Full Screen.
    Kenal0

  • Single Stack with orientation change

    We are working on a portrait only folio with seven stacks.  However, if and when a user changes orientation to horizontal, we've created a single auto-play slideshow. Rather than create seven separate files to accompany the portrait stacks for the horizontal slideshow, threby significantly increasing file size, can we create a single stack or file where the slideshow lives and point to that horizontal stack regardless of what portrait file the user is reading?

    No. Dual orientation is all or nothing. You could add a single page to
    the other articles that simply says "no content in this orientation for
    this article."
    Bob

  • IOS Camera bug with orientation :(

    Does somebody know this bug?
    I use this simple code:
    import flash.media.Video;
    import flash.media.Camera;
    import flash.display.StageOrientation;
    var video : Video = new Video(640,480);
    addChild(video);
    var camera : Camera = Camera.getCamera();
    camera.setMode(640,480,12);
    video.attachCamera(camera);
    And receive this issue. Image rotated. Looks like Adobe Air UIView use wrong orientation!?
    This bug was sawn in Air 13 Release and latest beta from April, 15th. Don't know any other Air version that have this issue so you need to test yourself.
    Tested in iOS 6.1.3 iPhone4 and iPad4 iOS 7.1 - the same.
    Options on this image:
    - Portrait
    - FullScreen
    - no autoOrientation
    - CPU render method
    - iPhone
    Referencing to this thread http://forums.adobe.com/message/6153866#6153866
    No, you can't rotate because if you use "Draw" to bitmapData - you will receive content with wrong orientation and rotating it - not cheap cpu operation.

    What you described is exactly how it worked for me in iOS 4.
    If i clicked CLOSE, it assumed I read the message and was done with it.

  • StageWebView with WebSQL

    Hello everybody,
    In iOS everything runs perfectly, but on windows and android, I can´t use WebSQL on HTML5 pages loaded on the StageWebView.
    I know that, on android, is necessary to enable setDatabaseEnabled and set setDatabasePath, and also write a onExceededDatabaseQuota method.
    But I can´t do any of these on the StageWebView.
    Any ideas?
    Regards
    Rogério Gonzalez

    Thanks for the reply Saumitra!
    Neither is working for me.  I setup an event listener to respond to orientation changes, but it doesn't seem to get called.  Here is an example of my code:
    <fx:Script>
         <![CDATA[
              private var admob:StageWebView = new StageWebView();
              private function admobBanner():void  //***** GETS CALLED FROM addedToStage() *****
                   admob.stage = this.stage;
                   admob.viewPort = new Rectangle(0, stage.stageHeight - 40, stage.stageWidth, 48);
                   admob.loadURL('http://www.mojackllc.com/admob/myMeetup.html');
                   admob.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, updateAdmobBanner);
                   admob.addEventListener(LocationChangeEvent.LOCATION_CHANGE, clickAdmobBanner);
              private function updateAdmobBanner(event:StageOrientationEvent):void
                   admob.viewPort = new Rectangle(0, stage.stageHeight - 80, stageWidth, 48);
                   //admob.stage = null;
              private function clickAdmobBanner(event:LocationChangeEvent):void
                   if (admob.location != "http://www.myurl.com")
                        event.preventDefault();
                        navigateToURL(new URLRequest(event.location));
         ]>
    </fx:Script>

  • Android - StageWebView with Geolocation

    I'm creating a cross-platform app using Flash CS6 targeted at AIR 3.3.0.3650. I setup a StageWebView and load a URL which uses geolocation via Google's JS API.
    I've ported my code from a working IOS implementation into Android. The code worked 100% fine on IOS, however, I do not get any prompts for permission to use a current location on the Android platform, and thus the map does not load or show your geolocation.
    I've kept the appplication and code to a complete minimum, but I'm still banging my head against the wall to get a prompt or get the geolocation working. If you were to visit the URL below via a desktop browser or the Android's default browser, the geolocation works. When you load it via StageWebView, the map portion remains blank.
    I have also set all permissions to allow for location services, etc. to no avail. Here is the barebones code that I'm running with to troubleshoot. I've even went as far as to use someone else's website in the StageWebView instance to make sure it wasn't an error within the loaded page.
    var webView:StageWebView;
    webView = new StageWebView();
    webView.stage = stage;
    webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
    webView.loadURL("http://merged.ca/iphone/html5-geolocation/");

    From my findings, its not possible, since on Android the stagewebview blocks javascript prompts. At the time, there was no available function to import Chromewebview to allow the JS prompts.
    I was initially using GPS location functionality through the actual webpage served via stagewebview, but since Android would not show the "allow location" prompt, I could never serve a location (or save it) through this method.
    I had to rewrite my code to use geolocation and stored variables, then pass the information along through URL encode variables to accurately show the locations via stagewebview. I'm not sure my way is correct or not, but in a pinch it worked out pretty well. The only headache was reviewers, who had issue with the app when in a large group of people (overloaded cell towers and thus no data refresh.)

  • Mapviewer problem with oriented label and marker

    I have test oriented label and oriented marker seperately. Both worked well. when I combined these 2 styles into one theme,both label and marker are not oriented. Is this a bug?

    theme:
    <styling_rules>
    <rule column="FLDM">
    <features style="DZZH:V.SYMBOL_DCCZ"> ZJNR IS NULL
    </features>
    </rule>
    <rule>
    <features style="DZZH:C.NULL"> ZJNR IS NOT NULL
    </features>
    <label column="ZJNR" style="DZZH:T.NOTENAME2"> 1 </label>
    </rule>
    </styling_rules>
    styles
    <ROW num="27">
    <NAME>C.NULL</NAME>
    <TYPE>COLOR</TYPE>
    <DESCRIPTION>无色</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;
    &lt;svg width=&quot;1in&quot; height=&quot;1in&quot;&gt;
    &lt;desc&gt;&lt;/desc&gt;
    &lt;g class=&quot;color&quot; style=&quot;fill:#ffffff;fill-opacity:0&quot;&gt;
    &lt;rect width=&quot;50&quot; height=&quot;50&quot;/&gt;&lt;/g&gt;
    &lt;/svg&gt;</DEFINITION>
    </ROW>
    <ROW num="71">
    <NAME>M.DAOZHDCCZH</NAME>
    <TYPE>MARKER</TYPE>
    <DESCRIPTION>倒转地层产状</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;
    &lt;svg width=&quot;1in&quot; height=&quot;1in&quot;&gt;
    &lt;desc&gt;&lt;/desc&gt;
    &lt;g class=&quot;marker&quot; style=&quot;width:11;height:11&quot;&gt;
    &lt;image x=&quot;0&quot; y=&quot;0&quot; width=&quot;9999&quot; height=&quot;9999&quot; type=&quot;gif&quot; href=&quot;dummy.gif&quot;/&gt;&lt;/g&gt;
    &lt;/svg&gt;</DEFINITION>
    <IMAGE>4749463839610B000B0091FF00FFFFFFC0C0C0000000C0C0C021F90401000003002C000000000B000B004002129C8F39229AED0C5CACDA1973AC191FE86505003B</IMAGE>
    </ROW>
    <ROW num="74">
    <NAME>M.DICCZH</NAME>
    <TYPE>MARKER</TYPE>
    <DESCRIPTION>地层产状</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;
    &lt;svg width=&quot;1in&quot; height=&quot;1in&quot;&gt;
    &lt;desc&gt;&lt;/desc&gt;
    &lt;g class=&quot;marker&quot; style=&quot;width:11;height:11&quot;&gt;
    &lt;image x=&quot;0&quot; y=&quot;0&quot; width=&quot;9999&quot; height=&quot;9999&quot; type=&quot;gif&quot; href=&quot;dummy.gif&quot;/&gt;&lt;/g&gt;
    &lt;/svg&gt;</DEFINITION>
    <IMAGE>4749463839610B000B0091FF00FFFFFF000000C0C0C000000021F90401000002002C000000000B000B0040020F948FA91AEB12A29CEDD9555DBE5C14003B</IMAGE>
    </ROW>
    <ROW num="93">
    <NAME>M.LIUCCZH</NAME>
    <TYPE>MARKER</TYPE>
    <DESCRIPTION>流层产状</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;
    &lt;svg width=&quot;1in&quot; height=&quot;1in&quot;&gt;
    &lt;desc&gt;&lt;/desc&gt;
    &lt;g class=&quot;marker&quot; style=&quot;width:11;height:11&quot;&gt;
    &lt;image x=&quot;0&quot; y=&quot;0&quot; width=&quot;9999&quot; height=&quot;9999&quot; type=&quot;gif&quot; href=&quot;dummy.gif&quot;/&gt;&lt;/g&gt;
    &lt;/svg&gt;</DEFINITION>
    <IMAGE>4749463839610B000B0091FF00FFFFFFC0C0C0000000C0C0C021F90401000003002C000000000B000B0040020F9C8FA929BDDFA274AF5601A5DDA800003B</IMAGE>
    </ROW>
    <ROW num="168">
    <NAME>V.SYMBOL_DCCZ</NAME>
    <TYPE>ADVANCED</TYPE>
    <DESCRIPTION>地层产状</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; ?&gt;
    &lt;AdvancedStyle&gt;
    &lt;BucketStyle&gt;
    &lt;Buckets&gt;
    &lt;CollectionBucket seq=&quot;0&quot; label=&quot;地层产状&quot; style=&quot;DZZH:M.DICCZH&quot;&gt;
    9001
    &lt;/CollectionBucket&gt;
    &lt;CollectionBucket seq=&quot;1&quot; label=&quot;倒转地层产状&quot; style=&quot;DZZH:M.DAOZHDCCZH&quot;&gt;
    9002
    &lt;/CollectionBucket&gt;
    &lt;CollectionBucket seq=&quot;2&quot; label=&quot;流层产状&quot; style=&quot;DZZH:M.LIUCCZH&quot;&gt;
    9008
    &lt;/CollectionBucket&gt;
    &lt;/Buckets&gt;
    &lt;/BucketStyle&gt;
    &lt;/AdvancedStyle&gt;
    </DEFINITION>
    <IMAGE></IMAGE>
    </ROW>
    <ROW num="160">
    <NAME>T.NOTENAME2</NAME>
    <TYPE>TEXT</TYPE>
    <DESCRIPTION>NOTE</DESCRIPTION>
    <DEFINITION>&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;
    &lt;svg width=&quot;1in&quot; height=&quot;1in&quot;&gt;
    &lt;desc&gt;&lt;/desc&gt;
    &lt;g class=&quot;text&quot; style=&quot;font-style:plain;font-family:Dialog;font-size:10pt;fill:#000000&quot;&gt;
    Hello World!
    &lt;/g&gt;
    &lt;/svg&gt;</DEFINITION>
    </ROW>

  • Burning photos to a CD OR DVD...problem with orientation

    When I burn my photos to a CD or a DVD some of the photos are horizontal instead of vertical and I can not make them vertical.  Also, when trying to burn a set of photos the first photo would not print ( an iconover it like corrupt )
    Please help!
    Sheila

    Thanks you for taking the time to respond to my question. I did go into editor and did find the cd/dvd option. But that would require me to load all my new photos into editor before I can back them up on CD. My previous version allowed me to simply import my photos from my card and then make a CD as a backup. Can this latest version do that?

  • Writing Text with different orientation degrees

    Hello All,
    I just wanna know about writing the text vertically.
    I don't mean this:
    T
    E
    X
    T
    I mean as we write in MS word or other applications with orientation of 90 degrees.
    Thanx in advance.

    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class TipsyText extends JPanel {
        String text = "hello world";
        Point p = new Point(200,250);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                                RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
                                RenderingHints.VALUE_STROKE_PURE);
            g2.setPaint(Color.red);
            g2.fill(new Ellipse2D.Double(p.x-2, p.y-2, 4, 4));
            AffineTransform at = AffineTransform.getTranslateInstance(p.x,p.y);
            at.rotate(-Math.PI/2);
            g2.setFont(g2.getFont().deriveFont(28f).deriveFont(at));
            g2.setPaint(Color.black);
            g2.drawString(text, 0, 0);
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new TipsyText());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • UIImage changes orientation with save/load

    If I get an UIImage with orientation UIImageOrientationLeft, then when I save it and reloads it, it become UIImageOrientationRight.
    I just:
    NSData * data = UIImageJPEGRepresentation(image, 0.1);
    [data writeToFile:filename atomically:true];
    Has anyone else encountered this?
    For now I have made a workaround, so I save the "original" orientation from when I first got the image from the photo album. If the original and the orientation of the loaded image are not equal I mirror the coordinate system before drawing.
    - Jens

    Forgive me, I got fooled by the upload tool...
    So, 1.jpg is a screenshot a the first VI on which is shown my chart.
    I have a button to access the other VI which first save my chart's history to a table, but as you can see on 2.jpg, the chart on the other VI is not similar to the first.
    Any idea ?
    Sorry for my poor english (and my double post),
    Philippe.
    Attachments:
    2.jpg ‏114 KB

  • How to suppress printing of pages with no data

    Dear all,
    My report consists of 3 distinct sub reports. The first two sub reports should be printed as portrait on A-4 sheet while the third one should be printed as landscape A-4 . I have put the first two sub reports layout in the main section with orientation as portrait while the third one is placed in trailer section with orientation as landscape. The printing of subreports 2 and 3 is conditional. There may be case when first two sub reports get printed while we do not have third report as there is no data in the database for the same. In this case , I am still getting a blank page corresponding to the third sub report in the final report. How do I suppress this?
    Regards,
    Ranjit
    P.S. I am using Reports 6i

    maybe, you don't understand me.
    I have below jtable:
    ============================
    I column1 name l column2 name I
    ============================
    l data l data l
    ============================
    l data l data l
    ============================
    XXX
    ============================
    I wrote:
    table.setBackground(Color.black) then only data area has black colour, but XXX area hasn't black colour.
    How to XXX area also has black colour?
    help me, thanks very much.

  • Label positioning with MapViewer

    Hello,
    Is it possible to position by myself the label for one geofeature in a MapViewer request?
    Thanks.

    not directly. but there might be work-around depending on your requirement. for instance you can setup a geofeature with oriented point, then render it with a transparent color style. The text label will be placed near the point but the point itself will not show up on the map.
    more comprehensive labeling support will likely be available when the new database TEXT type is supported by mapviewer.
    thanks

Maybe you are looking for