Need help on variables in webapplication

Hello Community,
I have a problem within a query.
0) I am using only 1 keyfigure Z_WEIGHT
1) I am using 2 variables on 0CALYEAR which are filled with a date range of start year and end year.
e.g. 2005 - 2008
2) The period for 2005 starts from: 12/2004 - 12/2005
How can I solve this scenario?
Any help is highly appreciated.
Andreas

Hi thanks for your reply.
But I dont want a variable screen - i want a pull down menu for selecting in the query.
Any ideas about that?
Thanks,
Andreas

Similar Messages

  • Need Help in Variable calculation

    Hi,
    I am using BO XI 3.0 with Oracle as reporting database.
    I need help or suggestion in one of my cross-tab webi report. I designed the report as below.
    Date1----
    Date2
    Dim1---Dim2-Dim3-Meas1(Sum)-Meas2(Sum) |Meas3(Sum)-Meas4-Meas3---Meas4 
    111 -
    ABC---xyz   - 14 - 12 -13 - 1121--
    12
    222 -
    LMP---asd   - 22 -  32 -  01 0511--
    56
    In above crosstab report dates are one of the dimension with other dimensions.
    Now In my scenarion for date1 and date2 i have same dim1, dim2 and dim 3 so it showing me dingle row instead of 2 rows due to that Meas1 and Meas2 are sum up and as 14 and 12 but i need to display Meas1 as (Meas1 where Date=date2) and Meas2 as (Meas2 where date=date2) so instead of summing of 2 rows it should display only data for that date.
    If i move meas1 and 2 along with meas3 and 4 it fine but if remove from their and place on left side or dimension it sum up.
    If anyone has any idea please help me on this.
    Thanks for the help.
    Thanks,
    Nimesh.
    Edited by: Nimesh Panchal on Apr 13, 2009 11:39 PM

    Hi,
    Please make changes like below
    if(empRow.getLinenum().toString()!=null)
    String updateStmt = "BEGIN TEST_PKG.MAIN_PROCEDURE( " +":1)" + "; END;";
    CallableStatement cstmt = getDBTransaction().createCallableStatement(updateStmt,1);
    cstmt.setString(1,empRow.getLinenum().toString());
    Also, refer link Dilip'S Oracle Application Framework Blogs: Prepared Statement - Controller
    Thanks,
    Dilip

  • Need help passing variables to another jsp page

    I am working in a shopping cart with multiple lines and I am wanting to pass 2 variables to another page which is accessed from a link.
    What I have so far is the following:
    This is on the shopping cart JSP page with the link
    <input type="hidden" name="shopCartReqDate1<%=i%>" id="shopCartReqDate1<%=i%>" value="<%= retVals[9] %>">
    <input type="hidden" name="shopCartExpDate1<%=i%>" id="shopCartExpDate1<%=i%>" value="<%= retVals[10] %>">
    Need it Earlier?
    I am wanting to pass it to the HAC_Help_Text_Need_it_Earlier.jsp page
    Right now on the HAC_Help_Text_Need_it_Earlier.jsp page I have the following code:
    String shopCartReqDate1 = IBEUtil.nonNull(request.getParameter("shopCartReqDate1"));
    String shopCartExpDate1 = IBEUtil.nonNull(request.getParameter("shopCartExpDate1"));
    Do I need to create a function and do a document.getElementById?
    Thanks for the help!

    As far as I understand your question You don't have to use document.getElementById. Just submit the form and then on the next page You'll just pull the variables out from the request object.

  • I am an ASP programmer and need help passing variable in JSP

    When I pass a value using a variable string that grabs the user name of a current windows session it adds spaces after each character. it should pass jdt3 and it passes j d t 3. It is grabbing the correct info. It writes the value to a web page correctly though. I really appreciate the assistance.
    <%@ page import="sun.misc.BASE64Encoder" %>
    <p><h1>Network Windows USERNAME without any login (ie)</h1></p>
    <%
    String auth = request.getHeader("Authorization");
    if (auth == null) {
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM");
    return;
    if (auth.startsWith("NTLM ")) {
    byte[] msg =
    new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
    int off = 0, length, offset;
    String s;
    if (msg[8] == 1) {
    off = 18;
    byte z = 0;
    byte[] msg1 =
    {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
    (byte)'S', (byte)'P', z,
    (byte)2, z, z, z, z, z, z, z,
    (byte)40, z, z, z, (byte)1, (byte)130, z, z,
    z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
    z, z, z, z, z, z, z, z};
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM "
    + new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
    return;
    else if (msg[8] == 3) {
    off = 30;
    length = msg[off+17]*256 + msg[off+16];
    offset = msg[off+19]*256 + msg[off+18];
    s = new String(msg, offset, length);
    //out.println(s + " ");
    else
    return;
    length = msg[off]*5 + msg[off];
    offset = msg[off+3]*5 + msg[off+2];
    s = new String(msg, offset, length);
    //out.println(s);
    length = msg[off+9]*5 + msg[off+8];
    offset = msg[off+11]*5 + msg[off+10];
    s = new String(msg, offset, length);
    out.println(s + "</SPAN>");
    String redirectURL = "http:www.intranet.com?UName="+s;
    response.sendRedirect(redirectURL);
    %>
    </BODY>

    Open AirPort Utility on the PC, select the Airport Extreme and click Manual Setup
    Click the Advanced icon
    Click the Port Mapping tab
    Click the + (plus) button at the bottom of the connection list to set things up
    Reference pages 49-51 in the Apple AirPort Networks guide for more info
    IF.....you do not see a Port Mapping tab when you click the Advanced icon, then that would mean that the AirPort Extreme is in Bridge Mode and the main routing functions for the network are being provided by another device.
    You will need to set up the port mapping on that device, which is likely your modem/router or gateway.

  • Need help generating variable name for timeout object

    Below is a function I am using to scale an object down and
    then hide it. It works fine on just one object, but if I try to run
    it on multiple objects at the same time, only the last object gets
    scaled down. I believe this is because the timeout list only ever
    has a single item in it, “ShrinkTimeOut”.
    Does each entity in the timeout list need a distinct name?
    And if so, how would I dynamically generate a name and save it so I
    can kill the timeout object once the object has scaled down fully?

    > Does it look like I am getting rid of the timeout object
    properly in my code?
    Now that you mention it, and I have a look, no - it doesn't:
    //not sure of the order of parameters here:
    function fShrinkLoop(mModel, aTimeout) {
    //Creates a variable that contains the vector value of the
    model's
    scale (vector( 1.0000, 1.0000, 1.0000 )).
    nScaleVector = mModel.getPropRef("transform").scale;
    //Checks to see if the model is 1% or less than its original
    size.
    if (nScaleVector[1]<=0.01) {
    //Makes the model invisible.
    mModel.visibility = symbol("none");
    //Kills the timeout object.
    aTimeout.forget();
    } else {
    //If it is not, we scale the model down further and allow
    the loop to
    repeat.
    mModel.scale(0.9);

  • Stuck... Pease need help passing variable

    Hi all....
    I have an event listener added and it calls a function.
    Adding the event listener passes the event to the function
    automatically but what if i want to pass additional information to
    it?
    So this:
    addEventListener(Event.ENTER_FRAME, doEveryFrame);
    Becomes this
    addEventListener(Event.ENTER_FRAME,
    doEveryFrame(extra_var_passed));
    function doEveryFrame(event:Event,
    extra_var_passed:Number):void {
    //code here
    It seems because I am trying to pass a new variable it no
    longer passes the event for me auto-magically.... how I go about
    passing that event myself?
    Is it possible to even pass another variable like
    this??

    This is AS3, correct?
    You need to create your own event object that has the
    properties you need to pass.
    Take a look at the tutorial on custom events here:
    http://www.8bitrocket.com/newsdisplay.aspx?newspage=5776

  • [Help]Need help with variables php,Sql

    I have a table users contain fiedls "old,new & total"
    when submit , update users SET total = $total
    where $total = $old+$new
    I did this , I used echo to make sure it is ok , but it is not :
    /* Variable to Count Total  */
    $old=$row_rs_users['old'];
    $new=$row_rs_users['new'];
    $total=$old+ $new;
    echo $total;
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "doit_form")) {
      $updateSQL = sprintf("UPDATE users SET total=%s WHERE id=%s",
                           $total,
                           GetSQLValueString($_POST['id'], "int"));
    Thanks,

    Seeing only part of your code, it's impossible to debug.
    However, your approach is wrong anyway. All you need to do is to add the new value to the old one in the SQL query.
    $updateSQL = sprintf("UPDATE users SET total=(total+%s) WHERE id=%s",
                           GetSQLValueString($_POST['fieldName'], "double"),
                           GetSQLValueString($_POST['id'], "int"));
    $_POST['fieldName'] is the new value being added. Use "double" if the value contains a decimal point. If it's an integer, change "double" to "int".

  • I need help with Variable Manipulation

    I've been searching on google for over an hour and a half to find Variable manipulation. It seems either you know how to do it or you don't. I'm trying to do 3 things:
    I want a text box in which I enter text and it manipulates a variable so that when I press enter, the variable becomes that text.
    I want to be able to at the click of a button either assign a variable or add to that variable, whether it be incrementing or adding larger numbers.
    Finally, I want to be able to reveal those variable either at the click of a button or when the frame of the scene I'm making starts.
    Could someone please explain to me either how to do it or where to look so I can teach myself?

    Ok...after creating what you are looking for I think your confusion may be in global variables initialization with Director vs other languages.   Within Director it is necessary to reintialize the global variable within each script you need to access it in.
    So what I have done is create a two slide movie...for lack of better names slide 1 and slide 2.
    Step 1:  create the PrepareMovie Script - this script preloads the field (text box) with  "type your name".  In this case I just assigned "type your name" to the playerName global varialble.
    On prepareMovie
      global playerName
      playerName="type your name"
      member("fName").text=playerName
    end
    Step 2:
    Place cast members into slide 1
    your name - text cast member
    fname - field cast member
    continue - sprite button
    Step 3:
    Place cast members into slide 2
    verify - text cast member
    recall - sprite button
    reveal - text cast member
    Result should look something like this in the score:
    Step 4:  Scripts
    Script 6 is nothing more than a "go to the frame" script to keep the play head in place.
    on exitFrame me
      go to the frame
    end
    Script 7 just under the Slider 2 Marker
    on prepareframe me
      global playerName
      member("verify").text="Just to be certain your name is " & playerName
    end
    The Continue Button Script - attach this to the button as button script
    on mouseUp
      global playerName
      ---stuff within the field box
      playerName=member("fname").text
      go to next
    end
    The Reveal Button Script
    on mouseUp me
      global playerName
      member("revealname").text=playerName
    end
    Thats it really....if its your first time using global variables inside director it can be a bit confusing if you are used to other programming languages.
    Good luck

  • Need help sending variables from HTML to SWF...

    I have a header with tab buttons--- When you are on a certain
    page the coorisponding tab is a different color(as a locator).
    Right now I have like, 7 or 8 different headers that are the
    same thing minus the colored tab of the current page.
    Is there a way to code the flash so that I only need one
    header, but still keep the off-colored buttons when on the
    coorisponding page?
    Apparently, from what I have gathered I need to Send a
    variable to the SWF from the embedding HTML using FlashVars or
    SWFObjects' 'addVariable' method etc so the SWF knows which
    tab/color to use.
    But, I have no ideal where to start...uugggggg.
    Any Suggestions????
    I really, really need to figure this out.
    Thanks in advance,
    hutch

    the easiest way to pass vars to the flash is by appending
    them to the url of the flash:
    e.g your swiff is called "mymovie.swf" and you want a
    parameter "color" to be available on the _root level of your movie,
    so all you have to do is embed the flash with the following url
    into your html page:
    "mymovie.swf?color=black"
    now back in flash you can get the value of "color" like this:
    in _root timeline:
    color
    in any other timeline:
    _root.color
    the value will be filled once the movie is called from within
    the HTML as explained above

  • I need help with variables (probably an easy fix).

    These two programs are supposed to run together. Class "TheCracker" is supposed to guess the password of Class "ThePassword" until it gets it right.
    public class TheCracker {
    public static void main(String args[]) {
    ThePassword password = new ThePassword();
    int passwordentered;
    int realpassword;
    realpassword = password.realpassword;
    do {
    for (passwordentered = 0; passwordentered!=realpassword;passworden... {
    System.out.print(passwordentered);
    while (passwordentered != realpassword);
    public class ThePassword {
    public static void main(String args[]) {
    TheCracker cracker = new TheCracker();
    int passwordentered;
    int realpassword;
    realpassword = 45;
    do {
    System.out.print("What is the password?");
    passwordentered = cracker.passwordentered;
    if (passwordentered == realpassword) {
    System.out.print("The password is correct");
    else {
    System.out.print("The password is incorrect");
    } while (passwordentered != realpassword);
    The error that occurs is that it cannot find symbol variable realpassword in the Class "TheCracker" and it cannot find symbol variable "passwordentered" in the Class "ThePassword"
    Here are the two lines of code that the error occurs in:
    realpassword = password.realpassword;
    and
    passwordentered = cracker.passwordentered;

    When you post code, use the CODE button or [code] and [/code] tags to preserve formatting and make your code readable. Copy/paste from your original source in your editor, NOT from your first post here, which has already lost all formatting.

  • Need help with Different approaches to setting variables in a Flash movie in Adobe Flash CS3 Professional Version

    Hi,
    I'm using Adobe Flash CS3 Professional version of Flash
    software,
    I need help and guidance on
    Different approaches to setting variables in a Flash movie,
    what I should do in the fla file, and in the html file.
    Thanks, Gil

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

  • Need help with accesing variable with xpath.

    Hi All,
    I need help with xpath in "Switch" BPEL construct. Switch is used to compare value assigned to output vairable and follow one path for "Deny" and another for "Approve". The following is data type for output variable.
    <element name="processResponse">
         <complexType>
              <sequence>
                   <element name="result" type="string"/>
              <sequence>
         <complexType>
    </element>
    The following expressions in Switch statement throw lava.lang.Exception. It error is xpath internal error".
    x20:compare('Deny',$outputvariable.payload/client:result)
    x20:compare('Deny',bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result')
    It works with x20:compare('Deny','Deny'). So I assumed it must be accessing the variable.
    Any help greatly appreciated.
    Thanks,
    Satish

    Cany you try the following
    x20:compare('Deny',string($outputvariable.payload/client:result))
    x20:compare('Deny',string(bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result'))
    Regards
    Albin I
    http://www.albinsblog.com/

  • I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.

    I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.
    I am using Labview 8 ... I  need to develop a software to accquire the ECG data (simulated enironment ) and compute the time domain parameters of Heart rate variability like "SDNN, SDANN...etc". Can some 1 plllzzzz help me out.Plzz help me if u can.Thanx in advance.

    Hi Andy,
      Thanx for responding.  The input is from a text file. SDNN, SDANN,etc are  the timedomain parameters of heart rate variability.
     SDNN: the standard deviation of the NN or RR interval  i.e. the square root of variance.
    SDANN:the standard deviation of the averageNN interval calculated over short periods, usually 5 min,which is an estimate of the changes in heart rate due tocycles longer than 5 min
    SDNN index, the meanof the 5-min standard deviation of the NN intervalcalculated over 24 h,
     RMSSD: the square root ofthe mean squared differences of successive NN intervals
    NN50: the number of interval differences of successiveNN intervals greater than 50 ms, and
    pNN50 the proportionderived by dividing NN50 by the total numberof NN intervals.
    The problem is dat I am a fresher to the world of Labview. I have jus recently started working on it. Can u please suggest me some some idea as soon as possible.
      As i said  I have the ECG data in the form of text files..I need to create sort of GUI to calculate the time domain parmeters....I need help urgently. Plzzz help me if u can. If u have and .vi example to calculate the RR interval plzz send it to me ASAP.
    Thanku

  • What is wrong with my variables....I really need help soon

    I need help. I know I need to add in repaint and change methods, but how come, when I put the starting values of my sliders for R: 0 G: 50 B: 0, the square is not green when it loads? IT is just black. What should happen, at least what I think[i] should happen, is that the rectangle would load green. And should the line:
    JPanel = new Rectglbe
    JPanel = new JPanel
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Slider extends JFrame {
            int red, blue, green;
            public Slider() {
                    super("ColorChanger");
                    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    //Info
                    String Run = "Running, Close Program For Prompt\n";
                    System.out.println(Run);
                    //Labels
                    JLabel RedLabel = new JLabel("                                             Red:");
                    JLabel GreenLabel = new JLabel("               Green:");
                    JLabel BlueLabel = new JLabel("               Blue:");
                    //Red Slider
                    JSlider pickR = new JSlider(JSlider.VERTICAL, 0, 255, 0);
                    pickR.setMajorTickSpacing(50);
                    pickR.setMinorTickSpacing(5);
                    pickR.setPaintTicks(true);
                    pickR.setPaintLabels(true);
                    //Green Slider
                    JSlider pickG = new JSlider(JSlider.VERTICAL, 0, 255, 50);
                    pickG.setMajorTickSpacing(50);
                    pickG.setMinorTickSpacing(5);
                    pickG.setPaintTicks(true);
                    pickG.setPaintLabels(true);
                    //Blue Slider
                    JSlider pickB = new JSlider(JSlider.VERTICAL, 0, 255, 0);
                    pickB.setMajorTickSpacing(50);
                    pickB.setMinorTickSpacing(5);
                    pickB.setPaintTicks(true);
                    pickB.setPaintLabels(true);
                    JPanel pane = new Rectgl();
                    pane.add(RedLabel);
                    pane.add(pickR);
                    pane.add(GreenLabel);
                    pane.add(pickG);
                    pane.add(BlueLabel);
                    pane.add(pickB);
                    setContentPane(pane);
                    public int getValueR(int color){
                            return red;
                    public int getValueG(int color){
                            return green;
                    public int getValueB(int color){
                            return blue;
                    public void paintComponent(Graphics comp) {
                            Graphics2D comp2D = (Graphics2D)comp;
                            comp2D.fillRect(0,0, 100, 210);
                            Color JL = new Color(red,green,blue);
                            comp2D.setColor(JL);
            public static void main(String[] args) {
                    Slider frame = new Slider();
                    frame.pack();
                    frame.setVisible(true);
                    frame.show();
      /*      class Rectgl extends JPanel {
                    public void paintComponent(Graphics comp) {
                            Graphics2D comp2D = (Graphics2D)comp;
                            comp2D.fillRect(0,0, 100, 210);
                            Color JL = new Color(red,green,blue);
                            comp2D.setColor(JL);

    Thank you, sorry forgot that message. Could you please put it here again, extensively commented, explain why you changed position of Rectgl.class, what other methods you added do?
    Thanks.

  • I need help with shooting in my flash game for University

    Hi there
    Ive tried to make my tank in my game shoot, all the code that is there works but when i push space to shoot which is my shooting key it does not shoot I really need help with this and I would appriciate anyone that could help
    listed below should be the correct code
    //checking if the space bar is pressed and shooting is allowed
    if(evt.keyCode == 32 && shootAllow){
        //making it so the user can't shoot for a bit
        shootAllow = false;
        //declaring a variable to be a new Bullet
        var newBullet:Bullet = new Bullet();
        //changing the bullet's coordinates
        newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
        newBullet.x = tank_mc.x;
        //then we add the bullet to stage
        addChild(newBullet);
    listed below is my entire code
    import flash.display.MovieClip;
        //declare varibles to create mines
    //how much time before allowed to shoot again
    var cTime:int = 0;
    //the time it has to reach in order to be allowed to shoot (in frames)
    var cLimit:int = 12;
    //whether or not the user is allowed to shoot
    var shootAllow:Boolean = true;
    var minesInGame:uint;
    var mineMaker:Timer;
    var cursor:MovieClip;
    var index:int=0;
    var tankMine_mc:MovieClip;
    var antiTankmine_mc:MovieClip;
    var maxHP:int = 100;
    var currentHP:int = maxHP;
    var percentHP:Number = currentHP / maxHP;
    function initialiseMine():void
        minesInGame = 15;
        //create a timer fires every second
        mineMaker = new Timer(6000, minesInGame);
        //tell timer to listen for Timer event
        mineMaker.addEventListener(TimerEvent.TIMER, createMine);
        //start the timer
        mineMaker.start();
    function createMine(event:TimerEvent):void
    //var tankMine_mc:MovieClip;
    //create a new instance of tankMine
    tankMine_mc = new Mine();
    //set the x and y axis
    tankMine_mc.y = 513;
    tankMine_mc.x = 1080;
    // adds mines to stage
    addChild(tankMine_mc);
    tankMine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
    function moveHorizontal(evt:Event):void{
        evt.target.x -= Math.random()*5;
        if (evt.target.x >= stage.stageWidth)
            evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
            removeChild(DisplayObject(evt.target));
    initialiseMine();
        //declare varibles to create mines
    var atmInGame:uint;
    var atmMaker:Timer;
    function initialiseAtm():void
        atmInGame = 15;
        //create a timer fires every second
        atmMaker = new Timer(8000, minesInGame);
        //tell timer to listen for Timer event
        atmMaker.addEventListener(TimerEvent.TIMER, createAtm);
        //start the timer
        atmMaker.start();
    function createAtm(event:TimerEvent):void
    //var antiTankmine_mc
    //create a new instance of tankMine
    antiTankmine_mc = new Atm();
    //set the x and y axis
    antiTankmine_mc.y = 473;
    antiTankmine_mc.x = 1080;
    // adds mines to stage
    addChild(antiTankmine_mc);
    antiTankmine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
    function moveHorizontal_2(evt:Event):void{
        evt.target.x -= Math.random()*10;
        if (evt.target.x >= stage.stageWidth)
            evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
            removeChild(DisplayObject(evt.target));
    initialiseAtm();
    function moveForward():void{
        bg_mc.x -=10;
    function moveBackward():void{
        bg_mc.x +=10;
    var tank_mc:Tank;
    // create a new Tank and put it into the variable
    // tank_mc
    tank_mc= new Tank;
    // set the location ( x and y) of tank_mc
    tank_mc.x=0;
    tank_mc.y=375;
    // show the tank_mc on the stage.
    addChild(tank_mc);
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onMovementKeys);
    //creates the movement
    function onMovementKeys(evt:KeyboardEvent):void
        //makes the tank move by 10 pixels right
        if (evt.keyCode==Keyboard.D)
        tank_mc.x+=5;
    //makes the tank move by 10 pixels left
    if (evt.keyCode==Keyboard.A)
    tank_mc.x-=5
    //checking if the space bar is pressed and shooting is allowed
    if(evt.keyCode == 32 && shootAllow){
        //making it so the user can't shoot for a bit
        shootAllow = false;
        //declaring a variable to be a new Bullet
        var newBullet:Bullet = new Bullet();
        //changing the bullet's coordinates
        newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
        newBullet.x = tank_mc.x;
        //then we add the bullet to stage
        addChild(newBullet);
    if (tank_mc.hitTestObject(antiTankmine_mc))
            //tank_mc.gotoAndPlay("hit");
            currentHP -= 10;
            // remove anti tank mine
            removeChild(antiTankmine_mc);
    if (tank_mc.hitTestObject(tankMine_mc))
            //tank_mc.gotoAndPlay("hit");
            currentHP -= 10;
            // remove anti tank mine
            removeChild(tankMine_mc);
        //var maxHP:int = 100;
    //var currentHP:int = maxHP;
    //var percentHP:Number = currentHP / maxHP;
        //Incrementing the cTime
    //checking if cTime has reached the limit yet
    if(cTime < cLimit){
        cTime ++;
    } else {
        //if it has, then allow the user to shoot
        shootAllow = true;
        //and reset cTime
        cTime = 0;
    function updateHealthBar():void
        percentHP = currentHP / maxHP;
        healthBar.barColor.scaleX = percentHP;
        if(currentHP <= 0)
            currentHP = 0;
            trace("Game Over");
        updateHealthBar();

    USe the trace function to analyze what happens and what fails to happen in the code you showed.  trace the conditional values to see if they are set up to allow a shot when you press the key

Maybe you are looking for

  • No XML output for a report Oracle 11.5.10.2 RDBMS 10.2.0.5.0

    I created a very simple rdf and ran it without problems. I then generated an .xml file and loaded this into into the template builder using xml publisher. I created the rtf and using xml Publisher administrator created a template and data definition

  • How to include external files in JSP

    hi, How to include external files like image or javascript in to jsp pages. I am using MVC frame work. So i have to use request dispatcher. While calling the pages trough dispatcher the external files are missing from the output. Also am using tomcat

  • Unable to find the Dc in NDS

    HI Experts, I have created one Webdynpro Dc and i have activated that. activation was successful then i removed my configuration from nds.when i reimported the configuration from CMS i am getting the Webdynpro dc.i ahev checked in dtr it's available

  • Data compare

    Hi I would like to run below query on all tables, however it doesnt work on clob and long datatypes select * from owner.table_name minus select * from owner.table_name@remote_db; from dba_tables where owner in ( '....'); ORA-00932: inconsistent datat

  • Remote Menu button: to the chapter menu or the main menu?

    Using DVD Pro (version 4.2.1) for the first time, and I've discovered a lot of fun elements. Here is a question about the remote control settings. I want people to be able to return to the +main menu+ if they want while playing the track, by pressing