function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
elrenesonelreneson 

Include Flash (.swf) with external assets in a VF Page

Hi everyone,

I'm trying to include a flash file (.swf) in a VF page. But this .swf is loading assests like images etc etc from a folder.

What I'm doing is creating a .zip file and uploading it as a static resource named FlashZIP.

Let's say this file zip contains:

/Flash.swf
/assets/img.jpg


The VF page code is as follow:


<apex:page showHeader="false">

  <apex:flash src="{!URLFOR($Resource.FlashZIP,'Flash.swf')}" width="1047" height="723" />

</apex:page>


The flash error I'm getting is like this:


Error: Unable to load style(Error #2124: Loaded file is an unknown type. URL: assets/img.jpg).
    at <anonymous>()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\styles\StyleManagerImpl.as:858]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at ModuleInfoProxy/moduleEventHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1097]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at ModuleInfo/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:734]


It's like it cannot access the assets inside the static resource file.


Does anyone know how could I figure this out?


Any suggestion will be well appreciated,


Thanks !!
Andy Freeston_LarterAndy Freeston_Larter

Test your Flash component using Firefox with Firebug installed and the network tracing activated. It should capture the request to load the asset. You can then compare the path that the Flash code is requesting to the path you would use to manually load the asset.

 

You might find that the path or domain is wrong.

- Andy