A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [MX04] Need help with buttons & drop down menu

  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    43

    [MX04] Need help with buttons & drop down menu

    Hi, I've been trying to add images to the MC's represented by the colored squares. I'll like to add this images to the squares by clicking the option buttons on the drop down menu. Does any one know how to find a solution to this problem? Please open the attachment below.

    Thanks.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    May 2005
    Posts
    238
    why don't you use the loadMovie command for that ? that maybe the easier option.

    on (rollOver, dragOver) {
    gotoAndStop(2);
    }
    on (release) {
    gotoAndStop(1);
    list = "Option 1";
    }
    on (release) {
    loadMovie("whateverTheImage.jpg", "_root.red_box");
    }

    red_box is the instance name I gave to the red square.

    you also need to change the registration points , else you'll have a problem with the images showing from the middle of the MCs....

  3. #3
    Member
    Join Date
    Sep 2006
    Posts
    43
    I incorporated the actionscript on option 1 under the first menu & I gave the grey square an instance of grey_box like you suggested. Now where do I put this grey box for it to appear on the main red square? because I keep on getting a message error. Please open the new attachment Thanks.
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Sep 2006
    Posts
    43
    Here is the new attacment....
    Attached Files Attached Files

  5. #5
    Senior Member
    Join Date
    May 2005
    Posts
    238
    you'll get an error message cos you're not loading an image to it,
    "whateverTheImage.jpg" you meant to change that with the name of the image of your own, so if your image was named , picture1, then it would be

    on (rollOver, dragOver) {
    gotoAndStop(2);
    }
    on (release) {
    gotoAndStop(1);
    list = "Option 1";
    }
    on (release) {
    loadMovie("picture1.jpg", "_root.red_box");
    }

    -------------------
    what you are doing here is;
    loading the image to the Target called "red box"

    also you have to change the registration point to " left top corner" , you've not done that either, so your image will show from right bottom of the target cos the registration point is there so ,
    double click on the graphic and bring the corner of it to the Plus sign and that way the registration point is at the top left corner where the image will load from.
    also make sure that the SWF and the image are in the same folder.
    if you wanted the red box as a red background then create a box on top of it as the loading target like you did as the grey box and you should be ok

  6. #6
    Member
    Join Date
    Sep 2006
    Posts
    43
    Thanks jack324!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center