A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Student in need! Rollovers

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    21

    Student in need! Rollovers

    Hi,
    I've made a website in MX for my final university project, but I've got a problem. I have buttons moving all over one half of the stage, and I need to be able to rollover them and have an image appear on the other half of the stage, but I need it to stay in the same place, even though its button is moving around.
    Please can someone help!
    Cheers, Aussie01

  2. #2
    Under the influence bvgroote's Avatar
    Join Date
    Nov 2000
    Location
    Perth, Australia
    Posts
    1,408
    you're in the wrong section buddy, but I may be able to help you out.


    This isn't the actual best way to do it, but it's the way I would do it.

    Ok, create the button, but instead of the over section having the part on the right side show up, just CTRL + X the right side how it is now so it's on your clipboard.

    Ok, go back to the main movie area (make sure your out of the button editing section) and make a new layer, paste the bit you want and position it where you want it.

    now turn it into a movie clip - simply click on insert>convert to symbol or press F8 ( i think).

    now click on the movieclip once it's created, and where it says instance name, call it button1_rhs or something similar. now put this code into the action panel of the mc(movieclip):

    PHP Code:
    onClipEvent (load) {
        
    setProperty(this_visible0);

    now click on the button that is moving around and give that some actions:

    PHP Code:
    on (rollOver) {
        
    setProperty(_root.button1_rhs _visible1);
    }
    on (rollOut) {
        
    setProperty(_root.button1_rhs _visible0);


    let me know if I confused you!

  3. #3
    Flash Kit Moderator Genesis F5's Avatar
    Join Date
    Jan 2002
    Location
    Unallocated memory
    Posts
    1,845
    Yes, wrong forum. You can simplify bvgroote's code by changing the setproperty sets to "this._visible=false" or "this._visible=true". Unless that only works with movie clips, but I believe it works with all clips of any kind.

    -genesis f5 (mx)

  4. #4
    Under the influence bvgroote's Avatar
    Join Date
    Nov 2000
    Location
    Perth, Australia
    Posts
    1,408
    yeah I'm not much of an AS'er, know just enough to get me by hehe.

  5. #5
    Phantom Flasher... Markp.com's Avatar
    Join Date
    May 2000
    Posts
    16,034
    Moved to Actionscript. Do not post technical questions in the coffee lounge, or a monkey will leap out of your mouse and beat you about the face...

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