0

I'm making my first mobile application on Flash/AS3 for both iOS and Android platforms. It's been months now that I'm working on the project, and as a final step, I'm making a help document to explain to the fellow users how to use the application. The problem is: The HELP document is an 8 pages long WORD document (also saved in PDF and HTML format), and I dicovered that displaying a local document (embedded within the app), with finger-scrolling enabled, is a harder task than I thought it would be!!

So far, my researches lead to the following solutions (without a 100% satisfaction though):

I. USING StageWebView or StageWebViewBridge:

I tried StageWebViewBridge on AIR Desktop, it works, and the hyperlinks inside the document work too. But the display of some characters/letters in HTML file are distorted, and pictures are hard to display.. On android, displaying a local file simply didn't work. On AIR iOS, I haven't tried it yet.

Also, I haven't figured out how to launch a PDF file using these classes.

Displaying local files on iOS and Android using these classes is a nightmare.

II. USING "scrolling" classes:

These classes enables the finger-scrolling of a movieClip containing text and pictures.

a. Free

a1/ airmobile scroll controller: https://github.com/freshplanet/Air-Mobile-ScrollController

I gave this one a try, and what happenned was interesting: First this class works, I created a MovieClip with a textField inside of it, I pasted my text, and with the help of this class, I was able to display the movieClip on screen and scroll it. BUT, creating such a big movieClip (remember: 8 Pages!) created some unexpected issues. The compiling time became oddly long, and my PC freezes for a few seconds during the compiling step. The app starts now with a blank screen with 5 blinking tiny dots, and you'll have to wait for a few seconds before you can use the app. Clearly, the idea of adding to the project library a huge MovieClip with such long text made the app development a nightmare.

Not to mention that pasting my text inside a movieclip textField makes me lose my text formating, my hyperlinks etc..

a2/ Erichlotto AIRScroll:

I haven't tried it yet, but I guess I will still have the issues related to a hugely-dimensioned movieClip in my library.

a3/ TouchScrolling:

I haven't tried it yet, but I guess I will still have the issues related to a hugely-dimensioned movieClip in my library.

b. With Charge

b1. Creative FLash Scroller

I haven't tried it yet, but I guess I will still have the issues related to a hugely-dimensioned movieClip in my library.

b2. AIR AS3 Touch Scroll

I haven't tried it yet, but I guess I will still have the issues related to a hugely-dimensioned movieClip in my library.

It is somehow frustrating that such an easy and common task (displaying a scrollable local document, in-app embedded for offline use) took me a few days of research (and without a definitive way to solve it).

I'm ready to settle with a class that makes a movieclip scrollable, but without the gigantic movieClip height.

Any ideas?

Thank you!

  • Save the text content in an external xml file so you don't load the text until requested by user. Then it's a regular app optimization issue - if you want smooth scrolling, you have to turn the text into bitmaps. You make bitmap tiles (keep dimensions size of screen) and scroll them around. Regular vector text won't scroll smoothly. – moot Oct 06 '14 at 16:11

2 Answers2

0

cannot answer this question, as it's too broad and too little detail, but I can give you some suggestions. a) StageWebView should work on iOS and Android with HTML and PDF with local files. Performance may be an issue. If you encounter a problem regarding local files, check if they are loading correctly. Post some code, if you need help there b) You may consider to open the file in an external "native" app as PDF Reader or Polaris Office. But this may require an Native Extension. c) converting into a movieclip seems to be a bad idea. TextField itself is capable of displaying HTML content, with limitations, though. You could consider to change your document to fit the needs of Flash/AIR rather than the other way round. Hope this helps...

T. Richter
  • 369
  • 1
  • 13
0

To display local embedded files on Android with StageWebView you will have to copy these files from applicationDirectory to applicationStorageDirectory:

Refer to this article/answer:
https://forums.adobe.com/message/3485503#3485503

Since AIR 3.9 there is no other workaround on Android anymore.

There is a feature request here for it - please feel free to vote for it:
https://bugbase.adobe.com/index.cfm?event=bug&id=3832886

Jan
  • 445
  • 2
  • 12