Can I have a mouse-over function to play sound?

Hello all,
I have a flash graphic here www.stainlessrhino.com top left
corner. What I would like is for the graphic to play (soundless as
it does now) when the page is loaded, however, if the user mouse
over the swf a sound would play once. How would I accomplish this?
Is it possible?
Thank you!

There are several ways to do this. The easiest way is to
attach the sound to the graphic. Do this by editing the object you
want, create a layer called sounds. Click on the first frame you
want the sound to play in, press F6 to create a keyframe. Click in
that keyframe and look in the Properties window. In the box labeled
"Sound:" (go figure) you select the sound you want to play.
If you are using a roll-over listener you can use the
Sound.play() method to play the sound in the function. AS3.0
example:
myGraphic.addEventListener(MouseEvent.ROLL_OVER,
myOverFunction);
function myOverFunction(event:MouseEvent):void{
play.sound(mySound);
I recommend searching for "Playing Sounds" in the help
documentation (F1).

Similar Messages

  • The "Logout" button does not appear my Sakai sessions. I have to mouse over the blank area to find the link to logout. The Logout button does appear in Safari. Firefox version 10.0. Mac OS 10.7.2

    The "Logout" button does not appear my Sakai sessions. I have to mouse over the blank area to find the link to logout. The Logout button does appear in Safari. Firefox version 10.0. Mac OS 10.7.2

    To make sure that all required media is in the library contain the project you need to "Consolidate media"  see:  http://help.apple.com/imovie/mac/10.0/#mov882dee351
    You can then copy the library to your laptop with the Finder and open it with the same version of iMovie.  The last phrase is important since Apple has made changes in the project format several times even between minor updates of iMovie 10.  Earlier versions may not be able to read the library and later versions (not possible in this case) may cause the project to be updated so that it is no longer readable by the desktop version.   iMovie on the laptop will not at first find the copied library - you will have either to double click on it or File - Open library - Other and navigate to its location.
    Geoff.

  • Hi. I have downloaded the new iOS 6.0 software update but now I can't switch off the shuffle function when playing music. Help please. Stuart

    Hi. I have downloaded the new iOS 6.0 software update but now I can't switch off the shuffle function when playing music. Help please. Stuart

    I have the same problem and haven't been able to figure it out either

  • In firefox, whenever i have my mouse over the page (not the toolbar section), any selection i have moves. For example - a text entry box and the cursor keeps returning to the start of the box. This is only in firefox, everything else works fine (IE and Ch

    I have an issue with FF. Whenever I have my mouse on the page (not the toolbar area) any selection I make gets altered in the following way:-
    Text boxes - The cursor keeps moving to the left.
    "Radio" buttons - Selection keeps moving up.
    This is only happening in FF, I am not seeing this behaviour in Chrome or IE.
    == This happened ==
    Every time Firefox opened

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Help! Can I have user defined extension function?

    Under SQL Sever XML, I can write a xsl script like this:
    <msxsl:script language="JScript" implements-prefix="myfunc">
    function getvalue(nodelist,name,istag){
    var subNode=nodelist.nextNode();
    if(subNode == null) return('?');
    if(istag == '') name = '@' + name;
    var value=subNode.getElementsByTagName(name);
    return((value == null)?'':value);
    </msxsl:script>
    and I can call this function in the xsl, obviously, msxsl supported by microsoft. I know that Oracle XML support Extension function, but you can tell here that I want a user defined function while not a predefined function. Can I have such feature with Oracle XML, and How? Thanks.

    Oracle XML support Extension function.
    For example:
    If we would like to import FAQDBUri.class with user-defined java functions, like TranslateDBUri(), we can write XSL file like this:
    <xsl:template match="/" xmlns:dburig="http://www.oracle.com/XSL/Transform/java/FAQDBuri">
    <xsl:variable name="urladd" select="dburig:TranslateDBUri($url)"/>

  • Can you have more than one function fire from creationComplete?

    I'd like to have several functions fire when I start a particular application.  Is that possible?   Currently I run one function from the creationComplete .
    Thanks.

    You can also do creationComplete="firstFunction();secondFunction()". If you have more than two function calls or you need to call them all together later on I would do something like an init() function.
    creationComplete="init()"
    private function init():void
         firstFunction();
         secondFunction();

  • Can I have 2 roll over triggers in the same space.

    Is possible to have 2 roll overs in the same space.  I would like to have the user roll over a given space and have an image appear in one area and a text box display in another.  Currently it seems only the top trigger is recognized by the system.

    HI there
    Indeed a slidelet alone should do the trick.
    I think Lilybiri was simply pointing out that there was more than one way to flay this particular feline.
    Cheers... Rick

  • Can  we have drag and drop functionality in xcelsius

    hi,
    i want to know wheather we can give adding and removing columns functionality to the user like we can give in the dash board created in wad.because most users want to analyse in their own way along with the standard one we show initially.
    can anyone tell me some features which are best in xcelsius than in wad or visual composer.
    so that it will be easy to choose what is the best tool according to the endusers requirement.

    There isn't a "painting" function built-in.
    You can do drag and drop in ADF Faces between components though.
    If you want to show relationship between components with lines - you might want to look into the Hierarchy Viewer.
    http://jdevadf.oracle.com/adf-richclient-demo/components/ariaXml.jspx

  • Is there any way to disable the mouse-over function of the Spry Menu Bar (CS5)? Click-open preferred

    Hello,
    I'm using the standard CS5 Spry Menu Bar (Horizontal) in Dreamweaver. I have it set up exactly the way I want with CSS. However, I've very little experience with Javascript, consequently I'd like to ask anyone here for some help in modifying this aspect of the Spry Menu Bar. I'd like it to 'click-open' and not open when the mouse is over it. I've tried to change the delay variables in the code to something that has a longer duration in milliseconds; unfortunately, this tends to cause some bugs such as the menu re-opening once the mouse is no longer near it and other such bugs.
    The ideal solution for me would be to have it open when it's clicked on once. The reason I need this is because the menu appears over some buttons - there's no way around this for me, it's the layout I absolutely must have. Although the buttons don't overlap with the menu, they are very close and it is annoying when your hand slips a little and the menu pops up over it all.
    I'd appreciate any help at all, thank you.
    PS:- The Javascript containing the delay variables I tried to modify.
    Spry.Widget.MenuBar.prototype.init = function(element, opts)
        this.element = this.getElement(element);
        // represents the current (sub)menu we are operating on
        this.currMenu = null;
        this.showDelay = 250;
        this.hideDelay = 600;
        if(typeof document.getElementById == 'undefined' || (navigator.vendor == 'Apple Computer, Inc.' && typeof window.XMLHttpRequest == 'undefined') || (Spry.is.ie && typeof document.uniqueID == 'undefined'))
            // bail on older unsupported browsers
            return;
        // Fix IE6 CSS images flicker
        if (Spry.is.ie && Spry.is.version < 7){
            try {
                document.execCommand("BackgroundImageCache", false, true);
            } catch(err) {}

    Hello,
    Thank you so much for replying so quickly and moreover, solving my problem. I must apologise for not doing more research about this issue by searching these forums more thoroughly. I found a similar post here:-
    http://forums.adobe.com/message/139937#139937
    Your solution goes one step further and eliminates the need to search through the Javascript for the relevant code.
    Thank you again, you've helped me a great deal.
    Best wishes,
    foreverdusty.

  • Can I have a simple java function in my jsp?

    Can someone provide me the syntext? Thanks, j

    Don't put a bunch of <html> tags in your JSP--just the top level ones around the whole page.
    Do just put in the HTML as you would in a normal HTML page.
    Do put <% and %> around your inline Java code (but again, the use of this should be a bare minimum).
    <%
        some.javaObject.method();
    %>
    <b>Plain ol' HTML goes here</b>
    <%
        another.javaObject.method();
    %> See section 2 on this page:
    http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
    But really, please, don't put a bunch of Java code in your JSPs. They'll quickly become impossible to understand or maintain.

  • Can I have my dashboard over my safari screen again?

    I use my calculater on the widgets while looking at my bank statement.  Since switching to Leopard-i can't do that.  Or is there a calculator feature somewhere else?

    "Since switching to Leopard-i can't do that." I know you meant Lion.
    That was a nice feature. I did that as well. I haven't found a way yet to get that in Lion. I don't think it's possible.
    Templeton that was fast and neat.

  • Mouse over and Mouse Click function

    Hi,
    I have to add a mouse over event and mouse click event in my rectangles that I draw while taking the values from an input file. Now since I am taking rectangle height and width from the input text file as well I also want to take a text value to be shown while moving a mouse over a particular rectangle from my input file. Also when he clicks on that rectangle the height and width of that particular rectangle only should be displayed (re-adjusted).
    Like suppose my input file has 3 fields:-
    Height   Width  Test_To_Show
    10          23         Hello
    20          44         ByeNow When my paint component draws these 2 rectangles and a user moves his mouse over the rectangle he should see text message attached to it:- Like for first row 10, 23 he should see "Hello". In this case when he clicks on this rectangle the picture should read just to show only 10 and 20 as height and width. Now the problem is I am confused where to add the mouse and mouse click event function.
    Some of my code looks like this in paintcomponent method:-
            for(int i=0; i<myobject.size(); i++){
                Coloring fc = myobject.get(i);
                GradientPaint gpi = new GradientPaint(0, 0,c.getColor() , 0, 20, Color.white, true);
                g2d.setPaint(gpi);
                g2d.drawRect(fc.value1, 29, fc.mywidth, 83);
                g2d.fillRect(fc.value1, 29, fc.mywidth, 83);
                                                }Where should I attach the mouse event to g2d object / fc / myobject ? I am not sure since I am using mouseover function for the first time.
    Thanks

    I am planning to add these 2 in my paint component method
                fc.addMouseMotionListener(this);
                fc.addMouseListener(this);and then create 2 functions like this :-
          public void mouseEntered(MouseEvent e) {
                  //I will be reading from a file and then pass the string that I want to show as text while mouse over
                   String s = // takes value from the inpuf file.
                      fc.setText(s);
    public void mouseClicked(MouseEvent e) {
                 //same way reading from the file ... Not sure how I will do this one
                 }Would it be the correct way to do it ? I am doing mouse over functions for the first time so donno much about there usage.
    Thanks

  • How Can I have 5 links in the same picture

    Good morning.
    I would like to know,how I can create 5 or more links on 5 different positions in the same picture.

    If your writing about html links I believe that is what slicing is all about. I have not done any.  I think what slicing does it cut a image into parts without seams these parts can be addressed using mouse over which may replace the part to highlight the area and if clicked on link to an other page.
    Use Photoshop Help search on Slicing.

  • Mouse Over Graphs and Legend

    Could this feature be included in next release?
    Allow to select separate mouse over values from the legend.   If I have long definitions for the bars in a graph - I do not want to display these same bars in the legend (there isn't room)  I would rather display numbers in the legend which refer to the bars and then have the longer text shown only when I mouse over the bars.
    Right now the legend shows the same text as the Mouse Over Values.  If I turn off the legend and only have the Mouse over Bars, then I can't use the Enable Hide/Show Chart Series at run-time feature - so I need to have both - the legend and the mouse over values.
    Thank you

    Hi Marya,
    You can submit an Enhancement Request on the below URL:
    https://ideas.sap.com/index.jspa
    Thanks,
    Amit

  • Mouse over a hyperLink

    How can I disable the Mouse over tool tip of a HyperLink in a VB web application;
    which is displayed at the bottom left corner of the page

    As your question appears to have nothing to do with setup of the .NET Framework (this forum's topic), and is about VB web applications, I recommend that you ask here:
    http://forums.asp.net/36.aspx/1?Visual+Basic+NET
    Thank you for your understanding.

Maybe you are looking for

  • How can I share my calendar with my PC/Galaxy Spouse?

    What is the best way to share a calendar with my PC/Galaxy Spouse? I want to share my calendar with my spouse. I have a Mac/iPad/iPhone and he and he has a PC and Samsung Galaxy phone. Because he is not too tech savy, I was thinking that he should vi

  • Monitor power settings when using HDMI to external TV

    Folks My monitor powers up just fine according to the 5 min setting I have. However, if it's projecting a movie to a TV, it never sleeps the monitor. Any way to change this behavior? Thx

  • Open File/run Application

    Hi, I'd very like to know how to open a file or launch an Application without using the Mouse. Whilst this is working fine in most other operating systems including GNU/Linux and Windows, OS X seems to be initiating a file renaming when hitting retur

  • Painting

    Question: The game I am making in Swing involves objects moving around a grid. The way I create the animation is as follows... I have all my characters in JLabels as images. If I want a character to move left I simply call the setBounds method on the

  • Why doesn't iTunes 11.0.4 not see my iPhone 6.1.3?

    I have the iPhone 4 running on iOS 6.1.3, my iPhoto sees the phone as a digital camera. iTunes how ever does not see my iPhone so that I can sync them together, I've had my phone for about 2 months and have my tech friends look into this and tried ev