Skip navigation
seriousfretter09
Currently Being Moderated

Load a PDF in StageWebView - iOS

Nov 23, 2011 8:06 AM

Tags: #help #pdf #flash #ios #builder #load #webview

I am trying to create an iOS app that loads my companies product catalogue into a webview stage. I cannot figure out after a lot of google how to access this local file, although external files load fine. I'm trying to use the "file:" command. I'm doing this in flash builder.

 

<![CDATA[

 

 

                              import flash.display.MovieClip;

                              import flash.media.StageWebView;

                              import flash.geom.Rectangle;

 

                              var webView:StageWebView = new StageWebView();

                              var yOffset = 47

                              {

                                             public function FestoKP() {

                                                       webView.stage = this.stage;

       webView.viewPort = new Rectangle( 0, yOffset, stage.stageWidth, stage.stageHeight - yOffset);

       webView.loadURL( "file:///asset/Festo_KP_Catalogue.pdf" );

                                                       closeBtn.visible = true

       }

       public function Close() {

       webView.stage = null;

       closeBtn.visible = false;

       }

                              }

 
Replies
  • Currently Being Moderated
    Feb 2, 2012 5:18 AM   in reply to seriousfretter09

    I am on the same boat.  Did you ever find a good working example? -I'm about to give up.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 7, 2012 11:00 AM   in reply to seriousfretter09

    These guys at "CultCreative" seem to have the ideal solution for FB (it even checks to see if a newer .pdf is on a server)  but my project was built in Flash Pro CS5.5 so again just want to load a few local .pdf files which would be bundled up with the app. 

     

    http://www.cultcreative.com/tutorials/11/13/2011/local-file-access-edi ting-for-android-and-ios/

     

    I'm still interested in the method you used for iOS if it works well with Air (3.1) for iOS.   However, I am determined to find a way of using Flash Pro CS5.5 to do so.   Thanks! -if you can find it, and think your AS3 from FB would work for me. 

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 17, 2013 12:35 PM   in reply to seriousfretter09

    This was perfect thanks!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points