Hi,
I would like to integrate a flash object in my web application. If the flash
object does not require a configuration file, it works fine with the given
example at
http://cwiki.apache.org/WICKET/object-container-adding-flash-to-a-wicket-application.html.

However, it does not work, if the flash object is based on an XML
configuration file.  In my case, the flash objects requires some information
from  the config.xml file which must be placed within the same folder as the
flash object is placed. 
But I always get the following error:
“Error loading asset - please check config.xml & all assets exist on the
expected path  Error #2032”

Playing around with the firebug, I found out that the flash object always
looks for the config.xml file in the root folder of the web application!?!?
Therefore I searched the Forum for another solution. I found an interesting
posting at
http://apache-wicket.1842946.n4.nabble.com/Embedding-advanced-flash-object-td1875047.html.
>From this posting I used the following code, but I got the same error
message:

static final ResourceReference WHITEWHEEL = new ResourceReference(
TastefulSearchPanel.class, "WineWheel.swf" );
static final ResourceReference CONFIGWHITE = new ResourceReference(
TastefulSearchPanel.class, "config.xml" );

String swfURL = RequestUtils.toAbsolutePath( urlFor( WHITEWHEEL ).toString()
);

WebMarkupContainer flashParam = new WebMarkupContainer("flashParamTag");
WebMarkupContainer flashSrc = new WebMarkupContainer("flashSrcTag");
WebMarkupContainer flashEmbed = new         
WebMarkupContainer("flashEmbedTag");

IModel flashConfig = new AbstractReadOnlyModel<String>(){

                @Override
                               public String getObject() {
                                                              return
RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(CONFIGWHITE).toString());
                               }
};

IModel flashFile = new AbstractReadOnlyModel<String>(){

@Override
                               public String getObject() {
                                                               return
RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(WHITEWHEEL).toString());
                               }

};

flashParam.add(new AttributeModifier("value", flashConfig));
flashSrc.add(new AttributeModifier("value", flashFile));
flashEmbed.add(new AttributeModifier("flashvars", flashConfig));
flashEmbed.add(new AttributeModifier("src", flashFile));

add(flashParam);
add(flashSrc);
add(flashEmbed);


**********************************************
In the mark-up I use the following code:


                    
                    
                    
                     
                      
                    
                    


**********************************************

Do you have any solution on my problem? The weird thing is, that it works on
a regular web server, when I deploy the html markup that is generated by
wicket (of course, after modifying the paths that were also generated by
wicket). As I said, the problem is that it always tries to access the
config.xml file from the root of my web app at
http://localhost:8080/w7/config.xml. 

Thanks for your help.
Rainer


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Configuration-file-of-flash-object-not-found-tp2539291p2539291.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to