Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
crwblyth
Posts: 28
Registered: ‎05-05-2011
My Device: BlackBerry Curve 9300

Local .swf flash inside BlackBerry PlayBook app

[ Edited ]

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 

Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380

Re: Flash inside BlackBerry PlayBook app

You mean Webworks extension file.

New Developer
crwblyth
Posts: 28
Registered: ‎05-05-2011
My Device: BlackBerry Curve 9300

Re: Flash inside BlackBerry PlayBook app

Nope? I mean .swf flash files.

Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380

Re: Flash inside BlackBerry PlayBook app

No way. One thing you can try with creating an webworks extension flash player. And Invoke the player to play swf file.

New Developer
crwblyth
Posts: 28
Registered: ‎05-05-2011
My Device: BlackBerry Curve 9300

Re: Local .swf flash inside BlackBerry PlayBook app

Are you implying the playbook hasnt got flash support and I need to make a flash player? haha.
Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380

Re: Local .swf flash inside BlackBerry PlayBook app

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.

New Contributor
edkirk30
Posts: 6
Registered: ‎04-02-2012
My Device: Playbook (soon - hopefully)

Re: Local .swf flash inside BlackBerry PlayBook app

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:

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/SWF-in-bar-file-for-Playbook-Sim...

Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Local .swf flash inside BlackBerry PlayBook app

[ Edited ]

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?");
    }
}

Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: Local .swf flash inside BlackBerry PlayBook app

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.

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Local .swf flash inside BlackBerry PlayBook app

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/kitchenSink/html/browser/flashplayer.html

 

Source code:

https://github.com/blackberry/WebWorks-Samples/tree/master/kitchenSink

 

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>

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.