Change backgroundImage on rollOver

Hello
I am quite new to flex,
I've desperatly been trying to change the backgroundImage of
a canvas through a rollOver event.
Can anyone help me out?
Thank you

Try this (sorry untested, but looks okay):
Default is c:\image1.jpg.
Rollover is c:\image2.jpg.
<mx:Canvas id="myCanvas" backgroundImage="c:\image1.jpg"
mouseOver="myCanvas.backgroundImage='c:\image2.jpg';"
mouseOut="mouseOver="myCanvas.backgroundImage='c:\image1.jpg';"/>

Similar Messages

  • Making type change color on rollover: Cant make it work

    Incredibly, I can not figure out how to make hyperlinked text change color on rollover.
    I thought it was a matter of assigning a new CSS rule, but I cant find the dialog box within which to specify a rollover color.
    I cant believe how difficult and obtuse such a super simple and basic function is in Dreamweaver.
    WHAT am I doing wrong?

    CSS Pseudo-classes work best if defined in the following order (LiVHA):
    a:link {color:#FF0000}      /* unvisited  link */
    a:visited {color:#00FF00}  /* visited link */
    a:hover  {color:#FF00FF}   /* mouse over link */
    a:active {color:#0000FF} /* selected  link */
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How do I change mouseover or rollover text in iweb08

    I've gone through the web and iWeb as best I can. I can't seem to get a simple answer to this one, so I'm hoping somebody here shares this question.
    I use iWeb08. It's great. I've built a complicated website from scratch and it's great.
    I simply cannot change the rollover text on images. I've created a bunch of pictures and used them as links to other pages on my site. But now it simply says, "link to xxx" and I cannot figure out how to change that text to what I need it to say.
    Any help would be greatl appreciated!

    In an earlier post you said "I simply cannot change the rollover text on images."
    Note that the text IS the image. So to change the text you have to create an image with the changed text.
    In the end you have TWO images. One with this text and one with the other text.
    iWeb cannot do that.
    So you have to find a solution for that.
    Here's a page with rollover images. You can use it in the HTML Snippet. Study the code. Instead of animals use text :
    http://www.wyodor.net/_Demo/duckmenu/HoverImages.html

  • Change background with rollover?

    Not sure if it can be done (maybe a different way than I'm trying to figure out), but my goal is to have an image that fills the entire window, even if it's resized.  Then, when you rollover a menu option, the image will change to a different photo.  I'm very new to Muse and the only way I have found to make the photo change with the size of the browser is to fill the browser with an image.  However, I can't find a way to make the image change without having a completely different master page and actually clicking a link to that page.  I want my end result to be something like this:   http://gavingough.photoshelter.com/#!/index 
    Thanks in advance!

    Hello,
    Check this post on how to create a full screen slideshow, with examples etc: http://forums.adobe.com/thread/1213057
    With that in place, you can also place link on the triggers, pointing to the pages they would open when clicked upon.
    Hope this helps.
    Cheers
    Parikshit

  • Help pause AS3.0 frame Change Timer on rollover

    could someone help me out on as to how I could go about pausing this timer on rollover of an object, stage... anything?
    I am just cycling images on the main timeline via this timer but would like the timer to pause if a user has mouse over one of the images.
    Thanks for your help.
    var frameTimer:Timer = new Timer(2000);
    frameTimer.addEventListener(TimerEvent.TIMER, changeFrame);
    function changeFrame(e:TimerEvent):void
        if(MovieClip(root).currentFrame == totalFrames)
            MovieClip(root).gotoAndStop(2);
        else
            MovieClip(root).nextFrame();
    frameTimer.start();

    One approach would be to make a movieclip that is stage-sized with an alpha of 0 and treat it like a button, p[lacing it atop all other content.  This would block interaction with items below if that was necessary.  You could place it below all content as long as the content above also had the same rollover/out event listeners.
    Another approach would be to use a stage ENTER_FRAME event listener to continuously check the position of the mouse, and take action depending if it is within the boundaries of the stage or not.

  • Changing cursor when rollover Jbutton

    hi All...i need help
    i want to change the cursor when i move my mouse over the button into hand cursor, then when the button being pressed, cursor change to Wait cursor
    here code of mine..
    import java.awt.Color;
    import java.awt.Cursor;
    import java.awt.GraphicsEnvironment;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    * @author tys
    public class cursor_test extends JFrame{
        public cursor_test(){                               
            add_panel panel = new add_panel();              
            add(panel);       
            setBackground(Color.WHITE);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            //GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            setSize(200,200);
            setVisible(true);
            setTitle("Test cursor");
        public static void main(String[] args){
            new cursor_test();
        }//Main  
    }//end class frame
    class add_panel extends JPanel{
        public add_panel(){
            setLayout(null);
            JButton btn1 = new JButton("button");
            btn1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                      setCursor(new Cursor(Cursor.WAIT_CURSOR));                 
                      //do my program here
                      try{
                          Thread.sleep(1000);                     
                      catch(Exception z){};                                   
                      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));                   
            });//emd ActionListener
            btn1.setSize(90, 30);
            btn1.setLocation(50, 40);
            btn1.setCursor(new Cursor(Cursor.HAND_CURSOR));       
            add(btn1);       
    }//end class panelwhat did i do wrong in there...because every time i pressed the button..the cursor still Hand Cursor
    Thx
    tys
    Edited by: KingMao on 22 Sep 08 19:35

    Hope this wll helps to you.
    class add_panel extends JPanel{
        public add_panel(){
            setLayout(null);
            final JButton btn1 = new JButton("button");
            btn1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                      *btn1.setCursor(new Cursor(Cursor.WAIT_CURSOR));*                 
                      //do my program here
                      try{
                          Thread.sleep(1000);
                          *btn1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));*                    
                      catch(Exception z){};                                   
                      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));                   
            });//emd ActionListener
            btn1.setSize(90, 30);
            btn1.setLocation(50, 40);
            btn1.setCursor(new Cursor(Cursor.HAND_CURSOR));       
            add(btn1);       
    }//end class panel

  • How to change properties of an image when the state changes? (normal, rollover, mouse down, action)

    I want to enlarge image (photo) while rolling over.

    Sure, This works but copying back the button does not replace the original, it just adds a new button, so for every change, there is a new copy added. I did notice this when I wanted to change the size of the button, they were both visible !
    Pierre

  • Change background color in rollover?

    Is it possible to have a text box background color change in a rollover? That is, the text color changes AND the background changes.

    I've not seen anything posted by him
    rule of thumb: this is apple forum/discussion board, what post here belong to apple.
    I no longer post code here... the lurkers are around.
    I don't know of any snippet code for that ... can be manipulated by java script.
    yes, http://www.cyclosaurus.com/Home/CyclosaurusBlog/Entries/2009/8/11Pieces_of3.html
    it's on my site.

  • Change XP Look and Feel Rollover Highlight Color

    Is it possible to change the orange rollover highlight color that is used in the Windows XP Look and Feel? If so, how? I want to change it in once place and see the results on every component in my application.

    By the way, I'm using 1.5

  • Can I change the rollover state of a placed photograph?

    I simply want to be able to have a series of separate single, small photographs with descriptions below them and when someone moves their mouse over the photograph I would like it to display a larger version of that photograph on the same screen.  Then, when they move their mouse away, the larger version of the photograph disappears.
    I thought it would be configured in the rollover state of the image, but I must be doing something wrong.  I have placed and resized a photograph on my site.  I placed it, then resized it to basically a 1.5" w x 2.25" h.  I have tried to change to the rollover state for the image and then hyperlink to a larger size of that image but it seems to hyperlink all of the states.  And, if previewed, the mouse pointer becomes a hand, and when you click on the image it opens a new tab and displays the image there -- eventhough the box is not checked to open link in new tab.
    Help! Is there a way to accomplish this?

    Ok I did this on my site for one of my clients.
    What you do is set a lightbox composite. Enable the thumbnails and on the options set the events to rollover.
    Resize your thumbnails to desired size.
    Hide the enlarged picture of the light box. Now when you hover over iton preview on muse you should get the effect. Make sure to just have the hero image of the lightbox image no fill that would normally happen when you select the image and your window would dim out.
    Hopefully that helps you if not ill be on tomorrow and will post my finished site so you can see the effect and verify if its what you asked for.
    Good Luck!
    Edit: http://sanantoniorestaurant.businesscatalyst.com/index.html Link to my client's site, on the bottom half, Specials, hover over the images.

  • How to change background images in s:application

    hello!
    i want to make a webside by flex4 as  this web http://www.templatemonster.com/flash-cms-templates/29930.html
    But i don't know how to make change background images by click and make sound when load page.
    Can u help me ,please. sorry i write E not well.
    Thanks so much
    BUI THI PHUONG THANH- FROM VIETNAM

    Hi,
    please create a sink for your application inside that put your image.And apply that skin to your application on any click.
    Below is the code.
    Main Application
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:mx1="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                protected function btn_click(evt:MouseEvent):void {
                    this.setStyle("skinClass", MySkinClass);
            ]]>
        </fx:Script>
        <s:Button label="Change BackGroundImage" click="btn_click(event);"/>
    </s:Application>
    MySkinClass
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <!-- host component -->
        <fx:Metadata>
            [HostComponent("spark.components.supportClasses.SkinnableComponent")]
        </fx:Metadata>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <s:BitmapImage source="@Embed('image1.jpg')"  smooth="true" left="0" right="0"  top="0" bottom="0"  />
    </s:Skin>
    with Regards,
    Shardul Singh Bartwal

  • How do you change the color of the navigation bar text  in iWeb?

    I have created buttons to set in the nav bar but the type color needs to be white to show up against the button background.
    How can I change the nav bar text colors?
    Thanks
    G

    If it's the iWeb generated navbar then see if this tutorial helps: #24 - How to Change the Basic, Rollover and Visited Color of an iWeb Navbar
    OT

  • Can I rollover an image to "remove" it to have clickable links show up once at hidden state?

    I have a design wherein I want certain elements to change states on rollover. With this action, there would be a line of text with each one clickable to a different link. Right now I cannot find a good way to have one image "hide" on rollover, reveal text below AND have the text clickable. This is most likely due to the object's opacity being at 0% rather than truly "hidden". Under the text, there is a different image to make text appear more clearly.
    Am I missing a fundamental element with using states? Even when trying to use the State Widget it doesn't seem to be able to work within different layers and no combination of state changes allows my text to be hidden behind image on the load, rollover to remove object obscuring text AND having it truly "hidden" or "gone" at the entire time the object is being rolled over.
    Thanks in advance for your time, and hope there is a (somewhat) easy solution.

    The simplest way:
    Go to the widget library and you will find a state button. Place it onto the canvas.
    In normal state set opacity of the text box to "0" and fill the button (not the text box) with an image.
    In active state reduce the opacity of thebachground  image to, lets say, 15 % and the opacitiy of the text box to 100%. Assign a link to the text box using the link command in the upper command strip..
    Choose the rollover and mousedown state as you like.

  • Rollover animation and click combination problem

    Hey everyone....thanks in advance for the help
    I'm trying to edit an old Flash 8 in CS4, so I'm using AS2.0
    My problem is I have a menu bar that animates on screen from left to right on load
    and then it animates and plays a sound on rollover. I can't for the life of me get it to be able to hyperlink properly. I've gotten it to hyperlink on click, but then the rollover effect stops working. I've gotten it to hyperlink and rollover, but then the background covers up the graphics....it's frustrating the heck out of me!
    Any ideas would be greatly appreciated.

    change its timeline rollover/rollout animation to use actionscript only to animate it.

  • Changing link navigation bar font and color

    Is it possible to change the font and color on the links for each page on iWeb?

    Welcome to the Apple Discussions. Yes, with the code and a HTML snippet that's described in this tutorial: #24 - How to Change the Basic, Rollover and Visited Color of an iWeb Navbar.
    However, if you want to create a site that is more search engine friendly I suggest you create a text based navbar as described in this demo page: Text Based Navbar. If you don't have a lot of pages in your site it's not too difficult.
    OT

Maybe you are looking for

  • Using null for parameterized "newInstance(Object [])" method in Object[].

    I have a really serious problem. I am creating instances of specific classes by using reflection techniques. I am reading a flat file, finding class from its name and creating it by using its parameterized constructor. Example: line 1: Dummy("A",Dumm

  • Batch code for running a find/replace all on multiple files within a source floder/directory

    What I need is a Batch source code that will open all files in a folder/directory and run a find and replace_all query within them and then save all the files.  The files were created in Illustrator and saved using the Scene7 FXG format extension.   

  • S4 newbie questions 2

    A couple more questions from a new S4 user: This really goes back to the earlier version of Android that I had, and I doubt that it can be fixed. In the Clock app, I want to add a city to the World Clock that's not on the list (Albuquerque, NM). That

  • Collective Invoice problem

    Dear Gurus, When Im trying to create collective invoice using  vfo4 for few delivery related invoices with  same payer, same billing date and same materials,same terms of payments  its is creating individual invoices with collective invoice option in

  • Need to do an "Old fashioned" upgrade

    Hello All, I need to upgrade my app preferences and settings from my old system to my new one. I need to do this WITHOUT my old system due to its being out for repair. I DO have all of my old files/pref in a directory on my CURRENT HD. The Migration