Background image and buttons

I got 4 different images. I want to use these images as a background.
They have to change as soon as the buttons is clicked. I got four buttons.
Name of the pichtures image1.jpg etc
the buttons btn1 etc
I think its possible but i dont know how to work with backgrounds

ok, that is a start, but as i said im not a real flash user and creater.
So im gonna need some extra help,
You might remember kglad that you helped me before. if not I'll post the script.
import fl.transitions.Tween;
import fl.transitions.easing.*;
var bar1s:Number = 73.05;
var bar1e:Number = 665;
var bar2s:Number = 37.85;
var bar2e:Number = 630;
var bar3s:Number = 1.6;
var bar3e:Number = 595;
var time:Number = 2;
trace("bar 1 start" + tweenRight11 +" start "+ bar2s +" end "+ bar2e);
trace ("The X position of myBox_mc is "+ bar2.x);
bar1.addEventListener(MouseEvent.CLICK, movebar1);
var tweenRight11:Tween;
var tweenLeft11:Tween;
var tweenLeft12:Tween;
var tweenLeft13:Tween;
var tweenLeft14:Tween;
var tweenLeft15:Tween;
var tweenLeft16:Tween;
function movebar1(e:MouseEvent):void{
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1s)< 2)){
     tweenRight11 = new Tween(bar1, "x", Strong.easeOut, bar1s, bar1e, time, true);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft11 = new Tween(bar1, "x", Strong.easeOut, bar1e, bar1s, time, true);   
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft12 = new Tween(bar1, "x", Strong.easeOut, bar1e, bar1s, time, true);
     tweenLeft13 = new Tween(bar2, "x", Strong.easeOut, bar2e, bar2s, time, true);
     if  ((Math.abs(bar3.x-bar3e)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft14 = new Tween(bar1, "x", Strong.easeOut, bar1e, bar1s, time, true);
     tweenLeft15 = new Tween(bar2, "x", Strong.easeOut, bar2e, bar2s, time, true);
     tweenLeft16 = new Tween(bar3, "x", Strong.easeOut, bar3e, bar3s, time, true);
bar2.addEventListener(MouseEvent.CLICK, movebar2);
var tweenRight21:Tween;
var tweenRight22:Tween;
var tweenRight23:Tween;
var tweenLeft21:Tween;
var tweenLeft22:Tween;
var tweenLeft23:Tween;
function movebar2(e:MouseEvent):void{
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1s)< 2)){
     tweenRight21 = new Tween(bar1, "x", Strong.easeOut, bar1s, bar1e, time, true);
    tweenRight22 = new Tween(bar2, "x", Strong.easeOut, bar2s, bar2e, time, true);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
    tweenRight23 = new Tween(bar2, "x", Strong.easeOut, bar2s, bar2e, time, true);
     if  ((Math.abs(bar3.x-bar3e)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft21 = new Tween(bar2, "x", Strong.easeOut, bar2e, bar2s, time, true);
     tweenLeft22 = new Tween(bar3, "x", Strong.easeOut, bar3e, bar3s, time, true);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft23 = new Tween(bar2, "x", Strong.easeOut, bar2e, bar2s, time, true);
bar3.addEventListener(MouseEvent.CLICK, movebar3);
var tweenRight31:Tween;
var tweenRight32:Tween;
var tweenRight33:Tween;
var tweenRight34:Tween;
var tweenRight35:Tween;
var tweenRight36:Tween;
var tweenLeft31:Tween;
function movebar3(e:MouseEvent):void{
     trace(bar3.x,bar3s,bar3e,":",bar2.x,bar2s,bar2e,":",bar1.x,bar1s,bar1e);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1s)< 2)){
     tweenRight31 = new Tween(bar1, "x", Strong.easeOut, bar1s, bar1e, time, true);
    tweenRight32 = new Tween(bar2, "x", Strong.easeOut, bar2s, bar2e, time, true);
     tweenRight33 = new Tween(bar3, "x", Strong.easeOut, bar3s, bar3e, time, true);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2s)< 2) && (Math.abs(bar1.x-bar1e)< 2)) {
     tweenRight34 = new Tween(bar2, "x", Strong.easeOut, bar2s, bar2e, time, true);
     tweenRight35 = new Tween(bar3, "x", Strong.easeOut, bar3s, bar3e, time, true);
     if  ((Math.abs(bar3.x-bar3s)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenRight36 = new Tween(bar3, "x", Strong.easeOut, bar3s, bar3e, time, true);
     if  ((Math.abs(bar3.x-bar3e)<2) && (Math.abs(bar2.x-bar2e)< 2) && (Math.abs(bar1.x-bar1e)< 2)){
     tweenLeft31 = new Tween(bar3, "x", Strong.easeOut, bar3e, bar3s, time, true);
You see that the button is the bar and slides, that is all working and tested real good. Now that is the bar is clicked and that will move the bar but it will have to change the background
what do you think

Similar Messages

  • SCOM 2012 R2 RU 2 Topology widgets Background image and Nod visualization is missing

    After Updating RU 2 in System center OM 2012 R2 no background image and Nod visualization missing in Topology widgets ?
    Santosh Dharamsale

    You will need to Import the MP Microsoft.SystemCenter.Visualization.Library.mpb.
    For more info., You can refer below link
    http://thoughtsonopsmgr.blogspot.com/2014/04/update-rollup-2-for-scom-2012-r2.html
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Background images and color

    What instance would background image and background colors
    not show in a browser? (All other images are fine)

    Cosmic rays.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:gbu845$7gd$[email protected]..
    >A color specification without the required octothorpe
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "TC2112" <[email protected]> wrote in message
    > news:gbu7sb$782$[email protected]..
    >> Hello,
    >>
    >> Some examples would be incorrect CSS, an incorrect
    link to a CSS
    >> stylesheet, another element with a background color
    "on top" of the
    >> background blocking it, an incorrect path to the
    image....
    >>
    >> The answer is in the code.
    >> Do you have a link you could post?
    >>
    >> Take care,
    >> Tim
    >>
    >> "TaraLeigh" <[email protected]>
    wrote in message
    >> news:gbu7bj$6hs$[email protected]..
    >>> What instance would background image and
    background colors not show in a
    >>> browser? (All other images are fine)
    >>
    >>
    >

  • How is it possible to adjust the background images and the text in Mail?

    How is it possible to adjust the background images and the text in Mail?

    Here's the solution I used to solve the same problem. If you're not comfortable editing the source files, this might be more than you want to take on--but I've done it to several files with no ill effects. You can follow the instructions on this page and the referenced original post from (he includes a link on the page). Good luck! He's got some great tips on some of his other pages.
    http://photo.rwboyer.com/2010/03/15/aperture-3-book-theme-trick/
    A warning about editing the Master pages--it only edits them in that book--it doesn't update the theme. So if you go to create another book with those same layouts, you'll have to duplicate the book and replace all the images. An alternative would be to create a "clean" book with no photos in it and then just use that as a starting point each time.

  • Resizing 1) background images and 2) div's containing images

    I just created a web page consisting of little more than an image (about 900 pixels) wide which is set at width=100% in a style sheet. It works great, but I'd like to substitute a smaller image (to reduce page loading time) in mobile devices.
    If it was a background image, I could just declare two different background images based on screen size, but I don't know of any way to swap between images actually inserted in a page.
    So, is it possible to give a background image a width in percentage, similar to a static image? In other words, if my screen was 651 pixels wide, then a static image inside a container spanning the entire screen should also be 651 pixels wide. Can I rig it so that a background image in that container would also be 651 pixels wide?
    Of course, the obvious problem is height. If a background image measures 900 X 1200 pixels, and a screen is 600 pixels wide, then even if there's a style that makes the image 600 pixels wide, it would also have to calculate a height of 800 pixels, and I'm guessing that can't be done.
    Anyway, I'd just like to know what kinds of tricks one can use in making background images and divs containing static images display in percentages based on screen size.
    Thanks.

    Use background-size:cover; for your background images.
    Further reading: http://css-tricks.com/perfect-full-page-background-image/
    EDIT:// For swapping out placed images, it's a little harder to do right now as there is no specified solution from W3C. Some people want to use the srcset attribute, others the <picture> tag. There is no perfect approach right now. See: http://mobile.smashingmagazine.com/2013/08/21/webkit-implements-srcset-and-why-its-a-good- thing/
    One idea is you could hide the image and then load a background-image in the container which is smaller in size. But this would likely bloat your HTML and CSS as you use multiple images - the device will also load both images so you don't gain any real advantage unless you intend to show a croppoed or different image.
    Other ideas: http://mobile.smashingmagazine.com/2013/07/08/choosing-a-responsive-image-solution/
    <div class="image">
         <img src="YourImage.jpg" alt="" width="500" height="250" />
    </div>
    @media only screen and (max-width: 480px) {
         .image img {display:none;}
         .image {
              background:url("YourImage_Mobile.jpg") no-repeat 0 0;
              background-size:cover;
    Another idea is to show/hide the relevant image:
    <img src="YourImage.jpg" alt="" width="500" height="250" class="desktop" />
    <img src="YourImage_mobile.jpg" alt="" width="300" height="180" class="mobile" />
    @media only screen and (max-width: 480px) {
         .desktop {display:none;}
         .mobile {display:block;}

  • Adding images and buttons without a frame appearing

    I would like to add images to some of my pages without having them appear in a frame. I would like to place some transparent gifs on the page to use as buttons for hyperlinks. I would also like to have some photos (with transparent backgrounds that appear on the page and are not surrounded by a picture frame. Any Suggestions

    iWeb seems to default to stroking newly-added images and shapes. Pages (iWeb's close relation) includes a way to change the default appearance, but I can't find anything similar in iWeb. You can, of course, remove the stroke using the Graphic Inspector (just set Stroke to None). Transparency in gifs and photo images is supported. Just drag into iWeb or use Insert > Choose... Again, remove the stroke if this appears.

  • Problem with Background image and JFrame

    Hi there!
    I've the following problem:
    I created a JFrame with an integrated JPanel. In this JFrame I display a background image. Therefore I've used my own contentPane:
    public class MContentPane extends JComponent{
    private Image backgroundImage = null;
    public MContentPane() {
    super();
    * Returns the background image
    * @return Background image
    public Image getBackgroundImage() {
    return backgroundImage;
    * Sets the background image
    * @param backgroundImage Background image
    public void setBackgroundImage(Image backgroundImage) {
    this.backgroundImage = backgroundImage;
    * Overrides the painting to display a background image
    protected void paintComponent(Graphics g) {
    if (isOpaque()) {
    g.setColor(getBackground());
    g.fillRect(0, 0, getWidth(), getHeight());
    if (backgroundImage != null) {
    g.drawImage(backgroundImage,0,0,this);
    super.paintComponent(g);
    Now the background image displays correct. But as soon as I click on some combobox that is placed within the integrated JPanel I see fractals of the opened combobox on the background. When I minimize
    the Frame they disappear. Sometimes though I get also some fractals when resizing the JFrame.
    It seems there is some problem with the redrawing of the background e.g. it doesn't get redrawn as often as it should be!?
    Could anyone give me some hint, on how to achieve a clear background after clicking some combobox?
    Thx in advance

    I still prefer using a border to draw a background image:
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.border.*;
    public class CentredBackgroundBorder implements Border {
        private final BufferedImage image;
        public CentredBackgroundBorder(BufferedImage image) {
            this.image = image;
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
            int x0 = x + (width-image.getWidth())/2;
            int y0 = y + (height-image.getHeight())/2;
            g. drawImage(image, x0, y0, null);
        public Insets getBorderInsets(Component c) {
            return new Insets(0,0,0,0);
        public boolean isBorderOpaque() {
            return true;
    }And here is a demo where I load the background image asynchronously, so that I can launch the GUI before the image is done loading. Warning: you may find the image disturbing...
    import java.awt.*;
    import java.io.*;
    import java.net.URL;
    import javax.imageio.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class BackgroundBorderExample {
        public static void main(String[] args) throws IOException {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame f = new JFrame("BackgroundBorderExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea area = new JTextArea(24,80);
            area.setForeground(Color.WHITE);
            area.setOpaque(false);
            area.read(new FileReader(new File("BackgroundBorderExample.java")), null);
            final JScrollPane sp = new JScrollPane(area);
            sp.setBackground(Color.BLACK);
            sp.getViewport().setOpaque(false);
            f.getContentPane().add(sp);
            f.setSize(600,400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
            String url = "http://today.java.net/jag/bio/JagHeadshot.jpg";
            final Border bkgrnd = new CentredBackgroundBorder(ImageIO.read(new URL(url)));
            Runnable r = new Runnable() {
                public void run() {
                    sp.setViewportBorder(bkgrnd);
                    sp.repaint();
            SwingUtilities.invokeLater(r);
    }

  • Many images and buttons on websites are not visible and appear as white space.

    i am unable to see buttons such as the "buy now" button, but when i scroll over the white space, the cursor changes to alert me that i've found the button. also, websites i frequent are now missing images and logos on this computer. i am windows XP pro, firefox browser. thanks for any assistance.

    -> click '''Firefox''' button and click '''Options''' -> Content panel -> place Checkmark on '''Load Images Automatically''' -> click '''Exceptions...''' button and click '''Remove All''' -> Now type the address of websites on which you want Images to appear e.g. '''msn.com''' , '''yahoo.com''' , '''google.com''' , etc. -> click '''Allow''' for each, One by One -> click Close - > click OK on Options window -> Restart Firefox
    -> Go to your concerned websites
    * Right-click empty space within the page and click '''View Page Info'''
    * In the '''Page Info''' window, select the '''Media''' panel and Remove Checkmark from '''Block Images'''
    * In the '''Page Info''' window, select the '''Permissions''' panel
    * Under '''Load Images''', Change the setting to '''Allow'''
    * Under '''Set Cookies''', place Checkmark on '''Use Default''' and Change the setting to '''Allow'''
    * Close the Page Info window
    Also see this - Images or Animations do not show
    * https://support.mozilla.com/en-US/kb/Images%20or%20animations%20do%20not%20show
    * http://kb.mozillazine.org/Images_or_animations_do_not_load
    Check and tell if its working.

  • Help with images and buttons

    I was wondering if anyone could recommend a tutorial or point me in the right direction. I've been trying to figure out how to use buttons to add images (been using png from photoshop with alphachannel) to a canvas. I don't have any problems skinning the buttons nor putting in a single image, nor text. As far as getting the images to layer when the buttons are clicked then I'm pretty lost. Not sure if an array is best or if adding and removing them as children in another container would be any easier..

    I've been using flash builder beta 2. I was planning on embedding the images. I'm not sure if the help files and examples I am reading are not compatible or if I just have the syntax wrong. I haven't been able to find any examples that use embedded images and toggle visibility. I've used spark components. In design mode it puts the code in for a button when drag-dropped, then recommends using spark component instead. It seems that the only time that the images really do anything is when there's a spark component.
    I've never used flex before would it be easier to use wordpad and try compiling it with something other than flash builder?

  • How can I create clearer, sharper images and buttons in Muse?

    How can I create buttons and images that have a vector like clarity? When I upload images (buttons, jpegs and pngs) a lot of the time they seem to have a slightly fuzzy quality to them. I have read previous posts on this matter and none have helped. Any feedback on this will be greatly appreciated. Thanks

    When you place your images in exactly the size you saved them in Photoshop or whatever, Muse doesn’t touch it.
    The quality in this case is the quality you saved the image.
    The best way is, to examine in Muse the available pixel size of the image and then use Photoshop to obtain this size
    A helpful widget to examine the potential size of an image in advance, is the "lore ipsum"-Muse-widget, that you find in the free widget collection "Andrew’s Prototypes":
    Andrew Prototypes | Exchange | Adobe Muse CC

  • Fx-background-image and rounded borders

    Hi,
    I am trying to use a simple image as background image for an HBox through repetition, but I have found a problem. The HBox has got rounded borders (using fx-background-radius) and when I set the background image with fx-background-image it does not fit the real borders of the HBox and it appears painted outside the limits.
    The css code is the following:
    -fx-background-radius: 0 0 30 30;
    -fx-background-image:url('image1.png');
    -fx-border-radius: 0 0 30 30;
    -fx-border-width:0 2 2 2;
    -fx-border-color:#D9D9D9 #D9D9D9 #D9D9D9 #D9D9D9;
    -fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.35) , 20.13095238095238,0.5 , 0 , 18 ); Is this the expected behaviour? If a try it with background-color, it adjusts perfectly to the rounded borders. Should I set another property? (I have tried with fx-background-size and fx-background-repeat and fx-background-position but with no result)
    Thanks in advance.
    Regards.

    This probably is expected behaviour.
    The properties for background fills (color, insets, radius) donot work together with the properties for background images (image, position, repeat, size). They are separate and painted in separate passes in order, quote from the CSS doc below:
    >
    Each Region consists of several layers, painted from bottom to top, in this order:
    background fills
    background images
    contents
    border strokes
    border images

  • Match Background Image and Browser Image

    Hello,
    I am using a background image that I created for my page background. I would like it to be the same image for the browser background as well vs. the solid color option.
    I've attached the same image and when it is live, the color is off (it's a gray image with a texture treatment). So, it looks like a box and then another box.
    Anyway to get around this? Should I resize? Can I make the background image bleed so it takes over the browser background?
    I tried making the page size large, but then on screen, the scroll bar made everything of center.
    Help please!
    Thanks!

    Have you tried setting your page background to none?
    If you do this you will only see the browser background (with your image on it) when published.
    David

  • Upgrading APEX from 3.2 to 4.0 images and buttons not displaying correctly

    Database 11.2.0.1
    APEX: 3.2.1
    Attemping to upgrade APEX from 3.2 to 4.0. The installation script runs fine and updates the database successfully. I run the .sql to import the images and it ran successfully however when I attempt to access the APEX home page, the images are not loaded and the buttons don't do anything. I did some research through google but did not come to anything that resolved my issue. Does anyone have any ideas?
    Thanks for your time...

    If you are using mod_plsql, you need to run @apxldimg.sql script with SYS user file present with Apex installation. Also provide the location of your apex folder as parameter to this script.
    Habib

  • How do I center my background image and get a round border radius?

    <!--I thought I had pretty straight forward CSS, but the image is way to the top and I can't create a border radius. Below is my CSS-->
    body {
      background-color: rgba(30,30,30,1);
      background-image: url('images/me_atsunsetbackground1.JPG');
      background-repeat: no-repeat;
      background-position: center;
      background-border-radius: 100%;
      position: fixed;
      margin-top: 250px;

    That doesn't surprise me, that code wasn't meant to be a direct replacement for yours, it's just there to illustrate an idea for Nancy.
    The <body> tag itself should not be changed in that manner because the <body> holds ALL of your site's visual elements. If you were to change the <body> in the way you are attempting (which isn't possible), everything in your site would need to be within that oval.
    If you just want an oval background image on the <body>, turn the image itself into an oval in Photoshop and outside the oval, either use the same color as the <body> background-color, or leave it transparent and save it as a .png with transparency.
    Your inset shadow css is badly malformed...
    1. The attribute "shadow" doesn't exist. You're looking for CSS3 box-shadow.
    2. Safari and DW need the -webkit- prefix to display it (again, you need to test in more than one browser)
    3. The settings need to be in the correct order: h-shadow, v-shadow, blur, spread, inset (something like box-shadow:10px 10px 5px 5px rgba(255, 255, 255, .5) inset;
    Keep in mind, css3 settings (like rgba color settings and box-shadow in its entirety) don't work in IE8 and lower at all, and are pretty spotty in IE9.

  • No background images and missing styles - everything white

    somehow every page on firefox displays white with no style or background images. I thought it might have been something having to do with firebug or developer plugin, so I disabled them both, upgraded to the latest firefox version and STILL I have a white screen.

    I appreciate the response. I checked the settingx you suggested and everything was correct.
    I'm on a mac. Below is the shot of the firefox post we're in right now.
    http://calproject.com/firefox/screen-shot-firefox-page.png
    So this is not a specific site - its ALL sites... As you can see.... all images and color are missing.
    Thanks!

Maybe you are looking for

  • How to delete file from column after upload with messageFileUpload?

    Which is the way to delete a file from column i have uploaded with messageFileUpload. After uploading the system generates a link to download the file. But how i can delete the file?

  • PO Requisition Approval workFlow

    Hello All I am working on PO Requisition Approval work flow , when we crate a requisition one workflow is generated and my user want the workflow notification should be modified , like we have in the table few columns supplier ,itmes and wareshouse d

  • We don't use microsfot exchange

    Just wondering if any of you know as to why some company email will not come over from Microsoft Outlook to either an iPhone 4 or iPhone 5.  We don't use Microsoft Exchange.  Is there a work around or what?

  • [HTC Desire, android 2.2., FP10.1.95.2] TransformGestureEvent.GESTURE_SWIPE not working

    Hi, (I have asked this question here: http://forums.adobe.com/thread/737650?tstart=0 as well). I am reviewing new features of the player and I've made few examples from documentation, latter is about TransformGestureEvent.GESTURE_SWIPE, but I can't g

  • Need a query to find Grops mapped on Folders

    Hi , I need a query builder query to find out the list  of folder and mapped groups to those folder. Would you please let me know if that is possible I triead but no luck . Regards, Neo