Assigning strings a value?(revised)
I had another problem with nested if structure, i have tried ever way i could think of possibly to assign the value to a string. hard to explain, example below
//classCode is input from user
// classYear is the current year in highschool, i keep on getting errors no matter which way i assign the string!
i'm trying to figure out how to do this correctly
If(ClassCode = ("FR")
classyear= "Freshman";
// i know it's not correct, but i have no idea
// what is? same for this assignment!
If(grdP = 100)
grade = "A"; // results in a error, i'm real confused
if(classCode.equals("FR"))
classyear= "Freshman"; For objects use .equals, for primitives use "==".
If(grdP = 100)
grade = "A"; // results in a error, i'm real confused At a guess grade is a char,
grade = 'A';
Similar Messages
-
Assigning strings a value?
I had another problem with nested if structure, i have tried ever way i could think of possibly to assign the value to a string. hard to explain, example below
//classCode is input from user
// classYear is the current year in highschool, i keep on getting errors no matter which way i assign the string!
i'm trying to figure out how to do this correctly
If(ClassCode = ("FR") // i know it's not correct, but i have no idea classyear= "Freshman"; // what is? same for this assignmeny!
If(grdP = 100)
grade = "A"; // results in a error, i'm real confusedTry using a switch statement to solve your problem. It'll be cleaner code and easier to read and understand.
//declare a variable
int usrInput;
if( ( usrInput >= 10 ) || ( usrInput <= 1 2) )
switch(classYear)
case 10:
classyear = "Freshman";
case 11:
classyear = "Sofmore"; etc.
Not sure if this will help but here's a project that I worked on for a class and it was assigning a string value to a variable. I used a switch statement (do you know what those are?) to determine which value was selected.
I know this is a bit long but I think it's easy enough to understand. You will have to determine what value you want to put in your if statement. Switch does not use Strings so you'll have to use an integer to determine what is selected.
import java.text.NumberFormat; // Java core packages
import java.util.Locale;
import javax.swing.JOptionPane; // Java extension packages
public class A4_512 // begin class definition
// main method begins execution
// of Java application
public static void main( String args[] )
int counter, // counter variable
itmSold, // holds usrInput for product sold as int data type
qtySold = 0; // holds usrInput for quantity sold as int data type
double itmValue = 0.00, // value of item sold
totSales = 0.00; // total value of items sold
String usrInputItm = "", // holds usrInput for product sold as int String type
usrInputQty = "", // holds usrInput for product sold as int String type
currDay = "", // String value for current day
results = ""; // holds output results
// Begin counter controlled loop
for( counter = 0; counter <= 6; counter++ )
switch ( counter ) // Begin switch statement to determine day of the week
case 0:
currDay = "Sunday";
break;
case 1:
currDay = "Monday";
break;
case 2:
currDay = "Tuesday";
break;
case 3:
currDay = "Wednesday";
break;
case 4:
currDay = "Thursday";
break;
case 5:
currDay = "Friday";
break;
case 6:
currDay = "Saturday";
break;
// prompt for input and read
// product number then convert
// data type to integer data type
usrInputItm = JOptionPane.showInputDialog(
"Please enter a product number purchased on " + currDay + "\n\n Enter 0 to enter data for next day." );
itmSold = Integer.parseInt( usrInputItm );
while( itmSold != 0 ) // Begin sentinel control while loop
// if statement to determine correct product number entered
if( ( itmSold > 5 ) || ( itmSold < 0 ) )
// display error message
JOptionPane.showMessageDialog ( null, "You must enter product number from 1 through 5.\nPlease try again.",
"Wrong Product Number Error", JOptionPane.ERROR_MESSAGE );
// prompt for input and read
// product number then convert
// data type to integer data type
usrInputItm = JOptionPane.showInputDialog(
"Please enter a product number purchased on " + currDay + "\n\n Enter 0 to enter data for next day." );
itmSold = Integer.parseInt( usrInputItm );
else
switch ( itmSold ) // begin switch statement to determine value of itmSold
case 1:
itmValue = 2.98;
break;
case 2:
itmValue = 4.50;
break;
case 3:
itmValue = 9.98;
break;
case 4:
itmValue = 4.49;
break;
case 5:
itmValue = 6.87;
break;
} // end switch statement
// prompt for input and read
// quantity sold then convert
// data type to integer data type
usrInputQty = JOptionPane.showInputDialog(
"Please enter quantity sold on " + currDay );
qtySold = Integer.parseInt( usrInputQty );
totSales += itmValue * qtySold;
// prompt for input and read
// product number then convert
// data type to integer data type
usrInputItm = JOptionPane.showInputDialog(
"Please enter a product number purchased on " + currDay + "\n\n Enter 0 to enter data for next day." );
itmSold = Integer.parseInt( usrInputItm );
} // end if statement to determine correct product number entered
} // end while statement
} // end for loop
// set currency format for output
NumberFormat moneyFormat =
NumberFormat.getCurrencyInstance( Locale.US );
// add total to results
results = "Total Sales for the week: " + moneyFormat.format( totSales );
// show output
JOptionPane.showMessageDialog ( null, results,
"Results", JOptionPane.PLAIN_MESSAGE );
System.exit( 0 ); // terminate application
} // end main method
} // end class definition -
Assigning a node value from an XML variable to a String type in Weblogic Process Integrator
Hi,
Is there any way to assign a node value from an XML variable to a String variable
in Weblogic Process Integrator...
Thanx.
Narendra.Nerendra
Are you talking about using Xpath on the XML document and assigning to a
variable, it is unclear what you are asking
Tony
"Narendra" <[email protected]> wrote in message
news:3bba1215$[email protected]..
>
Hi,
Is there any way to assign a node value from an XML variable to a Stringvariable
in Weblogic Process Integrator...
Thanx.
Narendra. -
Assigning a javascript value to a JSP variable
How do i assign a javascript value to a JSP variable?
eg
<%
String JSPvar;
%>
<script language="JavaScript1.2">
<!--
var javascriptVar="hey"
-->
</script>
<%
JSPvar = javascriptVar ???
%>You do know that the JSP runs on the server and generates HTML, including Javascript, that is executed on the client, don't you?
-
Assigning a number value to a line from file without array
How do you assign a number value to a line from a file? I want to use the assigned number so that the i can use random number to randomly select a line
Example. i have the lines A,B,C,D,E
A
B
C
D
E
i know that a is line 1 b is line 2 so on so on
(1) A
(2)B
(3)C
(4)D
(5)E
so from here i would use the random number generator so that i could randomly select one of these. I already know how to code for the number generator but how would i make it so that i can access each individual line as a number?ya that's what im using but reguarding the code i dont think it does what im looking for. yes it does provide a random line but wen i run it multiple times it gives me the same line repeatedly. also i need to be able to refer to that line in the future so in the code the String line gets replaced each time
BufferedReader bF = new BufferedReader(new FileReader("someFilePath"));
String line;
int someRandomNumber = 9;
int counter = 0;
while ((line = bF.readLine()) != null){
if (counter == someRandomNumber){
break;
counter++;
System.out.println(line); //line at #someRandomNumber in the file -
Assigning a binary value to an integer
Hi, I am trying to assign a binary value in my program to an integer. In some assembly languages you would do the following:
mov a, 00010101b
for binary and for hex:
mov a, 0E2h
In java, you can assign a hex value with:
int a=0x3F;
What should I do to assign a binary value? Is it possible?
Regards... Martin SchmiedelThe static method parseInt in the java.lang.Integer class can be used to convert a String representing a binary number into its decimal integer value. In addition to the string representing the number, you also pass in an integer representing the radix, which for binary would be 2, hex would be 16, etc. So for example:
int x = Integer.parseInt("00010110", 2);
Is that what you're trying to do? Cheers,
Chris -
Assign a number value to an mc
hi everyone,
so a while back I asked if it was possible to assign a number value to an mc. So I'm done my early work on it and am ready to try and integrate this function. I'll explain what I'm trying to do and I hope someone can point me in the right direction.
I'm making a small change game. So game is split into five scenes, each scene the person will receive a receipt. The person will have change in their hand (all canadian denominations). They have to look at the receipt and the change in their hand (both mcs), and figure out if its correct. If not they drag change from another pile and place it in the hand. So here's what I'm looking at trying to accomplish. I'd like to have a check change button (simple mc). I'm guessing that each coin needs a numeric value associated with it (no clue on if or how you could do this). If the numbers add up to the predetermined bill value (so I'm guessing I'd give that a numeric value as well), i hit the check button and it'll see if the change in the hand adds up to match what the bill should. So here's where my code sits currently, still tweaking as we speak. I'm still new so be gentle on my code I know its long. If anyone knows any house keeping tips that'd be great!
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import com.greensock.*;
import com.greensock.easing.*;
import flash.media.Sound;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.display.StageDisplayState;
// listeners
sc1.beginbutton1.addEventListener(MouseEvent.CLICK, beginbutton1buttonclick);
bill1.addEventListener(MouseEvent.CLICK, bill1click);
sc1.checkout1.addEventListener(MouseEvent.CLICK, checkout1click);
bill2.addEventListener(MouseEvent.CLICK, bill2click);
bill3.addEventListener(MouseEvent.CLICK, bill3click);
bill4.addEventListener(MouseEvent.CLICK, bill4click);
bill5.addEventListener(MouseEvent.CLICK, bill5click);
sc1.repeatbutton1.addEventListener(MouseEvent.CLICK, repeatbutton1buttonclick);
helpmenu.xbutton.addEventListener(MouseEvent.CLICK, xbuttonclick);
bill1.billx.addEventListener(MouseEvent.CLICK, bill1billxclick);
answermenu.xanswerbutton.addEventListener(MouseEvent.CLICK, xanswerbuttonclick);
backbutton.addEventListener(MouseEvent.CLICK, backclick);
helpbutton.addEventListener(MouseEvent.CLICK, helpclick);
answerbutton.addEventListener(MouseEvent.CLICK, answerclick);
penny1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny5.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny6.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny7.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
helpmenu.visible=false;
answermenu.visible=false;
bill1.visible=false;
bill2.visible=false;
bill3.visible=false;
bill4.visible=false;
bill5.visible=false;
TweenMax.to(penny, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie4, 0.1, {scaleX:0.1, scaleY:0.1});
//variable declarations
var myTween:Tween;
var me:Object;
function grabMe(e:MouseEvent):void{
me = e.currentTarget;
me.removeEventListener(MouseEvent.MOUSE_DOWN, grabMe);
me.startDrag();
e.target.parent.addChild(e.target)
var tweeny:Tween = new Tween(me, "y", Regular.easeIn, me.y, me.y-75, .04, true);
var scaley:Tween = new Tween(me, "scaleY", Regular.easeIn, me.scaleY, 0.4, 0.05, true);
var scalex:Tween = new Tween(me, "scaleX", Regular.easeIn, me.scaleX, 0.4, 0.05, true);
var my_shadow:DropShadowFilter = new DropShadowFilter();
my_shadow.color = 0x000000;
my_shadow.blurY = 3;
my_shadow.blurX = 3;
my_shadow.angle = 90;
my_shadow.alpha = .2;
my_shadow.quality = 15;
my_shadow.distance = 100;
var filtersArray:Array = new Array(my_shadow);
me.filters = filtersArray;
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragMe);
stage.addEventListener(MouseEvent.MOUSE_UP, dropMe);
function dropMe(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_UP, dropMe);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, dragMe);
me.stopDrag();
me.filters=undefined;
var tweenydown:Tween = new Tween(me, "y", Regular.easeIn, me.y, me.y+90, .4, true);
var scaley:Tween = new Tween(me, "scaleY", Regular.easeOut, me.scaleY, 0.1, 0.05, true);
var scalex:Tween = new Tween(me, "scaleX", Regular.easeOut, me.scaleX, 0.1, 0.05, true);
me.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
//lockinplace(DisplayObject(e.currentTarget))
//mainclicksound.play();
function dragMe(e:MouseEvent):void {
e.updateAfterEvent();
//nav bar items
function backclick(event:MouseEvent):void{
answermenu.visible=false;
helpmenu.visible=false;
function helpclick(event:MouseEvent):void{
helpmenu.visible=true;
answermenu.visible=false;
setChildIndex(helpmenu,numChildren - 1)
TweenMax.to(helpmenu, 3, {y:350, startAt:{y:600}, ease:Elastic.easeOut});
function xbuttonclick(event:MouseEvent):void{
helpmenu.visible=false;
function answerclick(event:MouseEvent):void{
answermenu.visible=true;
helpmenu.visible=false;
setChildIndex(answermenu,numChildren - 1)
TweenMax.to(answermenu, 3, {y:350, startAt:{y:600}, ease:Elastic.easeOut});
function xanswerbuttonclick(event:MouseEvent):void{
answermenu.visible=false;
helpmenu.visible=false;
//screen button items
function beginbutton1buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase1");
bill1.visible=true;
TweenMax.to(bill1, 0.0, {alpha:0});
TweenMax.to(bill1, 2, {delay:0.5, y:bill1.y+90});
TweenMax.to(bill1, 0.5, {delay:0.5, alpha:1});
function repeatbutton1buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase1");
function bill1click(event:MouseEvent):void{
TweenMax.to(bill1, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
function bill1billxclick(event:MouseEvent):void{
bill1.visible=false;
function checkout1click(event:MouseEvent):void{
function beginbutton2buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase2");
bill2.visible=true;
TweenMax.to(bill2, 0.0, {alpha:0});
TweenMax.to(bill2, 2, {delay:0.5, y:bill2.y+90});
TweenMax.to(bill2, 0.5, {delay:0.5, alpha:1});
function repeatbutton2buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase2");
function bill2click(event:MouseEvent):void{
TweenMax.to(bill2, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
function bill2billxclick(event:MouseEvent):void{
bill2.visible=false;
function beginbutton3buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase3");
bill3.visible=true;
TweenMax.to(bill3, 0.0, {alpha:0});
TweenMax.to(bill3, 2, {delay:0.5, y:bill3.y+90});
TweenMax.to(bill3, 0.5, {delay:0.5, alpha:1});
function repeatbutton3buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase3");
function bill3click(event:MouseEvent):void{
TweenMax.to(bill3, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
function bill3billxclick(event:MouseEvent):void{
bill3.visible=false;
function beginbutton4buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase4");
bill4.visible=true;
TweenMax.to(bill4, 0.0, {alpha:0});
TweenMax.to(bill4, 2, {delay:0.5, y:bill4.y+90});
TweenMax.to(bill4, 0.5, {delay:0.5, alpha:1});
function repeatbutton4buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase4");
function bill4click(event:MouseEvent):void{
TweenMax.to(bill4, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
function bill4billxclick(event:MouseEvent):void{
bill4.visible=false;
function beginbutton5buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase5");
bill5.visible=true;
TweenMax.to(bill5, 0.0, {alpha:0});
TweenMax.to(bill5, 2, {delay:0.5, y:bill5.y+90});
TweenMax.to(bill5, 0.5, {delay:0.5, alpha:1});
function repeatbutton5buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase5");
function bill5click(event:MouseEvent):void{
TweenMax.to(bill5, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
function bill5billxclick(event:MouseEvent):void{
bill5.visible=false;
//function beginbutton2buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase2");
//function repeatbutton2buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase2");
//function beginbutton3buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase3");
//function repeatbutton3buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase3");
//function beginbutton4buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase4");
//function repeatbutton4buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase4");
//function beginbutton5buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase5");
//function repeatbutton5buttonclick(event:MouseEvent):void{
//sc1.gotoAndStop("phase5");ok so i got the trace working when I drop a coin on the hand mc. How would you make it so that when you hit the checkout button, you can see if the myValue items add up to a specific amount? Here's my revised code!
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import com.greensock.*;
import com.greensock.easing.*;
import flash.media.Sound;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.display.StageDisplayState;
// listeners
helpmenu.xbutton.addEventListener(MouseEvent.CLICK, xbuttonclick);
answermenu.xanswerbutton.addEventListener(MouseEvent.CLICK, xanswerbuttonclick);
backbutton.addEventListener(MouseEvent.CLICK, backclick);
helpbutton.addEventListener(MouseEvent.CLICK, helpclick);
answerbutton.addEventListener(MouseEvent.CLICK, answerclick);
sc1.beginbutton1.addEventListener(MouseEvent.CLICK, beginbutton1buttonclick);
bill1.addEventListener(MouseEvent.CLICK, bill1click);
sc1.checkout1.addEventListener(MouseEvent.CLICK, checkout1click);
sc1.checkout2.addEventListener(MouseEvent.CLICK, checkout2click);
sc1.checkout3.addEventListener(MouseEvent.CLICK, checkout3click);
sc1.checkout4.addEventListener(MouseEvent.CLICK, checkout4click);
sc1.checkout5.addEventListener(MouseEvent.CLICK, checkout5click);
bill2.addEventListener(MouseEvent.CLICK, bill2click);
bill3.addEventListener(MouseEvent.CLICK, bill3click);
bill4.addEventListener(MouseEvent.CLICK, bill4click);
bill5.addEventListener(MouseEvent.CLICK, bill5click);
bill1.billx1.addEventListener(MouseEvent.CLICK, bill1billx1click);
bill2.billx2.addEventListener(MouseEvent.CLICK, bill2billx2click);
bill3.billx3.addEventListener(MouseEvent.CLICK, bill3billx3click);
bill4.billx4.addEventListener(MouseEvent.CLICK, bill4billx4click);
bill5.billx5.addEventListener(MouseEvent.CLICK, bill5billx5click);
five.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
five1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
five2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny5.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny6.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
penny7.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
dime4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel1.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
nickel4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
quarter4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
loonie4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie2.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie3.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
toonie4.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
bill1.visible=false;
sc1.checkout1.visible=false;
sc1.checkout2.visible=false;
sc1.checkout3.visible=false;
sc1.checkout4.visible=false;
sc1.checkout5.visible=false;
bill2.visible=false;
bill3.visible=false;
bill4.visible=false;
bill5.visible=false;
BS.visible=false;
hand.visible=false;
hitbox.mouseEnabled = false;
helpmenu.visible=false;
answermenu.visible=false;
TweenMax.to(five, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(five1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(five2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(dime4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel1, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie4, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie4, 0.1, {scaleX:0.1, scaleY:0.1});
///assigned values
var myValue;
penny1.myValue = .01;
penny2.myValue = .01;
penny3.myValue = .01;
penny4.myValue = .01;
penny5.myValue = .01;
penny6.myValue = .01;
penny7.myValue = .01;
penny.myValue = .01;
dime1.myValue = .10;
dime2.myValue = .10;
dime3.myValue = .10;
dime4.myValue = .10;
dime.myValue = .10;
nickel1.myValue = .05;
nickel2.myValue = .05;
nickel3.myValue = .05;
nickel4.myValue = .05;
nickel.myValue = .05;
quarter2.myValue = .25;
quarter3.myValue = .25;
quarter4.myValue = .25;
quarter.myValue = .25;
toonie2.myValue = 2.0;
toonie3.myValue = 2.0;
toonie4.myValue = 2.0;
toonie.myValue = 2.0;
loonie2.myValue = 1.0;
loonie3.myValue = 1.0;
loonie4.myValue = 1.0;
loonie.myValue = 1.0;
//variable declarations
var pickupsound:pickup=new pickup
var coinonhandsound:coinonhand=new coinonhand
var coinpickupsound:coinpickup=new coinpickup
var coindropsound:coindrop=new coindrop
var droppapersound:droppaper=new droppaper
//var clickssound:clicks=new clicks
var myTween:Tween;
var me:Object;
function grabMe(e:MouseEvent):void{
me = e.currentTarget;
me.removeEventListener(MouseEvent.MOUSE_DOWN, grabMe);
me.startDrag();
e.target.parent.addChild(e.target)
coinpickupsound.play();
var tweeny:Tween = new Tween(me, "y", Regular.easeIn, me.y, me.y-75, .04, true);
var scaley:Tween = new Tween(me, "scaleY", Regular.easeIn, me.scaleY, 0.4, 0.05, true);
var scalex:Tween = new Tween(me, "scaleX", Regular.easeIn, me.scaleX, 0.4, 0.05, true);
var my_shadow:DropShadowFilter = new DropShadowFilter();
my_shadow.color = 0x000000;
my_shadow.blurY = 3;
my_shadow.blurX = 3;
my_shadow.angle = 90;
my_shadow.alpha = .2;
my_shadow.quality = 15;
my_shadow.distance = 100;
var filtersArray:Array = new Array(my_shadow);
me.filters = filtersArray;
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragMe);
stage.addEventListener(MouseEvent.MOUSE_UP, dropMe);
function dropMe(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_UP, dropMe);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, dragMe);
me.stopDrag();
me.filters=undefined;
var scaley:Tween = new Tween(me, "scaleY", Regular.easeOut, me.scaleY, 0.1, 0.05, true);
var scalex:Tween = new Tween(me, "scaleX", Regular.easeOut, me.scaleX, 0.1, 0.05, true);
me.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
lockinplace(DisplayObject(e.currentTarget))
function dragMe(e:MouseEvent):void {
e.updateAfterEvent();
function lockinplace(e:DisplayObject):void{
//hand
if(hand.hitTestPoint(mouseX, mouseY, true)){
coinonhandsoundplay();
trace(me.myValue)
TweenMax.to(me,0.5,{x:mouseX,y:700, scaleX:0.2,scaleY:0.2,ease:Bounce.easeOut});
//table
//}else if(hitbox.hitTestPoint(mouseX, mouseY, true)){
//TweenMax.to(me,0.2,{x:700, y:700, scaleX:0.3,scaleY:0.3,ease:Bounce.easeInOut});;
//coinonhandsoundplay();
} else {
coindropsoundplay();
TweenMax.to(me,0.5,{x:mouseX, y:700, scaleX:0.1,scaleY:0.1,ease:Bounce.easeOut});;
//screen button items
function beginbutton1buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase1");
hand.visible=true;
bill1.visible=true;
sc1.checkout1.visible=true;
sc1.checkout2.visible=false;
sc1.checkout3.visible=false;
sc1.checkout4.visible=false;
sc1.checkout5.visible=false;
TweenMax.to(toonie2, 0.1, {x:655, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {x:625, y: 639, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:635, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:655, y: 635, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(bill1, 0.0, {alpha:0});
TweenMax.to(bill1, 2, {delay:0.5, y:bill1.y+90});
TweenMax.to(bill1, 0.5, {delay:0.5, alpha:1});
function bill1click(event:MouseEvent):void{
TweenMax.to(bill1, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
pickupsound.play();
function bill1billx1click(event:MouseEvent):void{
bill1.visible=false;
droppapersound.play();
function checkout1click(event:MouseEvent):void{
sc1.gotoAndStop("phase2begin");
sc1.beginbutton2.addEventListener(MouseEvent.CLICK, beginbutton2buttonclick);
TweenMax.to(penny7, 0.0, {x:497.15, y:586.10, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie2, 0.0, {x:423.15, y: 622.50, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.0, {x:506.70, y: 622.25, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.0, {x:460, y: 587.20, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.0, {x:418.35, y: 589.90, scaleX:0.1, scaleY:0.1});
bill1.visible=false;
hand.visible=false;
sc1.checkout1.visible=false;
function beginbutton2buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase2");
hand.visible=true;
bill2.visible=true;
sc1.checkout2.visible=true;
sc1.checkout1.visible=false;
sc1.checkout3.visible=false;
sc1.checkout4.visible=false;
sc1.checkout5.visible=false;
TweenMax.to(loonie4, 0.1, {x:655, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {x:625, y: 639, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {x:635, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {x:655, y: 635, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter4, 0.1, {x:655, y: 635, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(bill2, 0.0, {alpha:0});
TweenMax.to(bill2, 2, {delay:0.5, y:bill2.y+90});
TweenMax.to(bill2, 0.5, {delay:0.5, alpha:1});
function bill2click(event:MouseEvent):void{
TweenMax.to(bill2, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
pickupsound.play();
function bill2billx2click(event:MouseEvent):void{
bill2.visible=false;
droppapersound.play();
function checkout2click(event:MouseEvent):void{
sc1.gotoAndStop("phase3begin");
sc1.beginbutton3.addEventListener(MouseEvent.CLICK, beginbutton3buttonclick);
TweenMax.to(loonie4, 0.1, {x:462.15, y: 623.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {x:459.15, y: 627.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {x:463.15, y: 631.75, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {x:506.70, y: 622.25, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter4, 0.1, {x:504.70, y: 625.30, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:497.15, y: 586.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:500.15, y: 586.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:498.15, y: 588.60, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:500.15, y: 589.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {x:498.15, y: 591.65, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {x:499.15, y: 593.15, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:418.35, y: 589.90, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {x:416.35, y: 591.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:460, y: 587.20, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:457.15, y: 589.75, scaleX:0.1, scaleY:0.1});
bill2.visible=false;
hand.visible=false;
sc1.checkout2.visible=false;
function beginbutton3buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase3");
hand.visible=true;
bill3.visible=true;
sc1.checkout3.visible=true;
sc1.checkout2.visible=false;
sc1.checkout1.visible=false;
sc1.checkout4.visible=false;
sc1.checkout5.visible=false;
TweenMax.to(quarter3, 0.1, {x:655, y: 635, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny1, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel4, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel1, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(bill3, 0.0, {alpha:0});
TweenMax.to(bill3, 2, {delay:0.5, y:bill3.y+90});
TweenMax.to(bill3, 0.5, {delay:0.5, alpha:1});
function bill3click(event:MouseEvent):void{
TweenMax.to(bill3, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
pickupsound.play();
function bill3billx3click(event:MouseEvent):void{
bill3.visible=false;
droppapersound.play();
function checkout3click(event:MouseEvent):void{
sc1.gotoAndStop("phase4begin");
sc1.beginbutton4.addEventListener(MouseEvent.CLICK, beginbutton4buttonclick);
TweenMax.to(quarter3, 0.1, {x:506.70, y: 622.25, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:497.15, y: 586.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:500.15, y: 586.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:498.15, y: 588.60, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:500.15, y: 589.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny3, 0.1, {x:498.15, y: 591.65, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny2, 0.1, {x:499.15, y: 593.15, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny1, 0.1, {x:497.70, y: 594.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:418.35, y: 589.90, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime1, 0.1, {x:416.35, y: 591.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime2, 0.1, {x:417.15, y: 593.25, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:460, y: 587.20, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:457.15, y: 589.75, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel4, 0.1, {x:459.15, y: 592.05, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel1, 0.1, {x:458.15, y: 595.20, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel, 0.1, {x:459.15, y: 597.20, scaleX:0.1, scaleY:0.1});
bill3.visible=false;
hand.visible=false;
sc1.checkout3.visible=false;
function beginbutton4buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase4");
hand.visible=true;
bill4.visible=true;
sc1.checkout4.visible=true;
sc1.checkout2.visible=false;
sc1.checkout3.visible=false;
sc1.checkout1.visible=false;
sc1.checkout5.visible=false;
TweenMax.to(five2, 0.1, {x:655, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:654, y: 644, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:645, y: 650, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:662, y: 642, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(bill4, 0.0, {alpha:0});
TweenMax.to(bill4, 2, {delay:0.5, y:bill4.y+90});
TweenMax.to(bill4, 0.5, {delay:0.5, alpha:1});
function bill4click(event:MouseEvent):void{
TweenMax.to(bill4, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
pickupsound.play();
function bill4billx4click(event:MouseEvent):void{
bill4.visible=false;
droppapersound.play();
function checkout4click(event:MouseEvent):void{
sc1.gotoAndStop("phase5begin");
sc1.beginbutton5.addEventListener(MouseEvent.CLICK, beginbutton5buttonclick);
TweenMax.to(five2, 0.1, {x:460.15, y: 553.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:497.15, y: 586.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:500.15, y: 586.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:418.35, y: 589.90, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:460, y: 587.20, scaleX:0.1, scaleY:0.1});
bill4.visible=false;
hand.visible=false;
sc1.checkout4.visible=false;
function beginbutton5buttonclick(event:MouseEvent):void{
sc1.gotoAndStop("phase5");
hand.visible=true;
bill5.visible=true;
sc1.checkout5.visible=true;
sc1.checkout2.visible=false;
sc1.checkout3.visible=false;
sc1.checkout4.visible=false;
sc1.checkout1.visible=false;
TweenMax.to(five2, 0.1, {x:655, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie2, 0.1, {x:655, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie3, 0.1, {x:622, y: 639, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie4, 0.1, {x:625, y: 639, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie4, 0.1, {x:658, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {x:625, y: 639, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {x:635, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {x:655, y: 635, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(bill5, 0.0, {alpha:0});
TweenMax.to(bill5, 2, {delay:0.5, y:bill5.y+90});
TweenMax.to(bill5, 0.5, {delay:0.5, alpha:1});
function bill5click(event:MouseEvent):void{
TweenMax.to(bill5, 0.5, {x: 780, y:25, scaleX: 0.6, scaleY: 0.6});
pickupsound.play();
function bill5billx5click(event:MouseEvent):void{
bill5.visible=false;
droppapersound.play();
function checkout5click(event:MouseEvent):void{
BS.visible=true;
hand.visible=false;
bill5.visible=false;
sc1.checkout5.visible=false;
TweenMax.to(five2, 0.1, {x:460.15, y: 553.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie2, 0.1, {x:423.15, y: 622.50, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie3, 0.1, {x:415.70, y: 622.70, scaleX:0.1, scaleY:0.1});
TweenMax.to(toonie4, 0.1, {x:420.15, y: 627.70, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie4, 0.1, {x:462.15, y: 623.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie2, 0.1, {x:459.15, y: 627.40, scaleX:0.1, scaleY:0.1});
TweenMax.to(loonie3, 0.1, {x:463.15, y: 631.75, scaleX:0.1, scaleY:0.1});
TweenMax.to(quarter3, 0.1, {x:506.70, y: 622.25, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny7, 0.1, {x:497.15, y: 586.10, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny6, 0.1, {x:500.15, y: 586.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny5, 0.1, {x:498.15, y: 588.60, scaleX:0.1, scaleY:0.1});
TweenMax.to(penny4, 0.1, {x:500.15, y: 589.95, scaleX:0.1, scaleY:0.1});
TweenMax.to(dime3, 0.1, {x:660, y: 640, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel2, 0.1, {x:460, y: 587.20, scaleX:0.1, scaleY:0.1});
TweenMax.to(nickel3, 0.1, {x:457.15, y: 589.75, scaleX:0.1, scaleY:0.1});
//sound items
//function bellsoundplay():void{
//bellsound.play();
//sound items
function pickupsoundplay():void{
pickupsound.play();
//sound items
function coinpickupsoundplay():void{
coinpickupsound.play();
//sound items
function coindropsoundplay():void{
coindropsound.play();
function coinonhandsoundplay():void{
coinonhandsound.play();
function droppapersoundplay():void{
droppapersound.play();
//nav bar items
function backclick(event:MouseEvent):void{
answermenu.visible=false;
helpmenu.visible=false;
function helpclick(event:MouseEvent):void{
helpmenu.visible=true;
answermenu.visible=false;
setChildIndex(helpmenu,numChildren - 1)
TweenMax.to(helpmenu, 3, {y:350, startAt:{y:600}, ease:Elastic.easeOut});
function xbuttonclick(event:MouseEvent):void{
helpmenu.visible=false;
function answerclick(event:MouseEvent):void{
answermenu.visible=true;
helpmenu.visible=false;
setChildIndex(answermenu,numChildren - 1)
TweenMax.to(answermenu, 3, {y:350, startAt:{y:600}, ease:Elastic.easeOut});
function xanswerbuttonclick(event:MouseEvent):void{
answermenu.visible=false;
helpmenu.visible=false; -
Assignment % String sx = % search goes wrong
Hello,
I have the following JavaScript function in my JSP:
On Button click
( <INPUT type="button" name="Search" value="Search for Service" onclick="searchService(document.myform.Keyword.value);"></TD> )
the function searchService is called:
<SCRIPT language="JavaScript">
function searchService(s) {
var search = s;
<% String sx = %> search;
var output = "<%= agent.searchForService(sx).elementAt(0)%>";
</SCRIPT>
How can I assign <% String sx = %> search; ?
The error message I get is: incompatible type for declaration. Can't convert void to java.lang.String.
String sx = ^ 1 error
Can anybody help me out please?
Thanks
SimoneThink of the transaction of processing a JSP page as server-side, client-side and a long pipe in between (the http connection).
First the server-side stuff is executed on the server, then the result is sent down the pipe and then the client-side stuff is executed on the client.
If you want client-side stuff to change the server-side execution, you will need to do a round trip back to the server - i.e. post the data to another (or the same) JSP in order to continue processing.
Sometimes it helps to think of this process as above in order to clarify the timing of when things happen.
Hope that helped. -
Assigning a default value to a field
Hello Everyone,
Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.Like this
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE c VALUE 'X'
field2 TYPE c,
END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM -
How to send timer job email to "assigned to" feild value in a task list?
Hi All,
How to send timer job email to "assigned to" field value in a task list if due date is after two days from now?Create a SharePoint Designer Workflow and use "pause until date" option when an new item is created/update.
Using Server Object model, I believe you can create the timer job from item event receiver.
--Cheers -
How to Assign a Constant Value to a Dim. Member when pulling Master Data?
BPC Gurus:
I am trying load Vendor and Customer Master data into BPC dimension. My Dimesnion has memebrs: ID, EVDESCRIPTION, PARENTH1, TYPE. I have successfully pulled the ID and the description from 0CUSTOMER and 0VENDOR. However, I
need to have a ttext value for 'PARENTH1' and 'TYPE'. For Customers, I want to add a FIXED value "'CUSTOMER' for every
Customer ID pulled in and also for "TYPE", I want a value of "CUSTOMER". When I maintainthe Dimension, I want to see
th followingvalues:
ID EVDESCRIPTION PARENTH1 TYPE
0000000001 WALMART CUSTOMER CUSTOMER
0000000002 TARGET CUSTOMER CUSTOMER
and so ON
Since we have Vendor Numbers in the same Diemsnion, when I pull Vendors, I need to have similar values as:
ID EVDESCRIPTION PARENTH1 TYPE
0000005050 ABC Supply Inc. VENDOR VENDOR
0000005051 BASF VENDOR VEDOR
and so ON
How can assign a Fixed value to the member Propert? Can I achieve it in Conversion file....?
( My atempts failed...).
Any suggestion recommendation would be gretaly appreciated.
Munna.Hi,
For adding fixed values to the properties, you can use the transformation file. In the mapping section, you can specify a constant value. This value will be written to properties of all the members while importing master data. However, for parenth, its a bit different. First thing is that, you need to have a member called CUSTOMER, then only you can have CUSTOMER in the parenth column. Even if you add it and use the mapping section for this purpose, then it will write CUSTOMER to parenth for all the members (even to CUSTOMER member). And this will be wrong. So, you will need to write it manually.
Hope you got the idea. -
How to assign a default value to a column ?
Hi
In the Object browser is it possible to modifiy a column in order to assign a defalut value to the column ?
I have a table FICHE in which I want to assign a default value 0 to a column which type is NUMBER.
Thank you for your kind answers.
Christian.Hi Christian
For one reason or the other you can't do that using 'Create Column' or 'Modify Column'. You can only do that by issuing a SQL command : alter table fiche modify column( <column name> default 0)
HTH
Roel -
How to assign a default value when there is no prompted value
Dear all,
I create a filter and it's value is relate to a prompt.If the prompt is not fill I found that all record is selected.
How did I assign a default value so that when I didn't fill some value in to the prompt and still can get the result by
the default value I set?
Thanks a lot!Are you using dates for between or some character column?
Post your example.
Instead of between use to is equal prompts, so u will have then 2 fields one for date from a nd one for date to. Everything is the same as I wrote just repeat steps...
You must put 2 separate fields if you are using date between and you want to have default variable for both.
Column formula for the first calendar date prompt:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end
and for the second:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.2900' as date) end
Now you set up default repository variable for both prompts.
Presentation variable you put in the set presentation variable on each prompt:
p_date_from
p_date_to
And in Answers filter will be like this:
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char")} and @{p_date_to}{VALUEOF("rv_test_date_to_char")}*
or you can put a different default variables
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char_from")} and @{p_date_to}{VALUEOF("rv_test_date_to_char_to")}*
I posted similar in my blog:
Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE
http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html
Regards,
Goran O
http://108obiee.blogspot.com
Edited by: Goran O on 2009.04.23 03:37 -
How to assign the default value to search parameter
Hi Experts,
I am using search view , In this I have 5 parameter lets say Transaction Type, Partner No. etc... Now I want to assign a default value to transaction type ( lets say TA) . User should be able to see this default value in the transaction type field before pressing search button.
How can I do it?
My second problem is: I have configured this search view using configuration tool but I want to assign only one value to transaction type (i.e. user should not be able to add new row in the search criteria for the transaction type by using + sign) but in rest 4 fields he can add new row and search based on that.
Note: I am using only "Is" criteria .
Any pointer will be helpful for me
Thanks and regards,
SandeepHi Sandeep,
For the default search values, here is a solution. You have to redefine the method GET_VALUE1 of the context node
For example if it is the BP search (component BP_HEAD_SEARCH) context node is your enhanced class: ZL_BP_HEAD__MAINSEARCH_CN00
METHOD get_value1.
CALL METHOD super->get_value1
EXPORTING
attribute_path = attribute_path
iterator = iterator
RECEIVING
value = value.
TRY.
* Delegate operation to selection parameter
DATA: current TYPE REF TO if_bol_bo_property_access.
IF iterator IS BOUND.
current = iterator->get_current( ).
ELSE.
current = me->parameter_collection->get_current( ).
ENDIF.
IF current->get_property_as_string( iv_attr_name = 'ATTR_NAME' ) EQ 'XXX'.
IF value IS INITIAL.
value = 'Your default value'.
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDMETHOD.
where XXX is the name of the field.
Default value will then appear in your search field, but you are still able to modify it if you want...
Regards,
Fabian -
Assigning LOV return Value to multiple text items
Hi all
I have a custom form on which i have 10 text items
text item 1,text item 2 ....text item10
I have a table xx_querywith fields
text_item,query
i have inserted into the xx_query table
insert into xx_query(text_item,query)
values(text_item1,'select sysdate from dual');
insert into xx_query(text_item,query)
values(text_item2,'select sysdate-1 from dual');
I have created a record group dynamically and i am getting the query from the query column of the xx_query table into the record group(say test_rg)
I have created a LOV test_lov and thr set_lov_property i have populated the test_rg query into the test_LOV
is it possible for me to set the return item of the LOV dynamically so that i can get the LOV on the item which i want to ?
thanks
_Hi All
thanks for your responses
I have Created a control item and assigned the return value of the LOV to the control item
and i have assigned the LOV to the text item that i want
Currently when i navigate to the text item the LOV is visible
but when i select a value from the LOV the value is not getting populated into the text item
I have assigned the value of the control item to the text item
but i am not sure in which trigger to write the code so as when i select the value from the LOV the value should be shown on the form populating in the text item
Thanks
Maybe you are looking for
-
Creating the New Update groups in case of the Credit Management
Hi Can any one help out in the following requirement: Is it possible to Create a new update group in case of the Credit Management?SAP standard provides only three update groups viz., 000012, 000015 and 000018. We would like to have a customized gr
-
Time / Date format in series section of a graph
Hello, I am trying to use some data imported from excel in a graph, but when I set the series of the graph to a field that contains time data (hh:mm), it does not convert it properly. Is there a way to represent this time data on the y axis of the gr
-
Using currency conversion and text variable at the same time
Hi all, In a 3.5 bex query, i am applying currency conversion on a key figure with a variable of 0currency. as i know, to be able to apply currency conversion, variable of currency should not be in Free characteristics or in Filter. it has to be sele
-
I would like to know if you can open old Appleworks spreadsheet documents with Numbers, and save the Appleworks documents in numbers format? Afterall, Iwork is supposed to be the replacement for Appleworks documents. Thanks, Greg
-
Can we configure Format Mapping in ELM!!!!
Hi CRM Experts, 1)Can any one tell me, can we configure format mapping In ELM? 2)What are Coupan code and Campaign Element ID in Lead whle uploading the file through ELM? Thanks in Advance Sree