Movie clip visibility triggered by Mouse position - Page 2
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: Movie clip visibility triggered by Mouse position

  1. #21
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    853
    that's really good if you need more help include another .fla that says what it needs with your updated scripts
    This is the wild: var time=0;while(time<10000000){time--;}

  2. #22
    Junior Member
    Join Date
    Jan 2018
    Posts
    24
    okay, would sure do. Thanks.

  3. #23
    Junior Member
    Join Date
    Jan 2018
    Posts
    24
    Code:
    stage.addEventListener(MouseEvent.MOUSE_MOVE, showLD2);
    function showLD2 (e:MouseEvent):void {
    		if (mouseY <= 344 && workWindow.LD2nd.visible = false ){
    		workWindow.LD2nd.visible = true;
                   }
    }
    Please what do you reckon would be the best way to frame the above syntax, line 3 more specifically

  4. #24
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    853
    LD2nd.visible needs == not = alone.

    stage.addEventListener(MouseEvent.MOUSE_MOVE, showLD2);
    function showLD2 (e:MouseEvent):void {
    if (mouseY <= 344 && workWindow.LD2nd.visible == false ){
    workWindow.LD2nd.visible = true;
    }
    }
    This is the wild: var time=0;while(time<10000000){time--;}

  5. #25
    Junior Member
    Join Date
    Jan 2018
    Posts
    24
    Thanks. Erm....I don't know but it doesn't seem to be obeying the "&& workWindow.LD2nd.visible == true" condition before executing the whole code. Is there something I'm missing?

  6. #26
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    853
    if it is not visible the mouse event can't see it, I recommend you use alpha to hide it
    This is the wild: var time=0;while(time<10000000){time--;}

  7. #27
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    853
    also it is workWindow.visible that's currently false not workWindow.LD2nd.visible
    This is the wild: var time=0;while(time<10000000){time--;}

Tags for this Thread

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