Pause music in SWF file?

When I play back SWF files from Newgrounds that have
background music, and I pause the movie with Enter, the music
pauses as well to keep in synch with the animation. Yet when I play
back test movies in Flash, the music keeps playing even when I
pause the animation. Why?

Hi. It looks like your code is not finding the mp3. At least,
I can reproduce your error code by removing the mp3 from the
directory, or renaming it.
Btw, if you test with FF instead of IE, you'd see the error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2032:
Stream Error.
at KZFlash_fla::Sound_2/KZFlash_fla::frame1()
Hope that helps.

Similar Messages

  • Problem with music in swf file when loading site to server

    Hello,
    I am a newbie to Flash and have an swf file I created for a
    website,
    http://www.kanzamancleveland.com.
    I have a button there that turns the music on/off when the site
    loads. I also put some music into the swf file, but instead of
    putting it directly in the swf file, I am calling it from the
    actionscript code in the swf file. I want it to stream when the
    site loads and start loading/playing after the site loads. The code
    is embedded in the on/off button. Now this code works when the swf
    file is on my local hard-drive, but when I put it on the server
    with the rest of the website, it doesn't work. Any ideas?
    Here is the code:
    import fl.motion.Keyframe;
    import flash.display.MovieClip;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.events.MouseEvent;
    var _sound:Sound;
    var _channel:SoundChannel;
    var _playing:Boolean = false;
    var _position:int;
    var request:URLRequest = new URLRequest("lowsaaloony.mp3");
    var buffer:SoundLoaderContext = new SoundLoaderContext(5000);
    _sound = new Sound( );
    _sound.load(request, buffer);
    _channel = _sound.play( );
    _playing = true;
    offbtn.addEventListener(MouseEvent.MOUSE_UP, onPlayPause);
    function onPlayPause(event:MouseEvent):void {
    if (_playing) {
    _position = _channel.position;
    _channel.stop( );
    } else {
    _channel = _sound.play(_position);
    _playing = !_playing;
    gotoAndPlay(2);
    stop();
    I put the code together going from various Flash help
    websites, and it works when everything is on my local hd, but again
    as I mentioned before, when I put it up on the server, the music
    doesn't play. I contacted the hosting company and they said that
    they do allow streaming music on a website using Flash. Any help on
    what I am doing wrong, or what else I need to do would be highly
    appreciated. Thank you.
    Jay

    Hi. It looks like your code is not finding the mp3. At least,
    I can reproduce your error code by removing the mp3 from the
    directory, or renaming it.
    Btw, if you test with FF instead of IE, you'd see the error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2032:
    Stream Error.
    at KZFlash_fla::Sound_2/KZFlash_fla::frame1()
    Hope that helps.

  • How do you add a controller to a SWF file?

    I am a newbie.
    How would I add a controller for play and pause to a SWF
    file? I want to put several SWF files up on a website but want to
    be able to control them. Instead they all play once the web page
    loads.
    Please help.
    Thanks

    > What is need is a %LinksDir% variable.
    I have no client available with links redirected, but basically, this
    should result in a registry value containing the new path. Simply
    regedit and search for your "links" redirection path.
    Then use Item Level targeting "registry value" to store this path in a
    temporary variable that you can use in the target path for your shortcut.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Swf file getting paused/freezed while playing

    Thanks in advance for  the help provided.
    I have created swf file using scorm format in captivate. Both in preview  and  publish, the frames get auto pause in the middle(it varies - sometimes middle, sometimes towards the end) of the slide duration. To resume, we have to manually select the play button in the pay bar. As a result of this, text animation with fixed duration fly in as a block once we select the play button.

    Hello Parvathy,
    The behavior is normal. You are using a Button widget, I think the corrected Static Button widget, and that one pauses at half the duration of its timeline. Since you show those widgets for the total duration of the slide, which is 31 secs, it pauses at exactly 15,5 secs. I did check this by using a Text Caption with the system variable rdinfoCurrentFrame, it halted at the value 465 (FPS=30, so this is 15,5secs).
    Do you need that widget really? For a normal button (you could create a custom image button with similar look) you can control the timing of the pause, which is not the case for this widget. Or else you'll have to delay the appearance of the widget, so that its duration is shorter and time in such a way that the last Text animation is playing totally.
    Was also astonished by the size of that 1-slide file...
    Lilybiri

  • When loaded in an internet browser, a Captivate 2 exported flash player 8(.swf) file doesn't pause when it should

    I have made tutorials using Captivate 2 and exported them as
    an .swf file. When played in Flash Player 8, when previewed in
    Captivate 2, and when loaded in an internet explorer, it doesn't
    pause at each slide like I have programmed it to do in Captivate 2.
    I have put buttons in each slide and make them pause the slide
    until the viewer clicks on it an tells it to move on. It randomly
    doesn't pause and continues on to the next slide. It sometimes
    works and sometimes doesn't work. It's not consistently one slide
    and not another. It is random. Does anyone have a clue what is
    wrong?

    Thank you for pointing out that I need to download the projector. How do I ensure that every time I double click on a swf file, it does not launch Adobe Flash Professional, but instead, it launches Flash Player ver 14. Do I have to place the Flash Player Projector in the library or applications, where exactly should it be placed.
    Next, when I launched Flash Player ver 14, to open the swf file, I clicked on a button that is linked to a website - I get a message:
    "Adobe Flash Player has stopped a potentially unsafe operation,... To let this application  communicate with the Internet, click on settings" I clicked on settings and get the attached panel, which does not make sense to me. And I cannot launch a website by clicking on the button contained in the swf file. Please advise.
    I am using a Mac Book Pro, OSX 10.9.3

  • Can i add play/pause button when playback swf file??

    Hi all
    i have a script to convert ms office docs to pdf then to swf files and display it in my web site, the problem is that the output files (swf file) contain each page of my documents in a separated frame and when i load the page there no possibilitie to control this file (play / stop) or (next/previous) buttons, the only way is to use the right click menu options.
    i am asking if there are any solution to embed my converted swf files and control it.
    thanks

    Hi,
    It sounds like you'll want to talk with the author of the script that builds the swf.  If that's you, then I'd recommend reposting this question over on the Flash Professional forums.
    Thanks,
    Chris

  • Flash .exe or swf files will not play on Vista

    I decided to learn how to create captions for flash video,
    using CS3. I tested this project and it worked fine. I could just
    double-click on the app or the swf and the captioned video played
    fine on my Mac. I only had Flash (CS3) on my Mac, so I created the
    files there.
    I then published an exe to move over to my Vista machine.
    When I double-clicked on the file, it brought up Flash Media Player
    version 9, but only showed a blank white box. Very frustrating.
    After some research, I read that Windows Vista was not
    compatible with Flash Media Player 9. Only 10.02xxx or later (I
    forget the exact version - it was long) was supposed to work with
    Vista. Since CS3 uses version 9 to pack into the executable (PC) or
    app (Mac) projector files, I thought maybe this was the problem.
    So I downloaded the demo of Flash CS4, thinking this version
    would pack version 10 into the projector and this would solve my
    problem.
    While the CS3 version of my saved flash video project would
    open in Flash CS4, it would not play when I tested the movie inside
    Flash CS4. It would just show a skin at the bottom of the video
    player only (with a play/pause button), and it had moving blue bars
    on the skin like it couldn't really load either.
    I then decided to create the whole flash video with captions
    from scratch under Flash CS4. This time when I tested the movie in
    Vista, it worked fine. When I published either the projector exe or
    the html/swf combination, it worked fine. So proudly (and finally!)
    I sent the exe over to my boss. But..... you guessed it. The Flash
    Media Player 10 that started up when the file was double-clicked
    just showed a blank white screen again!
    So then I moved the exe over to another partition to test to
    see if there was some dependent directory pathway saved as part of
    the flash video file. The exe wouldn't play on the other partition!
    So I thought I was onto something. I then tried moving files that I
    thought the exe might be dependent on (although isn't the point of
    a projector to be stand alone?) to the same directory on this
    partition as the flash exe projector file.
    I ended up moving the captions.xml file, the swf files (flash
    video player skins included), and the html file that the swf file
    is supposed to be embedded in. NOTHING worked.
    I even read that someone with this problem saved his Flash
    CS4 file as a Flash CS3 file before he published it, and that
    worked for him. So I tried that too, but with no joy.
    So I am totally stumped. Does anyone out there have advice or
    even a solution?
    Much Thanks,
    Chuck

    HI
    You can use FlashJester Jugglor to create one EXE file by
    adding the FLV in
    the Additional Files section.
    Try it
    http://www.jugglor.com
    Let us know if you have any further questions.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    DISCLAIMER:
    This email message is intended only for the addressee(s) and
    contains
    information that may be confidential and/or copyrighted. If
    you are not the
    intended recipient please notify the sender by reply email
    and immediately
    delete this email. Use, disclosure or reproduction of this
    email by anyone
    other than the intended recipient(s) is strictly prohibited.
    All measures
    have been taken to ensure this email is virus free - however
    no warranty is
    made that this email or any attachments are free of viruses.
    Virus scanning
    is recommended and is the responsibility of the recipient.

  • Can Captivate 7's playback controls control Flash swf files?

    Hi folks,
    I have created a swf file using Adobe Flash and I have imported it as an animation slide in Captivate 7. I have turned on the playback controls to just have the play button and the progress bar. When I export the presentation, the playback controls do not work. The scrubber moves as the presentation is playing, but I can't pause the presentation. When I stop the scrubber or even move it left or right, it does not affect the presentation and it just keeps playing. Am I doing something wrong? I don't want to have to create a custom nav bar in Flash as it would just be easier to use Captivate's playback bar.

    I don't think it can be expained quickly as it can be very complicated. But...
    Select New Project/Widget in Flash and choose static widget. You need to be very adept in AS3 to actually get them to work.

  • How do I add playback control to a .swf file in Director 11.5 (PLEASE HELP!)

    Hi,
    I am currently trying to add controls (play/stop/etc) to a .swf file within Director 11.5. The movie imports fine and plays perfectly, however there does seems to be built in options to add the control in the same way you would for a .mov.
    The .swf file has been created with controls and plays outside of director fine. When it is placed into director the controls disappear and leave a white space.
    Is there a step by step guide somewhere or can someone give me a step by step guide? I'm fairly new to director and won't know some of the terms etc....
    The movie is 30 mins long and requires the user to move to various points and pause the playback. I cannot change the format of the file either.
    Please let me know if you need any more info...
    PLEASE HELP, I have to complete this in 2 days.
    W

    Probably too late for your project but...
    You can do this by using 3 sprites in addition to the SWF. In this example, I've named them "videoPlay", "videoRewind, and "videoStop". The SWF in this case was named "video."
    Apply this script to each of the 3 sprites.
    property mySprite
    on beginSprite me
      mySprite = sprite(me.spriteNum)
    end
    on mouseUp me
      case mySprite.name of 
        "videoPlay":
          sprite("video").play()
        "videoStop":
          sprite("video").stop()
        "videoRewind":
          sprite("video").stop()
          sprite("video").rewind()
      end case
    end

  • Ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • How to Put Controls on SWF File... then Export  to FLV

    Have a swf file that self plays.
    What I Need:
    I need to imbed this self playing 2 minute video clip with
    sound...but I want it to have controls on it and be paused. I want
    to use dreamweaver to place it in the web page but stupid
    dreamweaver only puts controls on a flv file NOT SWF's.
    How can I get a swf file, then add controls, then output to
    FLV so Dreamwemaver can put it on my page.
    I have Adobe Dreamweaver CS4, Flash CS$ but DO NOT KNOW HOW
    TO USE IT - Tried but failed miserably (it didnt even want to put
    controls easily on this...I tried for 30 min but couldnt break
    through. I have the CS3 Master Collection.
    Thanks
    All I want is for this video to play universally and nicely
    in a web page of mine...when will this stuff ever be compatable and
    transparent to use!
    Suzzie

    For me, not. But yes I have to do this. Maybe I manual have a table which includes the y axis coordinates. X axis is dicrete then when I get the value 2 I will look at its y axis and take the coordinates of the y-axis corresponds to the table
    Is it difficult? 
    Yasemin Barutçu
    Electrical And Electronics Engineer

  • How to play swf file in flex builder3?

    Hi!!!!!! I have made a video player in Flex project ......In source of video display I have added the path of my swf file which is as follows:
    <mx:VideoDisplay id="player" source="C:\Documents and Settings\sachin\Desktop\absolute-values.swf"
    maintainAspectRatio="true"
    width="450" height="300" autoPlay="false"
    playheadUpdate="videoDisplay_playheadUpdate(event)  ;"/>
    But when I am clicking on Play button ,I am getting following error:
    Error: 1000: Unable to make connection to server or to find FLV on server.
    at mx.controls.videoClasses::VideoPlayer/play()[C:\autobuild\3.2.0\frameworks\projects\frame work\s rc\mx\controls\videoClasses\VideoPlayer.as:1327]
    at mx.controls::VideoDisplay/play()[C:\autobuild\3.2.0\frameworks\projects\framework\s  rc\mx\controls\VideoDisplay.as:1464]
    at basicvideoplayer/___basicvideoplayer_Button1_click()[C:\Documents and Settings\sachin\video player\src\basicvideoplayer.mxml:44]
    Can anyone help me in removing this error?Kindly give me a  code  to Play,Pause and stop my swf file.

    GRag and Mesh are correct. You cannot use Flex to access a file on a user's hard drive, which is where your path is pointing.
    Instead, create a folder within your Flex project, under the "src" folder (example: src/assets/videos), and put the SWF there. Change the path in your code to point to the new location, like "assets/videos/myVideoFile.swf". Note that you don't refer to the src folder; it is the "root" of your application, and when you deploy all your files to your web server, you will be copying the folders you created to the root folder of your web server. So, all the paths will remain consistent. Flex will attempt to find "assets/videos/myVideoFile.swf", starting from the "root", or location, of the application itself.

  • How to exit or unload a swf file

    Hi,
    I create a .swf file and couldn’t seem to find actionscript code to exit/unload the file.  I also can’t find code to automatically load a file as a full screen.  I have used the code below but it seems to only works in projector or .exe files but not in the .swf file.
    Exit/Unload:this.btnExit.addEventListener(MouseEvent.CLICK,Exit);
    function Exit(event:MouseEvent):void{
                    fscommand("quit");
    Does anyone have any recommendations?
    Thanks.
    Suoevolat

    This is a link going out to clients - once the link is pressed it opens in a web browser.  It's a 2 minute interactive video presentation.  I have play pause rewind fast forward  and exit buttons so that the user has control. I want the user to be able to exit out of the presentation - closing the browser.  I created this in Flash Professional CS5 and coded using Actionscript 3.
    Many thanks,
    Suovelat

  • FullScreenButton in SWF file in an HTML Page

    I have inserted a small video as a SWF file into my homepage along with Play, Pause, FullScreen and Mute buttons (loaded from the Flash Components panel). The Play, Pause and Mute buttons work fine. But when I click on the FullScreen Button nothing happens. It won't open the SWF video in a new page at full resolution. Any suggestions?

    your embedding html code must allow fullscreen.  if you let flash publish an html file for you and you change your publish settings to allow fullscreen, you'll see what's needed.

  • Loading as2 swf files into as2

    i had load my swf file with as2 and i like to add controls like play pause stop time slider for its pls help me with some examples ........................

    use google to search for a tutorial about as2 timeline control.
    if you need help with code you're trying to implement, ask here.

Maybe you are looking for

  • How to read the file from ftp server

    Hi I need to read a file from a ftp server . Iam using apache lib common-net .jar . FTPClient ftp = new FTPClient(); ftp.connect(server); ftp.login(username,password); FTPFile[] files = ftp.listFiles(); for(int i=0 ;i<files.length;i++){ System.out.pr

  • Error Message when installing adobe reader 9.1

    I have a relatively new HP Pavilion dv6936us Entertainment Notebook PC with Windows Vista Home Premium 64-bit.  I cannot get adobe reader installed.  I always get an error message or it says the install was interrupted.  VERY frustrating!  Please hel

  • Problems moving public folders for 2k3 to 2k7 migration

    Hello, i'm having problems with moving the public folder from the 2k3 to 2k7, following the steps i've found on mig docs and googling for this issue and i cant seem to solve it, letme detail: There are only 3 user created public folders, all with con

  • Muse Crashes - Where's the Love? App Launch Failures & Database Errors

    I really love Adobe Muse but I'm really frustrated by it's instability. There are two general problems that I consistently experience. App Launch Issues Firstly, and an issue I am experiencing right now is, a launch error where the program refuses to

  • Logging onto WRT54GS

    Hello Folks, I just got this router, and every time that I go to 192.168.1.1 I do not get a full screen, there is a bunch of info missing. Please help.