02-06-2012 09:59 AM - edited 02-07-2012 03:17 AM
I have created, compiled and signed an app using the webworks SDK.
It uses HTML, JavaScript, CSS and Flash.
Everything works absolutely perfectly, except for the flash - flash files do not load up.
When the exact same files are viewed in the browser - it works fine, but when using the compiled app, everything but flash works, any idea?
If I change the source of the flash file to an internet location which has the file on, it works fine. The only issue is loading the .swf when it is packaged inside the .bar and installed.
(It's for the PlayBook, not mobile phones.)
Any help would be appreciated,
Thanks,
Corran
02-06-2012 11:23 PM
You mean Webworks extension file.
02-07-2012 03:16 AM
Nope? I mean .swf flash files.
02-07-2012 04:10 AM
No way. One thing you can try with creating an webworks extension flash player. And Invoke the player to play swf file.
02-07-2012 04:23 AM
02-07-2012 05:10 AM
Im not said that. I had a situation when working with an app in webworks and i was stuck as you. So i tried to integrate the flash player but it seems required a lot of time to create the code. So i just find a child browser from googling, which using QNXwebstage and able to integrate within the application to play my videos.
04-07-2012 06:42 AM
Did you get anywhere with running swf files locally?
I've seen other posts on the topic, none with any conclusive answers. The problem is almost certainly that flash by default does not allow execution of locally stored swf files for security reasons, but whether there's a way to bypass this behaviour for a webworks app I'm not sure.
Here is a thread that kind of suggests it's now fixed (top of page 2), but gives no indication of any steps to get it working:
04-07-2012 08:31 PM - edited 04-08-2012 10:23 AM
Does your app work as expected in a desktop browser? I can successfully embed .swf files in my WebWorks app and run it on the PlayBook. The three .swf files (I know, one would have sufficed) in the example are local, they are packaged in the .bar file.
<body onload="insert_map();">
<div id="div_map" class="div_map">
</div>
</body>
function insert_map()
{
var div_map = document.getElementById("div_map");
if (div_map)
{
div_map.innerHTML =
"<table border='0' cellpadding='0' cellspacing='0'>" +
" <tr>" +
" <td rowspan='2'>" +
" <embed src='test1.swf' width='600' height='600' />" +
" </td>" +
" <td rowspan='1'>" +
" <embed src='test2.swf' width='424' height='173' />" +
" </td>" +
" </tr>" +
" <tr>" +
" <td>" +
" <embed src='test3.swf' width='424' height='422' />" +
" </td>" +
" </tr>" +
"</table>";
}
else
{
alert("So, I guess something went wrong?");
}
}
04-08-2012 08:45 PM
i have 3 swf files in my app which load on the pb just takes like 1 secodn after the rest of the stuff loads. But do you have your .swf files in the "images" folder? and zipping them? i
think your .swf are in a different folder. This happend to me once and i found out it was because the files i needed where in a different folder, a folder who i didnt include in the zipping.
04-09-2012 09:12 AM
Hi Corran,
Here is a working example of locating a local Flash file in a WebWorks application (snowflakes.swf):
http://blackberry.github.com/WebWorks-Samples/kitc
Source code:
https://github.com/blackberry/WebWorks-Samples/tre
Just make sure to use the correct relative path to where your local *.swf file can be found:
<object data="../../resources/5-snowflakes.swf" type="application/x-shockwave-flash" width="500" height="300"> <param name="movie" value="../../5-snowflakes.swf"/> </object>