A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Strange bug in textinput component

  1. #1
    Member
    Join Date
    Jul 2004
    Location
    Genth, Belgium
    Posts
    72

    Strange bug in textinput component

    Hi,

    This is really strange...I have been searching crazy before i knew what caused it, looks like its the textinput component.

    I set up a test :

    http://www.silverware.be/pushme/pushme.swf
    http://www.silverware.be/pushme/pushme.fla


    If i select the text and try to click the button twice it wont work, The second hit doesnt get executed.

    If i move the mouse a litlle before i push the second time it works...
    If i remove the textcomponen it works

    strange isnt it

    anyone has any ideas?

    grtz

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    It has nothing to do with your text fields, they dont even have instance names.
    You're using onPress which only means when the mouse button is depressed. What you want is onRelease

  3. #3
    Member
    Join Date
    Jul 2004
    Location
    Genth, Belgium
    Posts
    72
    Hi jAQUAN,

    thnx for looking into this.
    i changed it to onrelease and even added instance names to the textfields,
    but thats not it...

    let me rephrase the problem

    1. Select a piece of text
    2. Click the button (you see that its clicked cause the color changed and the counter goes up)
    3. Without changing the mouse position, click it again, you see that it isnt clicked, color doesnt change, counter doesnt go up

  4. #4
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    One way round your bug is to get the button to change the current Selection as the component uses this to keep track of the selected text in it's textbox.
    (actually my recommended way round the bug is to delete the components panel!)

    name your button 'btn'....
    Code:
    on (press) 
    {
    	info.text = teller;
    	teller += 1;
    	// stops the crappy yellow box appearing
    	btn._focusrect = false;
    	// sets the selection to the button which is kind of a meaningless workaround
    	Selection.setFocus(btn);
    }
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

  5. #5
    Member
    Join Date
    Jul 2004
    Location
    Genth, Belgium
    Posts
    72
    thats it!
    thnx alot!

  6. #6
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    ah, I didn't see that. glad you got it fixed

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