A Flash Developer Resource Site

Results 1 to 20 of 24

Thread: Edit an especific string into a dynamic textbox

Threaded View

  1. #1
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971

    Edit an especific string into a dynamic textbox

    Hello guys! Long time.

    I'm creating this "Phone Contacts Numbers Saving Tool" for people who constantly losing their phone contacts numbers. I achieved making 2 dynamic textboxes "Name" "Number" so you put your name and number, then a button to "Create Contact". Then that info is saved into 2 dynamic textboxes columns, one is for Names and the other for Numbers. This is the script:

    Code:
    var saveState2:SharedObject = SharedObject.getLocal("cookie2");
    
    if(saveState2.data.Names==undefined && saveState2.data.Numbers==undefined ){
    	
    }
    else {
    	Names.text =saveState2.data.Names;
    Numbers.text =	saveState2.data.Numbers;
    }
    
    
    
    btn.onPress=function(){
     Names.text += name1.text 
    	Numbers.text += number1.text
    	
    saveState2.data.Names=Names.text;
    saveState2.data.Numbers=Numbers.text;
    	
    }
    
    btn2.onPress=function(){
     
    	
    saveState2.clear();
    Numbers.text=""
    Names.text=""
    	
    }
    
    
    
    stop();
    I want to be able to "edit" or "delete" an specific contact/number from the list. Every time you click the "create contact button" it adds the name and the number with
    Code:
     Names.text += name1.text 
    	Numbers.text += number1.text
    Ideas? Thanks
    Last edited by angelhdz; 09-11-2012 at 10:47 PM.
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

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