A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Can't get onRollOver to work for an mc

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    Can't get onRollOver to work for an mc

    I have an mc named "s_image1_mc".

    Inside this mc I have another MC named "mask1"

    What I would like to happen is that when "s_image1_mc" is rolled over, the MC named "mask1" will play. I have a keyframe inside of "s_image1_mc" with the label "on" and the "mask1" mc on this keyframe.

    I have the following which doesn't work
    PHP Code:
    s_image1_mc.onRollOver = function() {
            
    this.gotoAndPlay('on')
            
    this.mask1.play()


    How do I target "mask1" which is inside of "s_image1_mc" to play?

    I've attached the file: http://www.caillouette.com/3.zip

    thanks
    I'm only in it for the pleasure

  2. #2
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    If your "mask1" is only present on stage on the frame labeled "on" in your "s_image1_mc", then the only way this will work is to set a variable to true on your rollOver function, and have a check on the "on" frame to see if that variable is true, and if so then have your "mask1" mc then play. Otherwise your this.mask1.play() action is simply ignored.

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thank CricCracCroc but

    your solutiuon doesn't sound right.

    Please have a look at my file

    http://www.caillouette.com/3.zip

    thanks again
    I'm only in it for the pleasure

  4. #4
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    I would have... But I'm not on MX2004 and can't open your .fla.
    You would have to save it in a MX only format.

  5. #5
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thanks CricCracCroc

    Here is an MX version for you:

    http://www.caillouette.com/4.zip

    thanks again
    I'm only in it for the pleasure

  6. #6
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    Nope! Still can't open it! You've must of zipped up the same 2.fla.
    Use Save As and save under another name( and change the document type in the Save as window), and make sure it's not in the application when you zip it up.

  7. #7
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    Try this one CricCRacCroc

    Thanks for the effort.

    I think this should be in MX format

    http://www.caillouette.com/5.zip

    thanks again
    I'm only in it for the pleasure

  8. #8
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    Nope! Sorry my friend! This usually works but doesn't in this case!
    Why do you keep saving it as 2.fla rather than 2mx.fla? And making sure it's 2mx.fla that's in your zipped package?

    In any case, if I look at your included .swf, nothing is reacting as a button... All I see is this services rectangle on the left, and a serie of 5 rectangles on the right, with the top one animated and all others but white rectangles... So what gives?

  9. #9
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thanks CricCracCroc

    Sorry about that, I could have sworn it was an MX file.

    Try this one: http://www.caillouette.com/6mx.zip

    The animated image in the top right is the button.

    I have other features for the site, but I need to get this working first.

    thanks again.
    I'm only in it for the pleasure

  10. #10
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    Nope! No go, sorry! Your original file is either corrupted, or you have some elements (you haven't talked about...) which are preventing your .fla, from being opened in MX only.
    Are you on Mac? If so, what are you using to zip your Mac .fla?
    Are you just changing your .sit extension to a .zip one, or what?

    I'll try to recreate what I understand, as what you're trying to get at, but unless you can come up with a .fla I can open, I won't be able to help you out.

  11. #11
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    This is what I meant...
    Attached Files Attached Files

  12. #12
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thanks CricCRacCroc

    I've made some headway, I'll let you know how it goes.

    thanks again
    I'm only in it for the pleasure

  13. #13
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    Okay . . . so I have it 3working . . . sort of

    When you click on 03 in the lower left corner, you get the services page.

    Then in the top right there is a scrolling angled bar image. When you roll over this image you get a picture. Then when you roll off the animation continues.

    The problem is that when you roll off and then rolll back on, the image doesn't show. You need to wait about 5 seconds or so before you roll back on to see the image.

    The file in question is "2.fla."

    Please have a look at this file and please help me resolve this problem.

    here is a link to the files in MX format: http://www.caillouette.com/LELALESMX.zip

    thanks
    I'm only in it for the pleasure

  14. #14
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    here's a simpler version of the button problem

    Here is a wattered down version

    http://www.caillouette.com/lelales6.zip

    thanks
    Last edited by lelales; 04-03-2005 at 10:57 PM.
    I'm only in it for the pleasure

  15. #15
    Sockpuppet
    Join Date
    Mar 2005
    Posts
    15
    The only .fla I can open no problem is the yugoplikemenu one in both the above packages. Thus you can't be saving your own .flas as MX only! Are you using Save As and changing the Document Type (as MX only - not 2004) in the Save As window?

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