Flash with swings

How can I embed a flash video in swing panel?

Flash is proprietary technology and they don't play nice with others. Same reason why you can't load an MSWord doc in a Java GUI. If Flash WAS an open technology, then perhaps someone would/could build a plugin or some way to do it.

Similar Messages

  • Integrating flash with swings

    Hi,
    Im looking to integrate flash with swings. This is for a desktop application, not a web based application. I was looking for some help on this, if someone could help me with it.
    Regards,
    Ghost Rider

    Flash is proprietary technology and they don't play nice with others. Same reason why you can't load an MSWord doc in a Java GUI. If Flash WAS an open technology, then perhaps someone would/could build a plugin or some way to do it.

  • Flash replaces Swing?

    I recently downloaded an evaluation version of jFlash from sesma.com and it seems that Flash makes sense as an alternative for building impressive front end GUI's. Although It took me a while to get up to speed, in the end I could control Flash movies as Java objects. Pretty impresive. What do you guys think?

    If you think about it, the problem with swing is that developers and graphics artists need to be the same person in order to get the job done. When I write swing code, it might work like a jet engine, but it looks like I just took a dump on the screen. I guess you need to be really good a writing a lot of code to make swing look good (too much work -for me at least). Products like jFlash, would problably allow Java developers to work on the stuff that makes the application solid, and in parallel Flash developers can write flash adhereing to whatever the Java developer specs out. And in the end, you end up with a solid app, and a beautiful front end.

  • Flash in Swing

    Is there any way that you can import and use flash in swing?

    I am still trying but if you have Flash 5.0 you will get
    flash.jar file.
    Any way try to get Activex control or Flash Player version 5.0 with
    that you will get the Flash.jar File and how to use it. I think to use this jar file Flash version need to be 2 or 3
    I tried a lot but unable to do. It has all functions like getFrame,play(),stop.
    If you get info please mail me
    [email protected]

  • Can I build a GUI application with SWING only without [import java.awt.*;]

    I have seen several threads (in forums), books and tutorials about SWING and I see that they all mix SWING with AWT (I mean they import both Swing and AWT in their code).
    The conclusion that comes out is:
    It is good to learn about SWING and forget AWT as it won't be supported later. I have decided to do so, and I never include <<import java.awt.*;>> in my code.
    But I see that you cannot do much without <<import java.awt.*;>>. For example this line which changes the background color:
    <<frame.getContentPane().setBackground(Color.red)>>
    works only with <<import java.awt.*;>>. I have seen that codes in this and other forums import awt to change the background. Why is that?
    After all, I wonder, what can I do;
    My question is, can I change the background (and of course do all other things listener, buttons etc) without using <<import java.awt.*;>>.
    I would like to avoid using <<import java.awt.*;>> and using awt since my program will not work later.
    In addition, I believe there is no point to learn awt, which later will not exist.
    I know, I must have misunderstood something. I would appreceate it very much, if anyone could give me even a short answer.
    Thank you in advance,
    JMelsi

    Since swing is a layer on top of awt, AWT will exist for as long as swing does.
    If sun does ever remove AWT they will have to replace it something else swing can layer on to and you will probably only have to replace your import statements.
    The main difference is the way there drawn to the screen.
    You can do custom drawing on swing components but you can't on AWT.
    If your using a desktop PC system it's probably best to use swing just in case you wish to do some custom drawing.
    awt uses less memory than swing and is faster but swing can be extended. awt comes only as standard.
    Say for example you wish to implement a JButton with a ProgressBar below the button text, this can be done with swing!

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • Help:How to publish a Flash with full screen HTML

    Please, guys, be kind enough to teach me how to publish a
    Flash with full screen size in HTML. I have tried to search the
    board, but so far no luck.
    Originally, I want my .SWF to keep changing its background.
    The solution I got was placing colored stage-sized rectangles on
    the bottom layer. Then I don't want the viewers to see the HTML
    area where I cannot seem to control smooth color changes.
    So, after I construct a Flash file with backdrop-color
    changing by the method I mentioned above, how do I publish it with
    full screen mode in HTML, as you can see
    here? Help!
    Thanks in advance, guys.

    Here's an AS2 and a AS3 version I got from David Stiller
    2 small details you have to add 1 in publish settings set Dimensions to percent 100 100
    and in the html set <style>body {margin: 0; padding: 0}</style>
    // AS2
    import flash.display.BitmapData;
    Stage.align = "TL";
    Stage.scaleMode = "noScale";
    var tile:BitmapData = BitmapData.loadBitmap("tile");
    function fillBG():Void {
      beginBitmapFill(tile);
      moveTo(0, 0);
      lineTo(Stage.width, 0);
      lineTo(Stage.width, Stage.height);
      lineTo(0, Stage.height);
      lineTo(0, 0);
      endFill();
    fillBG();
    var listener:Object = new Object();
    listener.onResize = fillBG;
    Stage.addListener(listener);
    // AS3
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var bmp:Tile = new Tile(50, 50);
    var tile:BitmapData = new BitmapData(50, 50);
    tile.draw(bmp);
    function fillBG(evt:Event = null):void {
      graphics.beginBitmapFill(tile);
      graphics.moveTo(0, 0);
      graphics.lineTo(stage.stageWidth, 0);
      graphics.lineTo(stage.stageWidth, stage.stageHeight);
      graphics.lineTo(0, stage.stageHeight);
      graphics.lineTo(0, 0);
      graphics.endFill();
    fillBG();
    stage.addEventListener(Event.RESIZE, fillBG);
    David Stiller
    Co-author, ActionScript 3.0 Quick Reference Guide
    http://tinyurl.com/dpsAS3QuickReferenceGuide
    "Luck is the residue of good design."

  • Flash with background sound (I got error #2037)

    Hallo.
    I am a beginner at AS3 programming. I like to make a flash with background sound (*.mp3 files from *.xml list). Everything works fine, but when I press "onClick" button I got output error.
    Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
        at flash.media::Sound/_load()
        at flash.media::Sound/load()
        at proov_fla::MainTimeline/F_MP3_laadimine()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    My Script:
    var MP3_PLAYLIST:String = "playlist1.xml";
    var LAADI_MUUSIKA:URLRequest;
    var MUUSIKA:Sound = new Sound();
    var MUUSIKA_KANAL:SoundChannel = new SoundChannel();
    var HETKE_MUUSIKA:Sound = MUUSIKA;
    var POSITSIOON:Number;
    var HETKE_INDEX:Number = 0;
    var KAS_MUUSIKA_MÄNGIB:Boolean = true;
    var XML_FAIL:XML;
    var MUUSIKA_NIMEKIRI:XMLList;
    var MP3_LAADIJA:URLLoader = new URLLoader();
    MP3_LAADIJA.addEventListener(Event.COMPLETE, F_MP3_laadimine);
    MP3_LAADIJA.load(new URLRequest(MP3_PLAYLIST));
    onClick.addEventListener(MouseEvent.CLICK, järgminelugu);
    function järgminelugu(e:MouseEvent):void
        MP3_PLAYLIST = "playlist2.xml";
        MP3_LAADIJA.load(new URLRequest(MP3_PLAYLIST));
    function F_MP3_laadimine(e:Event):void
        XML_FAIL = new XML(e.target.data);
        MUUSIKA_NIMEKIRI = XML_FAIL.track;
        LAADI_MUUSIKA = new URLRequest(MUUSIKA_NIMEKIRI[0].path);
        MUUSIKA.load(LAADI_MUUSIKA);
        MUUSIKA_KANAL = MUUSIKA.play();
    My full purpose will look like this http://uusrand.pri.ee/galerii/proov/

    Hallo.
    Can anybody help me to add an actionscript line(s) into attach file "newXML.fla".
    In this file I have a script to play mp3 files from xml list (this works).
    I also add button to load new mp3 fileslist from new xml file. But I don't know how.
    My Script:
    var MP3playlist:String = "http://uusrand.pri.ee/mp3/playlist.xml";
    var MP3file:URLRequest;
    var MP3SoundURL:Sound = new Sound();
    var MP3sound_channel:SoundChannel = new SoundChannel();
    var xml:XML;
    var playlist_index:XMLList;
    var xml_loader:URLLoader = new URLLoader();
    var MP3index:Number = 0;
    xml_loader.addEventListener(Event.COMPLETE, originalXMLfile);
    xml_loader.load(new URLRequest(MP3playlist));
    onClick.addEventListener(MouseEvent.CLICK, nextXMLfile);
    function nextXMLfile(e:MouseEvent):void
        if (MP3playlist == "http://uusrand.pri.ee/mp3/playlist_loodus.xml") {
            MP3playlist = "http://uusrand.pri.ee/mp3/playlist.xml";
        } else {
            MP3playlist = "http://uusrand.pri.ee/mp3/playlist_loodus.xml";
    function originalXMLfile(e:Event):void
        xml = new XML(xml_loader.data);
        playlist_index = xml.track;
        MP3file = new URLRequest(playlist_index[0].path);
        MP3SoundURL.load(MP3file);
        MP3sound_channel = MP3SoundURL.play();
        MP3sound_channel.addEventListener(Event.SOUND_COMPLETE, nextSong);
    function nextSong(e:Event):void
        if (MP3index < (playlist_index.length() - 1)){
            MP3index++;
        } else {
            MP3index = 0;
        var NextSongRequest:URLRequest = new URLRequest(playlist_index[MP3index].path);
        var NextSongURL:Sound = new Sound(NextSongRequest);
        MP3sound_channel.stop();
        MP3sound_channel = NextSongURL.play();
        MP3sound_channel.addEventListener(Event.SOUND_COMPLETE, nextSong);

  • Flash with wmode="transparent" doesn't work with non-US keyboard (like FF)

    Safari has the same issue as FireFox (which they are finally fixing) :
    https://bugzilla.mozilla.org/show_bug.cgi?id=347185
    If you use Flash with wmode="transparent" then it treats all keyboards as if they are US keyboards.
    For example try G.ho.st http://G.ho.st/vc.html with a non-US keyboard

    I too am having issues. I am using Shockwave Flash 11.4.402.287 on Firefox 16.0.1. I am running on Windows 7 Enterprise. Disabling the plugin allows me to load pages quickly, but I am not able to view videos or play games. Firefox freezes upon loading a page that uses Flash. It remains frozen for an unacceptable length of time, then it will unfreeze on its own accord. The freeze affects the entire computer. I cannot interact with the desktop or the Windows start bar, and can only close Firefox by forcibly ending the "firefox.exe" process via Task Manager.
    This is not the first version of Firefox that has displayed this problem to me. Firefox 15 also froze upon using Flash.
    I had hoped that the latest Firefox update would solve this problem, but apparently not. Until then, I am forced to use Chrome, which is quite inconvenient for me as I am not at all familiar with that browser and am constantly clicking the settings button when I want to to go to my home page.
    These freezes are incredibly frustrating and annoying. If Mozilla wishes to build a better Internet, they should try to make their browser a program that doesn't tempt me towards rage-quitting YouTube.

  • On start-up apple signal alternates/flashes with do not enter symbol

    I have not been able to enter safe mode.
    During startup tv apple flashes with the do not enter symbol. It goes on and on. Any suggestions? Thanks in advance. 
    MacBook Pro circa 2008, motherboard replaced 2011

    Sometimes during the process I see a folder symbol with a question mark in the middle.

  • Using Report tool with Swing Application

    I'd like to use a reporting tool (Crystal Reports or anything else) with Swing application. Could anyone help me?

    You have to pass the values are parameters to the Oracle Reports report. Take a look at this: http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    Also you can search this forum for "Oracle Reports"
    Mike

  • Integrating crystal report with swing application

    Hi,
    Any body knows how to integrate crystal reports with swings?
    I'm posting this after a painful search in the net/forum.Any idea
    will be greatly apprecited.
    thanx.
    regards,
    jmos

    The best place to pick up sample code is straight from the horses mouth. [url http://www.businessobjects.com/products/dev_zone/java/default.asp?ref=devzone_main] Crystal java zone

  • Text on some sites flash with yellow background

    Since upgrading to 3.1.1 I've noticed that some pages have text areas that flash with a yellow background when loading or when an ad on that page changes. Huffingtonpost.com is the most common offender, but it has happened on other sites as well.
    The yellow background "flash" seems to be contained within a box or frame in which the text sits. It's brief and then the background reverts to white.
    Just to be clear, I'm not referring to any graphic that is Flash-based. I mean an area on the page that flashes a different color before reverting to its normal white.
    What's going on?

    No solution

  • When I turn off the phone, the screen flashes with sony logo. any solution?

    Hi,
    when I turn off the phone, the screen flashes with sony logo. any solution?

    repair your phone with
    Update Service (SUS)
    PC Companion (PCC)
    Bridge (for Mac)
    Alternatives on How to backup Xperias
    http://talk.sonymobile.com/thread/36355
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • How to save a flash with .SWF

    Hi, I have the 'Adobe Flash CS3 Professional', and I want to
    know if you could tell me how to save a flash with .SWF.
    When I want to create a new project, I can chose between nine
    types of documents, and I want to make a flash for a website. What
    type of document would you chose if you were me ?
    I can't write the name of the diferent types of documents,
    because I have this programme in Spanish.
    Can you help me ?
    Thank you

    FLA is the native source format - make your movie and then
    publish to SWF -
    you can not create an SWF initially - SWF is the
    exported/published format
    of your FLA>
    "Marti_17" <[email protected]> wrote in
    message
    news:gioa0k$otm$[email protected]..
    > Hi, I have the 'Adobe Flash CS3 Professional', and I
    want to know if you
    > could
    > tell me how to save a flash with .SWF.
    > When I want to create a new project, I can chose between
    nine types of
    > documents, and I want to make a flash for a website.
    What type of document
    > would you chose if you were me ?
    >
    > I can't write the name of the diferent types of
    documents, because I have
    > this
    > programme in Spanish.
    >
    > Can you help me ?
    > Thank you
    >
    >

Maybe you are looking for