Results 1 to 7 of 7
  1. #1
    sam781 is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Playing swf file using Java

    I want to play a swf file in Java program. For this task, I want to use swing and want to play swf file in JFrame. I found an API (Transform swf api) that can play swf file but I could not able to do that.

    Here is the link of transform swf api where some sample codes are also given.
    http://www.flagstonesoftware.com/transform/
    Last edited by sam781; 07-05-2014 at 10:07 AM.

  2. #2
    sam781 is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Playing swf file using Java

    anyone here to tell something regarding my problem?

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Playing swf file using Java

    " but I could not able to do that"

    That tells us nothing.
    For all we know your computer isn't turned on.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    sam781 is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Playing swf file using Java

    Sample code for Transform API is given as below -

    // Add all the objects together to create the movie.
    Movie movie = new Movie();
    movie.add(header);
    movie.add(new Background(WebPalette.LIGHT_BLUE.color()));
    movie.add(fontDef);
    movie.add(text);
    movie.add(Place2.show(text.getIdentifier(), layer++, xpos, ypos));
    movie.add(ShowFrame.getInstance());

    movie.encodeToFile("example.swf");
    Cannot understand how to use this in JFrame.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Playing swf file using Java

    Is that library actually for playing swf files?
    It looks to me like it's for editing them.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    sam781 is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Playing swf file using Java

    @Tolls,
    Then, any suggestion how swf file can be played in Java?

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Playing swf file using Java

    As far as I can make out you need some form of embedded browser.
    JDIC seems to be an option if you're looking for free ones. It will embed the system browser in your Swing app.

    This is from a quick Google, but I've lost the SO thread I found that on.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 12-31-2013, 05:46 AM
  2. Playing . MP3 in JAVA
    By UJJAL DHAR in forum Advanced Java
    Replies: 1
    Last Post: 12-12-2011, 03:54 PM
  3. Java, Playing Music?
    By Alerhau in forum New To Java
    Replies: 3
    Last Post: 08-18-2011, 08:19 PM
  4. Playing mid in java pls help
    By Hees in forum New To Java
    Replies: 5
    Last Post: 06-20-2010, 06:15 AM
  5. Replies: 3
    Last Post: 03-03-2010, 09:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •