We help IT Professionals succeed at work.

Embedding .swf file in java

lakshmi
lakshmi asked
on
Medium Priority
605 Views
Last Modified: 2013-11-18
Hi all,

I'm in need to embed a .swf file in JButton. For that should I have flash in my system or are there any plug-ins available to load the swf file without flash ?

And, I want some sample code to put .swf file in JButton. Kindly reply at the earliest.

Thanks in Advance
Comment
Watch Question

Hi
Using the Image we load the pics into the button.
But i don't think it could be possible for a button to have flash inside it.

Shyam

Author

Commented:
hi,

for eg., for a imageicon I'm setting three images to it. , that is seticon,setpressedicon,setrollovericon like that. Now I converted all the three in to one single .swf file , so, it is enough if i add that single file to the button.

In that case, how to do that ?

I heard that flash files can be embedded to java . will it be useful in this case ?
Hi Lakshmi

I read your comments. Even if you load up the .swf file as a property to the button. You won't get the same behaviour as u expect it.

U need to have 3 different events and three different images to work out.
I hope u understand

Shyam

Author

Commented:
ya, I understood. But the thing is though it is good effect or not, i've to show, how it can be embedded. If u know, please send me the sample code.
Hi Lakshmi
Goood Effect means in what sense.
May be an embedded stuff could show your a good pleasant animation Nothing more u will get it out.
But it will consume lot of resources. So please avoid using the Plugin stuff.

How are u going to use this application. Eitheir are Servlet or as Application Please let me that and i will explain u in more detail.

I will send u the code. Once i get or finish. Where should i send it

Shyam
Hi Lakshmi
May be u can create an Object. Which will have JMF Stuff around it say to play the swf file and you can create a property to get fired for it.
This is an first level idea

Shyam

Author

Commented:
could u please do it with sample codes ?
*Send it thro' this itself.*

I also want to know whether without having flash in the system, thro' some plug-ins whether we could execute ?

Hey Lakshmi
You need Flash Plugin Without it won't work
Please U have lot of information abt
flash in swings

I check up in java forum in javasoft.com
Please search for swf you will get lot of info abt playing and lot more

Shyam

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for shyamkumarreddy

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.