Just play the sounds, then load the webpage using AS3?

A rudimentary question to a neophyte. I just want to play music through my swf file and at the end of the song, to retrieve a web page automatically. I find a lot of answers for very complex questions, but nothing as fundamental. Any suggestions you could offer me would be greatly appreciated. Thank you.   Mark

my fault.  the listener must be added after the soundchannel is defined:

var m:Music = new Music();

var sc:SoundChannel = m.play();
sc.addEventListener(Event.SOUND_COMPLETE,f);

function f(e:Event){
navigateToURL(new URLRequest("http://www.adobe.com"));
}

Tags: Adobe Animate

Similar Questions

  • How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    The SWF file can be used in the same way as the CFC, which means that you don't need to "visually show" anything when it is loaded. Your code can use the classes and assets incorporated into the SWF, just as a SWC file. So if someone just to load the SWF file to see what was in it that they see nothing. They could however access programmatically to what anyone on the inside just like you, if they went to that level. But it is not as easy as just racing as SWF to see what is inside.

    I hope that all packaging several separate sovereigns will allow you to load and unload only what you need to keep the RAM usage as low as possible with a minimum load SWF.

    If you are ready, please mark all useful/correct so we can filter without response. You're welcome and good luck!

  • Hello, I need help, I can't play the video using Facebook. Works very well in Youtube. I use Safari. Tried different solutions such as changing preferences, reinstalling Flash.

    Hello, I need help, I can't play the video using Facebook. Works very well in Youtube. I use Safari. Tried different solutions such as changing preferences, reinstalling Flash.

    Hello

    Please try following the steps and see if it helps

    1. Please work through this guide.

    https://helpx.Adobe.com/Flash-Player/KB/video-playback-issues.html

    Follow the instructions in the guide on the provision of the dxdiag report and additional information on what you tested and observed.

    2 turn off hardware acceleration in the settings. Steps are mentioned in the link below

    How to disable or enable hardware acceleration?

    Thank you

  • Equium A200 - cannot play the game using the format full screen

    I just bought a laptop Satellite A200 - 26 d. After loading a game called "Jewel Quest Solitaire". The game has loaded OK except that I can't play the game in full screen.

    When the game is loaded, I can't maximize to fill the screen.

    Maybe it's not possible to s full screen

  • Error in the stream using AS3

    Hello guys, I'm listening to my webcam using AS3 code, but I got this error message in the Panel output when I run the application:

    ArgumentError: Error #2126: NetConnection object must be connected.

    at flash.net::NetStream/ctor()

    at flash.net::NetStream()

    At first, I listen for the NetStatusEvent status and the connection succeeded

    But when I include the NetStream class I get this annoying error. I think this is the corresponding code. Any ideas why it does not work?

    import flash.net.NetConnection;
    import flash.events.NetStatusEvent;
    to import flash.net.NetStream;
    import flash.media.Camera;
    import flash.events.StatusEvent;
    import flash.media.Video;
    import flash.media.Microphone;

    var nc:NetConnection = new NetConnection();

    nc.addEventListener (NetStatusEvent.NET_STATUS, netStatus);

    NC. Connect ("rtmfp://localhost/streamCamUrl");

    var ns:NetStream = new NetStream (nc);

    NS. Publish ("live", "registration");

    function netStatus(event:NetStatusEvent):void {}
    {Switch (Event.info.code)}

    case "NetConnection.Connect.Success":
    trace ("connection online...");
    break;

    case "NetConnection.Connect.Failed":
    trace ("unable to connect");
    break;

    case "NetConnection.Connect.Rejected":
    trace ("ouchh!");
    break;

    case 'NetStream.Connect.Success ':
    trace ("this is great!");
    break;

    case 'NetStream.Connect.Failed ':
    trace ("livestream");
    break;
    }
    }

    var: camera = Camera.getCamera ();
    cam.setMode (520,320,15);
    cam.setQuality (0, 80);
    ns.attachCamera (cam);

    cam.addEventListener (StatusEvent.STATUS, statusHandler);

    var vid:Video = new Video();
    VID. Height = cam.height;
    VID. Width = cam.width;
    vid.attachCamera (cam);

    addChild (vid);

    var mic:Microphone = Microphone.getEnhancedMicrophone ();
    MIC.gain = 50;
    mic.setSilenceLevel (0, 2000);
    mic.framesPerPacket = 1;
    MIC.codec = SoundCodec.SPEEX;
    ns.attachAudio (mic);

    mic.addEventListener (ActivityEvent.ACTIVITY, this.onMicStatus);


    function statusHandler(event:StatusEvent):void {}
    Switch (event.code)
    {
    case '. '. Muted:
    trace ("was clicked Deny.");
    break;
    case "Camera.Unmuted":
    trace ("user clicked on agree.");
    break;
    }
    }

    function onMicStatus(event:StatusEvent):void
    {
    If (event.code is "Microphone.Unmuted")
    {
    trace ("microphone access was allowed.");
    }
    Else if (event.code == "Microphone.Muted")
    {
    trace ("microphone access denied.");
    }
    }

    your ns.publish () method should not run until your connection was successful.  move this line of code.

  • How to activate windows where the key code is how to make one without spending money that I just bought the computer used

    I don't know my key code or how locate it how can I get a code key that I have no credit or debit or money

    Hi John,.

    You can follow the steps in the link below to check if the operating system you are using is enabled or not.

    How to tell if Windows 7 is activated?

    http://Windows.Microsoft.com/en-in/Windows7/how-can-i-tell-if-Windows-7-is-activated

    The steps in the link will help you activate Windows 7, but you must have a product key. If you do not, you need to buy it.

    Activate Windows 7 on this computer

    http://Windows.Microsoft.com/en-in/Windows7/activate-Windows-7-on-this-computer

    Do not hesitate to write to us in case if you have any questions. We will be happy to help you.

  • Support for the creation of menus in which is the center of the screen using AS3, with MovieClip that contains buttons

    Hello beautiful ActionScript Guru-

    I'm new on learn AS3 and have run obstacle after roadblock to getting what, in my view, should be a simple thing to work. I'm trying to create a menu on many levels using a MovieClip that contains simple buttons. I'm facing 2 problems while posting what I've built.

    1. my Menu.as (code below), says it takes "5000: the class 'Menu' must subclass"flash.display.SimpleButton"because it is linked to a symbol in the library of this type.» That's fine, except when I don't change the code to reflect the change the error message wants to difficulty, my beautiful menu driven with options turns into an absolutely useless image, with no opportunity to serve a menu at all. I have read other forums that I have what Miss me is to create a MovieClip that contains buttons, but I think that's exactly what I did. I'm not sure how to fix this error.

    2. when I compile my main class (ConsStartMenu.as) did not finish the compilation error 1119: line 29 and 46, claiming that my link to my subclass (Menu.as) called a potentially indefinite property Menu through a reference with static type ConsStartMenu. After searching on Google and the forums navigation for long hours, I do have absolutely no idea what means this error, or what he wants me to difficulty. I think that this is also the reason why my sizing and centering code does not work. It's as if he can't quite find my Menu.as. Maybe a quick glance at my code will shed some light on this?

    Thank you very much in advance for your help.

    -connor

    errors.png

    ConsStartMenu.as-

    package {}

    import flash.display.MovieClip;

    import stuff from the lib of valve

    Import ValveLib.Globals;

    Import ValveLib.ResizeManager;

    SerializableAttribute public class ConsStartMenu extends MovieClip {}

    These three variables are required by the engine

    public var gameAPI:Object;

    public var globals: Object;

    public var elementName:String;

    public void ConsStartMenu(): void {}

    }

    This function is called when the user interface is loaded

    public void onLoaded(): void {}

    make this visible user interface

    Visible = true;

    Let customer across the user interface

    Globals.instance.resizeManager.AddListener (this);

    trace ("Cons Start Menu loaded!");

    This. Menu.Setup (this.gameAPI, this.globals);

    }

    public void onResize(re:ResizeManager): * {}

    var scaleRatioY:Number = re. ScreenHeight/900;

    If (re. ScreenHeight > 900) {}

    scaleRatioY = 1;

    }

    This. Menu.screenResize (re. ScreenWidth, re. ScreenHeight, scaleRatioY);

    }

    }

    }

    Menu.As-

    package {}

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    Import fl.transitions.Tween;

    Fl.transitions.easing import. *;

    to import flash.display.SimpleButton;

    SerializableAttribute public class Menu extends MovieClip {}

    var gameAPI:Object;

    globals var: Object;

    public void Menu() {}

    }

    public void Setup (api: Object, globals: Object) {}

    define our variables

    api = this.gameAPI;

    Globals = This.Globals;

    }

    public void screenResize (stageX:int, stageY: int, scaleRatio:Number) {}

    'this', the position being this module, in the center of the screen

    This.x = stageX/2;

    This.y = stageY/2;

    Save the original scale of this movieClip

    If (this ["originalXScale"] is nothing)

    {

    This ["originalXScale"] =-this.scaleX;

    This ["originalYScale"] = this.scaleY;

    }

    This module/movieClip to scale the scaleRatio

    this.scaleX = this.originalXScale * scaleRatio;

    this.scaleY = this.originalYScale * scaleRatio;

    }

    }

    }

    you are missing a fundamental knowledge of classes and how they work.

    the bottom line: you cannot reference Menu unless it's a static class.

    You must create an instance of your class of Menu:

    menu: Menu of var = new Menu();

    and then you can add to your addChild (menu) for the use of ConsStartMenu, or maybe that you don't have.  I can't.

    is ConsStartMenu your document class?

  • I see a file, when I play the sound comes on but no picture any suggestions thanks

    I downloaded a dvd of my home movies that I can see the files, but some play that for 29 seconds and one that says it's a little over an hour just plays the sound, even if I see the picture of him on the record at the beginning.

    Hello

    ·        What operating system is installed on your computer?

    ·        What is the type of file you are trying to play?

    ·        What application are you using to play the file?

    ·        Are you reading DVD file or you saved the file on the computer and then play?

    Method 1: If you play the DVD in Windows Media Player, then run the troubleshooter below and check if it solves the problem:

    Open the Windows Media Player DVD Troubleshoot utility

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-DVD-Troubleshooter

    Note: applies only to Windows 7.

    Method 2: Alternatively, you can try to install the codec for the file type and check if it helps:

    Codecs: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

    Windows Media Player frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/Windows-Media-Player-frequently-asked-questions

    Note: applies to Windows Vista and Windows XP as well.

  • Error Windows Media Player cannot play the file because "it might not be a sound device installed on your computer.

    Original title: Media Player

    THE FOLLOWING IS a MESSAGE I GET WHEN TRYING TO DOWNLOAD FILES: "Windows Media Player cannot play this file because there is a problem with the audio device.  "It might not be a sound device installed on your computer, it can be used by another program, or it might is not working properly.  What "audio device" are talking about?

    Hello

    1. do you get an error with this error code?

    2 have you installed multiple audio devices on your computer?

    3. what version of Media Player do you use?

    4. were you able to play the files using Media Player without any problem before?

    5 did you a recent software or changes to the material on the computer?

    Audio device is the part that allows sound from the computer. If the appliance is used or if the drivers are corrupt, then you can get the error message.

    I suggest you go through the steps and check.

    Method 1:

    Quit other programs that may be using your sound device, and then try to play the file again.

    Method 2: Install an updated driver.

    Step 1: Firstly uninstall the audio driver from Device Manager and add or remove programs

    How to change or remove a program in Windows XP

    http://support.Microsoft.com/kb/307895

    a. click Startand then click Control Panel.

    b. click Systemand click on the hardware tab, then click Device Manager.

    c. to the title sound, video and games controller, check the sound card that is listed.

    d. right click on the sound card and then click on uninstall the driver.

    Step 2: To see if an updated driver is available, use Windows Update or access the sound device manufacturer's Web site.

    Follow these steps to do the same thing:

    a. click Startand then click Control Panel.

    b. click Systemand click on the hardware tab, then click Device Manager.

    c. the title sound, the video controller and games, make sure that the sound card is listed.

    d. right click on the sound card and then click Update driver to install the latest version of the driver.

    e. visit the sound card manufacturer's Web site to determine if a newer version of the driver is available for download.

    Method 3:

    If you have multiple audio devices installed on your computer, try to use another. The selected audio device might not support Secure Audio Path (SAP).

    Additional reference on:

    Resolution of the problems of reading in the Windows Media Player for Windows XP

    http://support.Microsoft.com/kb/306317/

    Hope this helps and keep us informed if you need help.

  • Can not play the game of Mahjong MJWIN on Windows 7

    I have Windows Vista on my laptop. I have MJWIN Mahjong transferred to a floppy disk 3 1/2 "on my USB key, on a computer in local library Win XB or Win 7. Successfully, I opened and played the game of the stick on the library computer to verify that it worked. Got home and plugged into my laptop which then displays only some files and without their .exe or .tis or other suffixes. 3 - letter.  A box of* appeared saying that Windows could not open the files. The 2 options have been no help. I was able to play this game even from the memory stick, a couple of years, when I got this computer, but since I had it cleaned out a bunch of virus approximately a year later (that has accumulated me over a period quite unbeknownst) I can't play the game more than the stick. The game was also removed from the computer during the cleanup, but not because of the virus removal.  Viruses were not in the stick or on the diskette. What should I do to play the game? What files can I convert (like the kind of dialog suggested*)? Although I shouldn't really need to because as I said earlier, I could play the stick when I bought the camera, and when I down load at the time of the stick.  I can't download this time of the stick, just play the stick.

    Hello

    1. who is the creator of the game Mahjong?
    2. from which site did you download this game?
    3. were you able to play these games on vista?
    4 "Windows could not open the file" which is the full and exact error message?

    Please answer these questions that might help us helping you better.

    May be that file extensions are hidden, try to view it and check.
    Reference: http://windows.microsoft.com/en-US/windows-vista/Show-or-hide-file-name-extensions

  • Music plays the same track player on & more!

    For about a week now, the music player 'Walkman' on my Sony Xperia S just gets stuck on the same track; which way I put it, it just plays the same as on & above and refuses to move to the next track on the album! I tried to turn the phone off & on - nothing - I tried clicking "Shuffle the songs in the album" - what makes just to randomly select a song & then play this song over & over again. Nothing in the 'settings' which could have done, or who can make that judgment. In fact there is nothing in 'settings' to everything other than a sort of audio enhancement.

    Help please - he makes me crazy, I don't know how or why it started how to make it back to each track in turn.

    You will get repeat only when you listen to a song and tapping on the album art for this song.

  • Interrupt the BB media Application if it is currently playing the media?

    Is there a way to pause the Media Application from my application?

    Currently if the media Application is reading from a file, and I try to play the media using the player of my own application (via the javax.microedition.media.Manager & Player), then my own media play on top of the Application Media playback course materials. Only her pretty at all.

    Is it possible to detect at least if the Blackberry media application is in the middle of some media play?

    There is no API in the BlackBerry API set that allows you to determine where the State directly suspending the media.

  • Unable to play the game online; Windows Media Player constantly up-to-date.

    Title: Media Player constantly goes in the updates...

    while I am playing a game online. Media Player is updated. Shrink the game and takes over the desktop screen.

    Live near the top of my game, Big time!  I put Windows Live Update, so he asked me permission for updates. But he has not yet fixed the problem?

    Hello

     
    -What is the online game, you try to play?
    -How are you trying to play the game online? Is installed on your computer, or play the game using Internet Explorer or another web browser?
    -What do you mean by constantly going in the updates? Are you referring to the "Media update"?
    -Did you do changes on the computer before this problem?
     
     
    I suggest you follow these steps in order to prevent the periodically check the updates of Windows Media Player.
     
    Note: If you have not logged on as a local administrator, you are not prompted for automatic updates, and check the option updates the player is not available on the Help menu in current versions of Windows Media Player.

    Windows Media Player from periodically check for updates by changing the registry.
    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    322756
    (http://support.microsoft.com/kb/322756/ )
    How to back up and restore the registry in Windows?

    To change the registry, follow these steps:

    1. start The registry editor by clicking on Start and type Regedit .
    2. look for the following key in the registry:
    HKEY_LOCAL_MACHINE
    3. on the Edit menu, point to new, and then click key.
    4 type Windows Media Player, and then press ENTER.
    5. with the Windows Media Player key selected, on the Edit menu, point to newand then click DWORD value.
    6 type Disable Auto Update, and then press ENTER.
    7. on the Edit menu, click modify.
    8. type 0 (or remove the 1), and then click OK.
    9. close the registry editor.

    For more information, visit the below mentioned link:

    http://support.Microsoft.com/kb/278960

    If the issue is with Windows Media Library update, I suggest you to try disabling it:
    Open the Media Player > click on 'Organize' > select 'Options'
    "Under the library tab, uncheck the ' retrieve additional information on the internet.
    Close Media Player and reopen it to see the process everything is faster.

    As well, if this has no effect, try the following:
    Open the Media Player > click on 'Organize' > select 'Options'
    On the Player tab, move the automatic updates to 'Once a month'.
    Close Media Player and reopen it to test.

    Hope this information helps.

  • Error code 002000 while playing the daily challenges of Microsoft.

    I play the daily challenges for Microsoft Solitaire, Taptiles and mahjong, with no problems, until what may kicks. Now, I play is more the daily challenge of Taptiles, I just get error code 002000. No new software has been installed AT ALL, so there cannot be any sudden conflict, and there is no problem with reading the other two. I tried to uninstall taptiles and reinstall it, but who has had no change on the situation. What is happening with it?

    Taptiles daily challenges are now working.  I just played the challenges on May 1 and may 2.

    JKM

  • A Notification alert text - not always play a sound?

    Hello-

    I'm new to these forums and I've been skimming them for about 2 hours now and I have not seen this question posted anywhere, so I hope this is a new post.

    We should now know all that we can change our text alerts to be our own custom - ringtones very well!

    My problem is that, sometimes, the alert displays on the phone, but for some reason, the sound does not play.

    Does anyone else have this problem? Most of the time the text alert plays very well, but sometimes after a long time don't receive any text message, or if I get some time after another, it is not just playing the tone. All the volume controls in the settings are cranked up to full speed, but the tone does not sound right. Unusual? I think that Yes... but maybe I'm not alone.

    So, it looks that the device is not sufficient to allow his awakening. If you have not already done so, you can do a wipe applications and data from device information, reset the Options, delete Apps & data, (all PIM data on the device will be deleted and then restored you backup such as Palm or Google profile source, etc.). This can solve the problem and is worth a try. I would like to perform a manual backup of backup before you try this option.

    If you have already tried this option, you can download and run Web OS doctor to repair the ROM on the device. You can get this information from www.palm.com/ROM, you enter the serial number and download Web OS Dr. and follow the instructions.

Maybe you are looking for