Playing Flash animation in FLEX

Hi,
I've created five animation in Adobe Flash and now I want to use it in my FLEX app. I want to use two buttons, start/stop and PAUSE, for every animation. I've tried to use FlashComponentPlaceholder but I don't know how to control my animations. I've allready tried to find any help in google, but I can't find anything. How to use my animations in FLEX app properly and how to control them by buttons? Is there posibillity to change animation speed in FLEX? How to disable animations autostart when app loads?
Thanks for any help ;]

why don't you just create very simple movie player, something like that:
<mx:Metadata>
[ Event(name="complete",type="mx.events.VideoEvent")]
</mx:Metadata>
 <mx:Script>
<![CDATA[
 import mx.controls.VideoDisplay; 
import mx.events.MetadataEvent; 
import mx.events.VideoEvent;
[Bindable] publicpublic  var video : String;
 public function play():void{
videoDisplay.play();
public function stop():void{
if (videoDisplay.playing)videoDisplay.stop();
public function get playing():Boolean{
return videoDisplay.playing;}
 private function playPauseButtonClicked(evt:MouseEvent):void { 
if (videoDisplay.playing) {   videoDisplay.pause();
}else {  videoDisplay.play();
 private function stopButtonClicked(evt:MouseEvent):void {videoDisplay.stop();
 private function stopBubbling(event:Event):void{
if (event.eventPhase == EventPhase.BUBBLING_PHASE)event.stopPropagation();
private  
function playheadUpdate(evt:VideoEvent):void { 
</mx:Script>
<mx:Canvas width="100%" height="100%">
<mx:VideoDisplay id="videoDisplay" source="{video}" playheadUpdate="playheadUpdate(event)" width="100%" height="100%" complete="videoCompleted(event);" bufferTime=" 
1"/>
<mx:HBox id="controls" styleName="videoControlSkin" alpha="0.0" click="stopBubbling(event)" visible="false">
     <mx:Button id="playPauseButton" styleName="videoPausePlayButton" toggle="true" selected="{videoDisplay.playing}"
     click="playPauseButtonClicked(event)"
/>
    <mx:Button id="stopButton" styleName="videoStopButton" click="stopButtonClicked(event)" />
</mx:HBox>
</mx:Canvas>
Stick it somewhere on your canvas and here you go.

Similar Messages

  • Presenter does not play Flash animation

    Hey.
    I've got a problem with the Presenter when trying to incorporate a certain Flash animation into the presentation. The Flash animation is just a collection of spheres who move and collide according to an Action Script Code (AS 1, not 3!). Since the whole animation is dictated by the script, the duration is just 1 frame. When I create the .swf file, it works fine.But as soon as I incorporate it in PowerPoint and export the presentation with the Presenter, the animation shows nothing more but the first frame.
    I tried both settings for the .swf managment (managing by presentation - true and false), neither of those worked.
    Does anybody have any idea what I can do about this?
    Thank you!

    Hello Dinindaerrtu - After how many weeeeeeeks. I finally have it working. You are not going to believe what my problem was... BOY! O! BOY!
    I might have lost the plot as to what your problem was but let me explain what I did. Off the bat I could not even import an swf and play it in presenter. Nothing worked even although I have done it before. I know your solution was to have it run in one frame. Ok! Ok! I am so excited because I have eventually got it to work ... heee.... with help from Adobe (Kapil ... thanks Kapil). So here it comes... Ready? All I had to do was upgrad my version of Presenter. I must have upgraded my version about 4 times. My current version is 7.0.6 Build 7604.
    I created a couple of tests and it works.
    I am so holding thumbs that this will sort your problems.
    Let me know
    Dimitri

  • Play flash in powerpoint?

    Did anyone have success in playing flash animations (SWF) in powerpoint (version 2004) on the mac?
    The SWF i've got plays fine in Safari, but not at all in powerpoint ...
    Any ideas, pointers, insights will be highly appreciated.
    Best regards,
    Gabriel.

    The prereq's to doing this are:
    Microsoft Office
    Apple QuickTime 6+ (Mac uses the QT engine for SWF playback)
    The Flash SWF file has to be version 5 or earlier (yes version 6 and 7 don't work)
    If you meet all of these requirements then all you need to do is navagate to the slide you want you Swf file to reside on and
    Insert > Movie from File > and choose the Swf file you want to embed.
    and there you have it.
    iFelix

  • Flash animation with Tweener won't show animation in Flex

    Hello,
    I made an animation in Flash which I want to embed in Flex using SWFloader.
    I've imported the tweener class (caurina.transitions.*) to tween a rotation. The animation runs perfectly in Flash.
    However, when I embed the animation in Flex, the tweening is gone.
    Do I need to import the tweener class in Flex?
    Thanks alot,
    Bart,
    Geography and sciences teacher
    I use Flash Player 10 (latest version), Flash CS4 Professional version 10.0.02, IE8 and Flex Builder 3.
    Since I'm not sure whether this is a Flex or an Actionscript problem, I'm posting this on both fora. Cheerio!

    Hi ASWC,
    A coding problem is hard to believe because:
    - it runs properly outside of Flex
    - and most of all: the code comes from one of Lee Brimelow's videotutorials http://gotoandlearn.com/play?id=91 . So maybe it is more a Flex problem.
    Bart

  • How to remove the button "play" and "stop" in that flash animation?

    The animation is this one ...
    http://adf.ly/OTGyh
    Hello, I made a simple flash animation of a character talking ... The only problem is that this animation has the button "play" and "stop" and I do not want it ...
    I want so carry out the main character speak the message and stop yourself automatically without user intervention to push any buttons ...
    I have the animation code, how do I get this code to the buttons and start the animation so load the page?
    Ah, and how to put the link to a page by clicking on this open a flash site?

    How to do it step-by-step? Because i'm beginner in FLash and that things of animation, codes, functions...
    And I create that simple animation in other program, not using the Adobe Flash, but I think can be edited that file animation in Flash because I have the files ".swf" and ".flv"...
    I don't know how to do it in Adobe Flash CS3, but I have that program installed in my pc, then can you talk me what to do it?
    Sorry my bad english, i'm from Brazil.
    That is the folder contains the files:
    https://dl.dropboxusercontent.com/u/11826717/off/laranja/files_animation.jpg
    That is the Download the files of that folder if you want see better:
    https://dl.dropboxusercontent.com/u/11826717/off/laranja/laranja.rar

  • How to Prevent Flash Animation Playing?

    I have a flash animation that plays automatically when the user lands on the homepage of my site. It's part of the header, so it's present on every subsequent page of the site as well. However, I would like it to NOT play on the other pages. It should be visible, but only display the first frame or so of the animation, rather than playing automatically on every page.
    How do I stipulate that in the code? Is there a line I can add somewhere?
    Thanks for any help.

    the easiest thing to do, is to create two different swfs.  one for the home page (that you've already made) and one for the other pages which will be the same as the one you have now except you want to add a stop() to the swf's first frame.

  • NEED HELP!!! Flash Animation (MAC) play back on PowerPoint (PC)

    NEED HELP!!! Flash Animation (MAC) play back on PowerPoint
    (PC)
    Shockwave Flash Animation is complete.
    We want to change the Flash Animation w/video (MAC) files to
    QuickTime files.
    Then change the QuickTime files using Adobe Premiere®
    Pro CS3 to an MPG level 1 file (not level 4)
    Must be expert in:
    Shockwave Flash Animation (MAC)
    QuickTime (MAC)
    Adobe Premiere® Pro CS3 (MAC or PC)
    AdobePowerPoint (PC)
    Virtual,Telephone or inperson heip on how to make a Shockwave
    Flash Animation (MAC) play back on PowerPoint PC

    (This is the Adobe Scout forum for game developers, you should try the Flash Player forum)
    To install Flash Player, try this link: http://get.adobe.com/flashplayer/

  • Flash animation playing way to fast in slides

    Hello all,
    I imported a flash AS3 annimation in captivate 8, but the animaton plays faster than it should. Is there anyway that i could get it to the normal speed as when i play it in a flash palyer ?
    thanks in advance.

    Default speed in Captivate is 30FPS, check the framerate of your SWF animation, probably it is lower (default is 24fps). Either you change the framerate of the Flash animation up to 30, or you lower the framerate in Captivate to the same value as the animation before publishing. You can find the framerate in Preferences, Project, Publish Settings

  • Make a Flash animation play only when it scrolls into view

    I am designing a very long page. There will be a flash animation at the bottom of the page. I want this animation to play only when the user scrolls down and this flash object comes into view. How do I do this? I am quite familiar with flash and actionscript, so I just need some pointers.
    I have seen that this is already being used for advertisements. If you visit www.amazon.com, there are ads that appear far below on the page. These ads play only when you scroll down and the ad appears within the browser window. This happens on many other sites as well.
    Many popular sites also use something like this. On CNN, try opening a new tab that loads a flash video. The video begins to play only when you actually go to that tab. Until you open the tab and the contents become visible in your browser window, the video doesn't start. How is this done?
    Thanks in advance,
      Kumar

    Hmmm ... It looks like Amazon doesn't always run ads. I will give another example.
    Take a look at http://digg.com/
    There is a 300x250 ad at the top of the right-column. Ignore that.
    In addition, there is a second 300x250 ad halfway down the page in the right column.
    This second 300x250 ad appears when you scroll down.
    The interesting thing is that the ad plays from the beginning when you first see it after scrolling down!
    Most flash ads run for 15 seconds. After that the animation stops. When you see this second 300x250 ad, you will find it at the beginning of its 15 second animation. It plays from the beginning even if you wait for some time before scrolling down. This means that the ad is waiting for you to scroll down before it begins to play.
    How is this done?
    Thanks.

  • Flash Animations and Movies are lagging after having played a flash game which was graphics intense heavy and frequently refreshed which caused lags, how can I fix this lagging problem for Flash?

    On June 30th, I was playing a game called Lil Einstein's Manhattan project over at Newgrounds.com and the game although fine at first, later on in the advanced levels of the game, started to cause my browser to lag intensely and heavily. Now, when I try and watch other flash movies and animations, the flash doesn't run as smoothly, there are skips in the flash animations and movies, and it slows down.
    I tried scan disks, I tried defragmenting my computer, I tried uninstalling and re-installing Firefox.. Nothing worked to restore the Flash.
    But when I view Flash movies and animations on Internet Explorer, they run fine... but not anymore on Firefox.
    Other Firefox users who have played this game also reported problems as well..
    How can I fix my Firefox Browser and return the Flash running to normal?
    == This happened ==
    Not sure how often
    == June 30th, 2010

    If you have already scanned PC with an updated Anti-Virus and still the issue exists then I would suggest some troubleshooting techniques to resolve this problem:
    Update browser
    Remove unwanted Add-ons
    Remove unwanted Tool-bars
    Repair Registry
    Repair ActiveX objects and shared DLLs
    In case of facebook and Zynga I would suggest to Check for Problems with your Internet Connection.Try to Update Java and Reduce the Number of Running Internet Applications.
    Sometimes Multimedia content lag due to Hardware Acceleration, so disabling Hardware Acceleration should fix your problem.
    Open Flash Video in browser
    Right click on Video Player | Settings
    Open Display Panel
    Uncheck Enable Hardware Acceleration
    If issue still exists then you can find some more techniques described in detail here:
    http://www.shockwaveflashcrash.com/Easiest-fix-for-shockwave-flash-plug-in-Crash.html

  • Red screen appears when Flash animation plays inside Captivate

    Has anyone experienced this problem? A Flash animation inserted into Captivate displays a red screen briefly when the animation plays. I've never had this happen before.
    Ideas?

    Hi there
    Someone else recently reported the same behavior in the thread linked below:
    Click here to view the thread
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Play a flash animation in same page

    Hi,
    i am trying to build my online portfolio and i wish to play
    my flash animation portfolio on same page when user click specific
    button, everything was fine, except when i try to import the swf
    file (publish from my flash animation portfolio) to library and
    create a movie clip symbol, i found the import swf file not running
    same as original, some fade in and mask effect missing and speed
    are totally difference. Appreciate anyone could help.
    Thanks.

    i think that's expected behavior. importing a swf file is
    probably not what you want to do.
    you can load a swf file and you can drag and drop movieclips
    from one swf into another without problem.

  • Slow flash animations after a few hours playing

    Hi, i have recently developed a standalone Flash entertainment system, containing Flash games and screensavers etc., i have also included a third party mp3 player.
    The problem i have is the PC is left switched on daily and the system is used quite heavily, i.e mp3's playing in background while screen savers are displayed and games are played.
    Everything starts fine but after a few hours the flash animations slow down to about 2 or 3 frames per second, then the PC will finally crash.
    What may be causing this?

    Flash isn`t exactly a Pro when it comes to garbage collection. So a running application will constantly feed on your systems memory (it always goes up, never down). Best way to avoid these problems is, to make a task that every 2-3 hours closes tha application and restarts it. There is really nothing you can do about it codewise.
    For more in-depth info see here

  • Timing Flash animations in Adobe Presenter

    Hey everyone.
    I've got a rather exotic problem:
    I'd like to make a video with the Adobe Presenter in which an animation (made in Flash) is running while I am talking. Since there are multiple animation steps with pauses in between, I need to find a way to time the animation steps. I know I can do this in Flash by prolonging the pauses in between the steps, but that strikes me as rather complicated (because I have to know my exact speech timing when composing the Flash file).
    Do you know another way to pause and continue the animation while recording my talk?
    My idea was the following:
    Put a button into the lower corner of the flash file which needs to be clicked to continue with the animation after each animation step. The problem is: While recording with the Presenter, I cannot click the button.
    Any ideas??
    I'd appreciate any help I can get

    Question: why not just include your audio track directly within your Flash anim?  This way, you can sych your visual elements to the narrative right in Flash without having to guess where or when something should happen when playing back in Presenter.
    Just remember, however, that all SWF files need to be set to 30fps so that they'll play correctly in your Presenter content.
    Rob
    http://www.robrode.com/yabb/

  • How Can I Make a Flash Animation for TV?

    I'm learning flash animation and am wondering once I save the flash file to a dvd format, how does the end-user navigate when they put the dvd into their TV? Do I need to design and incorporate a menu for the end-user? If so, how does the TV remote control navigate through this menu that was created on a Mac computer? Thank you for your help, I really appreciate it.

    I don't know a lot about this subject but thought I'd give it a shot to answer.  You can use Adobe Encore to create menu systems for your DVD title screen.  As far as Flash is concerned I think you can import your animations into Encore's menu system though I'm not exactly sure how.  If you want to just make an animation that will be played back without interactivity you would just export your Flash animation as a Quicktime MOV file and import it into After Effects for further editing and finishing.  Once you render your mp4 (h.264) from AE you can bring this into Encore to author for your DVD.

Maybe you are looking for

  • Questions on JarEntry and File

    Hi, I am wondering what a JarEntry represents? All files and directories inside a JarFile? I can get the number of JarEntries using the following: int numOfEntries = jarFile.size();Then if I extract this jar and use a small program to recursively vis

  • Forms-need re-editable PDF and download

    We are looking to create re-editable forms for our students to update each semester (PDF printable style) but would also love to have results downloaded to a spreadsheet. We have Lifecycle and Adobe Pro X and can get Adobe Pro XI. I'm not terribly te

  • Here Drive not working in Nigeria

    here drive on my Lumia isn't working in Nigeria either. The key reason I got a Nokia. Moderator's notes: The post was edited. A more appropriate subject is provided. Solved! Go to Solution.

  • Yesterday: working fine Today: ghost password I can't figure out

    Within seconds after a simple reboot (using the powerswitch) after the computer froze, the computer that had never required a password ever before restarted to ask me for my login security code? I don't know where or how that got set up during a rout

  • How to increase query time out

    I have a report which is generated using a huge SQL, it is erroring while displaying results, due to time out error: State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error