AS2 dynaic text-scroll question
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS2 dynaic text-scroll question

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    20

    AS2 dynaic text-scroll question

    Greetings
    I have a great text scroller file with an invisible instance of a MC, a dynamic text box,
    and an up & down button MC;
    onClipEvent (enterFrame) {
    if(hitTest(_parent.mouseFollower)){
    _parent.scrollText_txt.scroll +=1;
    }
    }
    and of course down has -=1

    It scrolls perfectly when the button/MCs are rolled over.

    Is there a way to animate the text so it starts scrolling on startup and override it to mouseover control as above (now) when the button is rolled over?

    any help is good help,

    thanks S4

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,808
    Replace your UP code with this:

    Code:
    onClipEvent (load) {
    	_root.started = false;
    }
    
    onClipEvent (enterFrame) {
    	if(_root.started == false){
    		_parent.scrollText_txt.scroll +=1;
    	}
    	if(hitTest(_parent.mouseFollower)){
    		_root.started = true;
    		_parent.scrollText_txt.scroll +=1;
    	}
    }
    and assuming your DOWN code looks the same, just with -1, change your DOWN code to this:

    Code:
    onClipEvent (enterFrame) {
    	if(hitTest(_parent.mouseFollower)){
    		_root.started = true;
    		_parent.scrollText_txt.scroll -=1;
    	}
    }
    Hope this is what you wanted
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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