944,030 Members | Top Members by Rank

Ad:
Aug 31st, 2005
0

Any way to refresh textfield content?

Expand Post »
Hi there

Im working on a listbox(flash component), where upon click, will display other arrays in a movie( which is also a listbox made from textfield). The second listbox suppose to contain html links, where it will open up a popup upon clicked.

The problem is that whenever i click on the listbox, the content in the sub listbox doesn't change. that is, it doesnt empty the previous load of links, but just add on to the list of links.

Im not sure what i can use to prevent this issue. I have tried listener, and "if else" statements.. Im not sure what else can be done to prevent this.

I've include the codes for the 2nd listbox(the textfield listbox) Hope that helps better in the understanding of my queston.

Really appreciate any help. Thanks.

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. var ListListen:Object = new Object();
  2. ListListen.change = function(pEvent:Object) {
  3. var selectItem:Object = pEvent.target.selectedItem;
  4. var b :Object = pEvent.target.selectedIndex;
  5. sampleList =_root.sampleMovie.Slist
  6. sampleList._visible = false;
  7. for (j=0; j<total; j++) {
  8. if (fTitle[b]== sampleTitle[j]) {
  9. sampleList._visible = true;
  10. sampleList.htmlText += "<A HREF='javascript:openNewWindow(" + sampleLinks[j] + ",myFlash,width=640,height=480,toolbar=no,resizable =no)' target = '_blank'> " + sampleWorks[j]+ "</a><br>"
  11. sampleList.dataProvider = selectItem.data;
  12.  
  13. }
  14. }
  15. };
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ozeona is offline Offline
12 posts
since Jul 2005
Aug 31st, 2005
0

Re: Any way to refresh textfield content?

I am not "pro" in Flash but you may try to do following. After selection from main index been made ad an extra line in your code which will empty your listbox of main index (empty your string variable) and then load up sub index.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004
Aug 31st, 2005
0

Re: Any way to refresh textfield content?

hm..
i need to have 2 listbox showing.. so that user uses the main lsitbox to open up whatever it is on the 2nd listbox aka textfield with scrolling buttons..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ozeona is offline Offline
12 posts
since Jul 2005
Sep 1st, 2005
0

Re: Any way to refresh textfield content?

Same thing
At start your_subindex = {empty string}
on 1st click your_subindex = {1st subindex}
on 2nd click 1st command your_subindex = {empty string}
2nd command your_subindex = {2nd subindex}

and so on.

Also why dont you try classic on? All subindexes placed on the stage and make them invisible on start. Then when ever any selection made run small script which will make shore that others subindexes are hiden only requered is visible. In style of rollover, instead of rollover use command onclick.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Graphics and Multimedia Forum Timeline: Need Help! Photoshop to Dreamweaver Web Publishing!
Next Thread in Graphics and Multimedia Forum Timeline: Adobe Pagemaker or Quark Xpress?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC