WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Flash Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Flash Discussion Forum Flash design presents a limitless number of possibilities for your sites and designs. Discuss your Flash ideas, questions and issues here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-02-2008, 12:05 AM
WebProWorld Member
 

Join Date: Dec 2007
Posts: 56
Abiao25 RepRank -1
Default West Technology Limited:Exclusive Values for Multiple Variables

West Technology Limited:Exclusive Values for Multiple Variables

The artcile was brought by the West Technology Limited

Guys and Gals,

I've got a new one for you that I haven't seen on the forum and I figured I'd put it out there while I figure out a solution. Here it goes:

I've built an Ad Builder module (yeah!) that at one point has an option for bullet points for the ad. There are 5 combo boxes (they get to have 5 bullet points) with identical lists. Once a selection is made to a combo box, it changes the corresponding variable through a Change Handler function (thanks NTD!).

Before the user is allowed to proceed to the next step, I check that all the fields are filled in (they can't have a blank bullet point). For all the other sections, this was easy because either there is a value for the variable or no value. For these combo boxes, the code to do that looks like this:

_root.displaybuildcontent.displaynext2.onPress = function() {
if ((_root.bull1 != null)&& (_root.bull2 != null)&& (_root.bull3 != null) && (_root.bull4 != null) && (_root.bull5 != null)) {
nextFrame();
}
else {
_root.displaybuildcontent.required2._alpha=100;
fieldCheck2(_root.bull1,_root.displaybuildcontent. requiredBull1);
fieldCheck2(_root.bull2,_root.displaybuildcontent. requiredBull2);
fieldCheck2(_root.bull3,_root.displaybuildcontent. requiredBull3);
fieldCheck2(_root.bull4,_root.displaybuildcontent. requiredBull4);
fieldCheck2(_root.bull5,_root.displaybuildcontent. requiredBull5);
}
};

The "_root.bull1"s are the variables. "_root.displaybuildcontent.required2" is the text box theat says "Required field", and the "_root.displaybuildcontent.requiredBull1"s are the asteriks for the specific combo box.

The fieldCheck2 function code is this:

function fieldCheck2(myVariable,myTarget){
if (myVariable != null){
myTarget._alpha = 0;
} else {
(myVariable == null)
myTarget._alpha = 100;
}
};

This works great, because if any of the variables = null, it not only stops you from proceeding, it tells you which fields your missing, and rechecks the variables every time you press the "_root.displaybuildcontent.displaynext2" button (movieclip).

Now, what I want to do is have it not only check that the variables != null before proceeding, but that the variables do not equal each other.

I think it can be done with a huge if/else statement, but does anyone have a more refined way of comparing multiple variables' values not equalling each other?

I'll keep working on it, but I thought I'd give the "experts" a try too.

Thanks
Reply With Quote
  #2 (permalink)  
Old 06-02-2008, 03:38 AM
WebProWorld Member
 

Join Date: Dec 2007
Posts: 56
Abiao25 RepRank -1
Default Re: West Technology Limited:Exclusive Values for Multiple Variables

I need help
Reply With Quote
  #3 (permalink)  
Old 06-12-2008, 04:14 AM
WebProWorld Member
 

Join Date: Dec 2007
Posts: 56
Abiao25 RepRank -1
Default Re: West Technology Limited:Exclusive Values for Multiple Variables

......No one want to help me!
Reply With Quote
Reply

  WebProWorld > Site Design > Flash Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
West Technology Limited: Traffic Source: Expired Domains Abiao25 Domain Discussion Forum 2 06-12-2008 03:28 AM
Cab.com in crazy sale--China Net Technology Limited Elove Domain Discussion Forum 2 11-07-2007 08:35 PM
PHP - Using drop down form to pass multiple variables richkoi Web Programming Discussion Forum 2 10-25-2005 12:25 PM
Temporary Variables: Keep Your Values Close, and Your Refer WPW_Feedbot Graphics & Design Discussion Forum 0 09-30-2005 09:33 AM
multiple values from form in php Jerry Web Programming Discussion Forum 3 09-20-2005 02:34 PM


Search Engine Optimization by vBSEO 3.2.0