A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [F8] In over my head, but probably simple...

  1. #1
    Member
    Join Date
    May 2004
    Location
    Las Vegas, NV
    Posts
    32

    [F8] In over my head, but probably simple...

    Okay, so I have a movie clip that has the following action:

    onClipEvent (load) {
    txt = 1;
    }


    INSIDE the movie clip, is a movie clip with this action:

    on (rollOver) {
    if (_root.link<>txt) {
    gotoAndPlay("s1");
    }
    }
    on (releaseOutside, rollOut) {
    if (_root.link<>txt) {
    gotoAndPlay("s2");
    }
    }
    on (release) {
    if (_root.link<>txt) {
    _parent["item"+_root.link].gotoAndPlay("s4");
    _root.link = txt;
    _root.play();
    gotoAndPlay("s3");
    _root.gl = 1;
    _root.scroller.scroller.gotoAndStop(3);
    }
    }


    I want to create a button ON TOP of the original movie clip, but I don't want it to mess up the mouseover commands in the movie clip below. Is there a way to actionscript the same rollover commands for the movie clip two levels below into the button two levels above?!

    Too complicated for me and in need of help,
    Thespis

  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Completely confused as to what you want. You can't control a clip underneath a clip without bringing it to the front somehow. Via swapDepths or getNextHighestDepth(), or however. What is the overall effect you're going for. Maybe there is an entirely different way to achieve it?

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    And I thought I was the only flasher from vegas.

    Technically and logically, you can only rollover one thing at a time. Any button overlapping another is going to cancel out the lower one.

    There is a work around using a Mouse listener and hitTest to dynamically set the enabled property of the big button but its kinda complicated.

    For now you can probably just edit the hitArea frame of the big button so that is has hole knocked out where the smaller buttons are sitting.

  4. #4
    Member
    Join Date
    May 2004
    Location
    Las Vegas, NV
    Posts
    32

    Hmmmm... Possibly Another Way to do this?

    Okay, so taking advice from mneil, perhaps there is another way to make this work -- so let me step back, show you what I've created and then ask advice!

    Attached is the FLA of a menu bar, 4 buttons, each one has a nice rollover effect and another effect when the corresponding page is active (text glow). I've decided that I want the third button to behave the same, but instead of activating the animation that corresponds, I want to send the user to an external site. Problem is, I made the menu using multiple instances of the same (as you'll see).

    Is there a simpler way to do this? I tried putting a transparent button to intercept, but then I lost the rollover actions, etc.

    Run the movie first to see what I'm talking about!

    Thanks,
    Terrence in Las Vegas

    PS: I'm glad to see there are other Flashers here besides me, cause there sure aren't many!

  5. #5
    Member
    Join Date
    May 2004
    Location
    Las Vegas, NV
    Posts
    32

    Hmmmm, wouldn't let me attach... trying again.

    Attachment is here:
    Attached Files Attached Files

  6. #6
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    I'm sorry I don't have time to dig through the file.
    Looks like you are going to have to duplicate the symbol named ABOUT in your library.
    Modify the release code on the duplicate. Instead of the line that tells the timeline to play, just use:
    getURL("http://www.mywebsite.com", "_blank"); //"_blank" forces a new browser window. use "_self" for the same window

  7. #7
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    So if I understand right, you just want to leave the fla and goto another browser window when you click on button 3? Then just do what jAQUAN suggested and use the getUrl on release to open a new page, you'll probably want to disassociate that button with any movie action too so you don't see the fla starting to move and then get redirected. It might confuse people into thinking something wrong happened or a pop-up came. Unless of course you want that.

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