loading a swf file from a jar
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bart_Clijsner
Posted On:   Friday, August 10, 2001 03:01 AM

hi, I have created a jar file of my application Now I am trying to load a flash animation out of the jar but it doesnt work I get the error javax.media.NoPlayerException I tried to load it in the same way I loaded my images from the jar wich does work I am loading my resources from the jar with this piece of code : public URL load(String resource) { ClassLoader cl = this.getClass().getClassLoader(); return cl.getResource(resource); } The exception occurs when I try this : Player player = Manager.createPlayer(url); where url is the the URL I get from my previous method    More>>

hi,


I have created a jar file of my application

Now I am trying to load a flash animation out of the jar but it doesnt work

I get the error javax.media.NoPlayerException

I tried to load it in the same way I loaded my images from the jar wich does work

I am loading my resources from the jar with this piece of code :

			
public URL load(String resource)
{
ClassLoader cl = this.getClass().getClassLoader();

return cl.getResource(resource);
}



The exception occurs when I try this :
			
Player player = Manager.createPlayer(url);



where url is the the URL I get from my previous method

If I try this when my flash files are outside the jar it does work


anyone an idea what I am doing wrong ?

thanx in advance

   <<Less

Re: loading a swf file from a jar

Posted By:   Christopher_Schultz  
Posted On:   Friday, August 10, 2001 10:13 AM

Uhh... are you sure that 'Manager' knows how to load shockwave (flash) files?



-chris
About | Sitemap | Contact