0

I am using appfile:/. The path is correct; if I put it on screen and copy-paste it in the explorer it links to the image.

Is there anything else I need to do?

apaderno
  • 28,547
  • 16
  • 75
  • 90
Francisc
  • 77,430
  • 63
  • 180
  • 276

3 Answers3

1

UPDATED I have updated the library, now is more easy to use. Can you test it?

I am the author of the StageWebViewBridge class. There is a known problem if you are using Android. Anyway, I have a working solution I will update the next week.

If the problem is not in Android, then send me some code.

apaderno
  • 28,547
  • 16
  • 75
  • 90
xperiments
  • 106
  • 3
  • Hi. Well done on the StageWebViewBridge then. Good work. It doesn't work on the iPad simulator built into Flash Builder. It's simpply: `appfile:/images/file.gif`. That becomes the full path to it like `C:\Adobe Flash Builder\project\src\etc\file.gif`. – Francisc Sep 15 '11 at 20:23
0

I am also confused on how to access locally packaged assets. I put them in the HTML folder as requested and when I send a signal to the StageWebViewBridge to set the .src attribute of a video I'm not sure how to do it.

Without StageWebViewBridge and entirely in a website I can just reference the file for a video object via JavaScript directly e.g. swvRef.src = 'file.mp4';. This works perfectly fine. When I try to tell flash to send a call via StageWebViewBridge it does receive the call to the StageWebView (I have JavaScript reporting it). However when I try to set the .src of a video object I can't figure out the correct path.

The documentation says to put all things in a 'html' folder. I did so. No reference to a .src of 'html/a.mp4' or 'a.mp4' or 'htmlCache/a.mp4' ever makes the new javascript html5 video class work.

Bridge otherwise is working perfectly sending AS->JS and JS->AS. I'm just looking for info on how to reference packaged files. I want to play a video I put in the /html folder and so far, I just can't do it.

omi
  • 1
  • 3
  • Just FYI I am specifically referring to iOS. Not Android. I am using an iPad 2 and Flash CS5.5. – omi Sep 16 '11 at 01:37
0

Got the same issue and fixed it with "appfile:/"

Why do you require "appfile:/ for a local html file ?

  • If the treated html/js/css is local and asset is relative (aka ../ or no http://) you should treat them as "appfile:/" ?

  • If the treated file is distant you do not have to handle assets ?

Is there a best practice to work with "appfile:/" ?

Actually I debug my html/js/css game in the browser but if I use appfile:/ it will no longer works. I will have to handle 2 behaviors.

Jean-Philippe Encausse
  • 1,491
  • 2
  • 22
  • 40