Static text | variable | static text

i'm thinking i need a simple actionscript to do this but i'm
not exactly sure. i have a dynamic text field that is loading a
variable named count. however i would like to place static text on
either side of the value of the variable. since the variable is an
integer that will only increase, it's horizontal width will also
increase as well. i can't very well place two strings of static
text on either side of a variable that will grow in width over
time. does that make sense?
essentially, i want to have a dynamic text box display a
string of text, then the value of a variable (that will change in
length), then another string of text, but i would like it to all be
seamless, looking as if i just typed the whole sentence in a word
processor. thanks for your time!

let say you have a dynamic text field with instance name
my_txt
when you want to increase the value, you run my_txt.text++;
when you want to decrease the value, you run my_txt.text--;
now, convert the dynamic text field to a movieclip symbol,
set the instance name my_mc
now, to set the value of text, we should use
my_mc.my_txt.text++;
but we are not going to set the value in this way.
now, go into my_mc movieclip, select the 1st frame, attach
script:
var actualValue:Number = Number(this.my_txt.text);
var displayValue:String = "";
function setValue(d) {
actualValue += d;
displayValue = "something"+actualValue+"something";
my_txt.text = displayValue;
setValue(0);
go back to your maim timeline. and now,
when you want to increase the value, use my_mc.setValue(1);
when you want to increase the value, use my_mc.setValue(-1);

Similar Messages

  • Text Variable in Tray Title

    HI BI experts,
    we recently migrated many WAD from BW 3.5 to BI 7.0.
    In BW 3.5 We had (in automatic) every Web Item with the Query (Dataprovider) title.
    In BI 7.0 if we want the title over every Web Item, we have to manage the Tray; i can write the text manually in the Tray Settings but, unfortunately, in some Web Item, we have a text variable (a text variable is in the title of the query developed with the Query Designer).
    My question is: How can i reproduce the right title of the query with the value of the text variable?
    I'm not expert in Javascript, if the solution is in the javascript please give me an example of coding.
    This is the xhtml code of a Web Item where "TXTORDI02" is the name of the text variable
                       <tr >
                            <td valign="top" colspan="2" >
                                <bi:CHART_ITEM name="CHART_1" designheight="325" designwidth="600" >
                                    <bi:WIDTH value="600" />
                                    <bi:HEIGHT value="325" />
                                    <bi:WITH_TRAY value="X" type="CHOICE" >
                                        <bi:TRAY_SETTINGS type="COMPOSITE" >
                                            <bi:CAPTION value="Valori EV Costi x Destinazione(Periodo) -&TXORDI02&" />
                                            <bi:CAPTION_VISIBLE value="X" />
                                            <bi:STYLE value="PLAIN" />
                                            <bi:UPDATE_TYPE value="CLIENT" />
                                        </bi:TRAY_SETTINGS>
                                    </bi:WITH_TRAY>
                                    <bi:CHART_CUSTOMIZING value="biLargeData:99ZXG4E32B0MJ9FP1ISDPVW1C" />
                                    <bi:CHART_TYPE value="COLUMNS" />
                                    <bi:LEGEND_TYPE value="LEGEND_POSITION" />
                                    <bi:DATA_PROVIDER_REF value="DATAPROVIDER_1" />
                                    <bi:LINKED_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >
                                        <bi:LINKED_DATA_PROVIDER_REF value="DATAPROVIDER_1" index="1" />
                                    </bi:LINKED_DATA_PROVIDER_REF_LIST>
                                    <bi:OVERRIDE_AXIS_DESC type="CHOICE" value="" />
                                    <bi:OVERRIDE_AXIS_LABEL type="CHOICE" value="" />
                                </bi:CHART_ITEM>
                            </td>
                        </tr>
    Thanks in advance.
    Fabrizio Modesti

    Hi Fabrizio,
    you could place an infofield item above the analysis item and refer to the Dataprovider with one element: information type = "generic text" and the value of the generic text element "QUERY_DESCRIPTION". Use the same item width as the analysis item.
    Then the Query description is generic.
    If you like you could use a container item with tray which includes these 2 elements.
    <bi:INFO_FIELD_ITEM name="INFO_FIELD_ITEM_1" designheight="300" designwidth="800" >
       <bi:WIDTH value="800" />
       <bi:DATA_PROVIDER_REF value="DP_1" />
       <bi:INFORMATION_ELEMENT_LIST type="ORDEREDLIST" >
         <bi:INFORMATION_TYPE type="CHOICE" index="1" value="GENERIC_TEXT_ELEMENT" >
           <bi:GENERIC_TEXT_ELEMENT value="QUERY_DESCRIPTION" />
         </bi:INFORMATION_TYPE>
       </bi:INFORMATION_ELEMENT_LIST>
    </bi:INFO_FIELD_ITEM>
    Instead the Infofield item you could take a text item with the generic text:
    <bi:TEXT_ITEM name="TEXT_ITEM_1" designheight="70" designwidth="400" >
        <bi:TEXT_BINDING type="CHOICE" value="GENERIC_TEXT_BINDING" >
            <bi:GENERIC_TEXT_BINDING type="COMPOSITE" >
                <bi:DATA_PROVIDER_REF value="DP_1" />
                <bi:GENERIC_TEXT_ELEMENT value="QUERY_DESCRIPTION" />
            </bi:GENERIC_TEXT_BINDING>
        </bi:TEXT_BINDING>
    </bi:TEXT_ITEM>
    best regards
    ARNE

  • Text variable - color

    I'd like to create a text variable, the text being the name of the swatch fill of the text. Possible?

    Actually I am the printer, doing the impo in InDesign
    For years I've been just typing the swatch name when I have a spot color. I have a generic spot and text. Then I use the ink manager to remap the generic spot to the color actually being used, then I do a Find-Change to add the swatch name.
    My page size is press sheet size. The process colors names are already in my templates, so it's just a spot color name that I change
    I'd like to be able to re-color the variable and have the text change on the fly, but I didn't think it was possible.

  • Pro*C problems with static pointer variables

    I am having real trouble declaring a static pointer variable:
    static GVC_t *gvc = NULL;
    Pro*C/C++: Release 9.2.0.6.0 - Production on Fri Jun 22 13:08:40 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: /oracle/oracle9i/product/9.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 56, column 16, file GP_graph.pc:
    Error at line 56, column 16 in file GP_graph.pc
    static GVC_t *gvc = NULL;
    ...............1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "*" to continue.
    Error at line 0, column 0 in file GP_graph.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    make: *** [GP_graph.o] Error 1
    If I do not declare it static there is no problem:
    GVC_t *gvc;
    What can be the problem?

    I am having real trouble declaring a static pointer variable:
    static GVC_t *gvc = NULL;
    Pro*C/C++: Release 9.2.0.6.0 - Production on Fri Jun 22 13:08:40 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: /oracle/oracle9i/product/9.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 56, column 16, file GP_graph.pc:
    Error at line 56, column 16 in file GP_graph.pc
    static GVC_t *gvc = NULL;
    ...............1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "*" to continue.
    Error at line 0, column 0 in file GP_graph.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    make: *** [GP_graph.o] Error 1
    If I do not declare it static there is no problem:
    GVC_t *gvc;
    What can be the problem?

  • When I send or reply my static signature is in text instead of html. this is an issue because there is no space as normal. please advise or work with smartmail to correct. firefox is much quicker than explorer and I've always preferred firefox. thank you

    when I send or reply my static signature is in text instead of html. this is an issue because there is no space as normal. please advise or work with smartmail to correct. firefox is much quicker than explorer and I've always preferred firefox. thank you

    That is a legitimate Mozilla newsletter. As it says in the email:
    You're receiving this email because you subscribed to receive email newsletters and information from Mozilla. If you do not wish to receive these newsletters, please click the Unsubscribe link below.
    Unsubscribe https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/
    Modify your preferences https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/ "

  • Text Variable in WAD

    Hi,
    I have a text variable. I created it in order to display beside the description of the query in BEx report.
    Now, I want to display the same thing in WAD.
    Half of the name of the query is static and half is dynamic...so requesting to let me know how can I proceed and do the same in WAD.

    Create a Text Element in WAD and attache the query as teh dataprovider to that Text Element.
    This will display whatever is there in the Query Description.

  • Text Variable Help? Beginning section page number required

    Hi guys,
    My name is Arjun and I am working on a book in Indesign. I've created quite a few sections and want to create a header on top that displays,
    for example
    "Summary FirstX to LastX" (in bold are the variables)
    First X being that Sections first page number
    Last X being that Sections last page number
    There is a default preset that came with Indesign CS4 that allows you to create a Text variable for the last page number of that section. What about the beginning? I don't wan to turn that to static text as i have a lot of page shuffling to do and the more the automated the better.
    Thanks,
    Arjun

    I hadn't noticed that there isn't a First Page Number text variable building block. How odd.
    I would try setting up a "cross-reference" to the first paragraph in your section. (This is not part of the text variable dialog. Use the cross-reference window under Type & Tables in the Windows menu). I assume these will work on master pages, though I haven't tried it. It does seem odd that you'd need to use completely different tools for each page number!
    Be aware that there's now a hidden marker at the beginning of that paragraph, which the cross reference uses to know what page number to insert. So if you accidentally remove it (for instance, if you delete and retype the whole paragraph), you'll have to set up the cross reference again. And you'll have to explicitly create that cross reference in each section of your book, while the text variables are pretty automatic. So there could easily be a better solution that I haven't thought of.
    Good luck, and tell us what finally works...

  • Static and non-static variables and methods

    Hi all,
    There's an excellent thread that outlines very clearly the differences between static and non-static:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=374018
    But I have to admit, that it still hasn't helped me solve my problem. There's obviously something I haven't yet grasped and if anyone could make it clear to me I would be most grateful.
    Bascially, I've got a servlet that instatiates a message system (ie starts it running), or, according to the action passed to it from the form, stops the message system, queries its status (ie finds out if its actually running or not) and, from time to time, writes the message system's progress to the browser.
    My skeleton code then looks like this:
    public class IMS extends HttpServlet
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
            doPost(request, response);
       public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
          //get the various parameters...
             if (user.equalsIgnoreCase(username) && pass.equalsIgnoreCase(password))
                if(action.equalsIgnoreCase("start"))
                    try
                        IMSRequest imsRequest = new IMSRequest();
                        imsRequest.startIMS(response);
                    catch(IOException ex)
                    catch(ClassNotFoundException ex)
                else if(action.equalsIgnoreCase("stop"))
                    try
                        StopIMS stopIMS = new StopIMS();
                        stopIMS.stop(response);
                    catch(IOException ex)
                 else if(action.equalsIgnoreCase("status"))
                    try
                        ViewStatus status = new ViewStatus();
                        status.view(response);
                    catch(IOException ex)
             else
                response.sendRedirect ("/IMS/wrongPassword.html");
    public class IMSRequest
    //a whole load of other variables   
      public  PrintWriter    out;
        public  int                 messageNumber;
        public  int                 n;
        public  boolean         status = false;  //surely this is a static variable?
        public  String            messageData = ""; // and perhaps this too?
        public IMSRequest()
        public void startIMS(HttpServletResponse response) throws IOException, ClassNotFoundException
            try
                response.setContentType("text/html");
                out = response.getWriter();
                for(n = 1 ; ; n++ )
                    getMessageInstance();
                    File file = new File("/Users/damian/Desktop/Test/stop_IMS");
                    if (n == 1 && file.exists())
                        file.delete();
                    else if (file.exists())
                        throw new ServletException();
                    try
                        databaseConnect();
                   catch (ClassNotFoundException e)
    //here I start to get compile problems, saying I can't access non-static methods from inside a static method               
                   out.println(FrontPage.displayHeader()); 
                    out.println("</BODY>\n</HTML>");
                    out.close();
                    Thread.sleep(1000);
            catch (Exception e)
        }OK, so, specifially, my problem is this:
    Do I assume that when I instantiate the object imsRequest thus;
    IMSRequest imsRequest = new IMSRequest();
    imsRequest.startIMS(response); I am no longer in a static method? That's what I thought. But the problem is that, in the class, IMSRequest I start to get compile problems saying that I can't access non-static variables from a static method, and so on and so on.
    I know I can cheat by changing these to static variables, but there are some specific variables that just shouldn't be static. It seems that something has escaped me. Can anyone point out what it is?
    Many thanks for your time and I will gladly post more code/explain my problem in more detail, if it helps you to explain it to me.
    Damian

    Can I just ask you one more question though?Okay, but I warn you: it's 1:00 a.m., I've been doing almost nothing but Java for about 18 hours, and I don't do servlets, so don't take any of this as gospel.
    If, however, from another class (FrontPage for
    example), I call ((new.IMSRequest().writeHTML) or
    something like that, then I'm creating a new instance
    of IMSRequest (right?)That's what new does, yes.
    and therefore I am never going
    to see the information I need from my original
    IMSRequest instance. Am I right on this?I don't know. That's up to you. What do you do with the existing IMS request when you create the new FrontPage? Is there another reference to it somewhere? I don't know enough about your design or the goal of your software to really answer.
    On the other hand, IMSRequest is designed to run
    continuously (prehaps for hours), so I don't really
    want to just print out a continuous stream of stuff to
    the browser. How can I though, every so often, call
    the status of this instance of this servlet?One possibility is to pass the existing IMSRequest to the FrontPage and have it use that one, rather than creating its own. Or is that not what you're asking? Again, I don't have enough details (or maybe just not enough functioning brain cells) to see how it all fits together.
    One thing that puzzles me here: It seems to me that FP uses IMSReq, but IMSReq also uses FP. Is that the case? Those two way dependencies can make things ugly in a hurry, and are often a sign of bad design. It may be perfectly valid for what you're doing, but you may want to look at it closely and see if there's a better way.

  • Error in creating Text Variable

    Hi  Gurus,
    I have one requirement to create a text variable for the user & the user wants to put the description as input to the variable.
    But when i am creating the variable,the variable type "characteristic Value"  is by default selected and i am also unable to change the variable type to text variable.
    Please any body have the solution to resolve the error.
    Regards
    Debasish

    Hi,
    Just select a particular key figure and on the right side you will see its properties..
    Now just besides the description of the key figure you will find a symbol for create variables, just click on that.. It will create a text variable...
    Edited by: mansi dandavate on Aug 31, 2009 11:12 AM

  • 0FISCPER text variable "External Characteristic Value Key" has changed

    Hello!
    Could somebody help and tell, why in BI7.0 version (but 3.x RRMX version) the format of the 0FISCPER text variable (also other time characteristics) has changed from 001.2007 (version 3.x) to 0/1  .0700 (version 7.0)?
    I cannot understand the logic of the new Exterternal characteristic calue key. What can I do about it?
    Thanks for your help, gurus!
    BR, Auli Peltola

    I figured out myself the reason for the problem: in the new version the fiscal year variant has to be defined in report so that the 0FISCPER would work.

  • How to create Text Variables in BEx Query Designer

    How  can i create Text Variables in Bex Q.D.
    I am able to create characteristic variables
    but i can't find option to create text variables.
    What's the requirement to create Text variables in Bex Q.D.
    When i try to create Text variable for 0calDay.. the variable type is characteristic by Default and disabled.
    How can i create text variables related to 0CalDay with which i need to work in Customer Exit.

    Hi,
    You have to create characteristic variable processing by Customer Exit by considering 0CalDay as a Reference Characteristic
    After creation of the above variable, you restrict your KF with the above created variable.
    Now you can create a Text variable for the description of your KF. This way it works...........
    Regards,
    Suman

  • Text Variables are not being Displayed in the Output of the Query

    Hi All ,
    We have some column headings , which are populated through the Text Vaiables , But in the Query Ouptput only the tech names of the Text variables are being displayed . can anyone tell me why its happening like this . I want to debug the Query , please guide me in this regard
    Thanks in Advance.. Pls reply me as soon as possible

    Hi Nagarjuna reddy,
    Click on the properties of the infoobject enter the name of the description and next to that you can see the X/? buttion click on the this button and select the field/if the proper field is not there then create a field descriton and select. i hope this is works and correct me if i am wrong. for debuggin the query use a transaction code- RSRT.
    regs,
    Vachan

  • Why do text variables using Running Header character style translate forced returns as a word space in the running head on the first page but close up the space on subsequent pages?

    In an InDesign document that requires 3 different Chapter head paragraph styles (to cope with differrent length headings) I've set up the running heads on the master page with a text variable using the Running header (character style) option. The character style I've assigned to this is an empty character style that is applied to all 3 chapter head paragraph styles.
    Some chapter heads require a forced line break, so that the line breaks are aethesically pleasing. On the first page the text variable translates this forced line break as a word space in the running head, but on subsequent pages it ignores the forced line break. This means that if you have a word space before the forced line break, on the first page you get a double word space and on subsequent pages the running head sets correctly with a single word space. But if you remove the word space before the forced line break in the chapter head text, the first running head sets correctly with forced line break interpreted as a single word space, but on subsequest pages the space is closed up.
    This only seems to be a problem when the character style option is used for header text variables. If a paragraph style is used the forrced line break is interpreted as a a single word space in all instances, both on the foirst page and subsequent pages.
    This would appear to be a bug in how text variables are applied when using the Running header (character style) option. I can't see any other reason why the text variable would beheave differently on the first page and on subsequent pages. There is only one master page, so it isn't a case of their being an error between a main master page and a chapter opener master page.
    Does anyone have any solutionss, or know if this problem has been fixed in subsequent releases of InDesign (I'm using CS6 ID version 8.0)
    Thanks

    Ask in the ID forum...
    Mylenium

  • Text Variable not showing headers in Formula

    I have text variable in my report when I use in Formula its not working.Its a replacement path and if I used in normal col its showing header correctly.
    Any ideas guru's
    Thanks in Advance!
    Andy

    As I mentioned when I use in Formula to add up these text variables header is not showing.
    EG: &ZP_FPTA&  &ZP_FPTB&  &ZP_IPVERS& this is in one col and there is another Variable like this I am adding up in Formula ,Addition is working but header is not showing correct
    It shows as Tech name of variable only not picking up description from Variables..
    hope this is clear..
    Andy

  • Text Variable Not Refreshed

    Hello,
    I created a data text variable user exit.
    everyting works fine, but,
    1) Selection options:
    Year: 2010
    Month: 1 to 11
    The query and text variable return right values
    Year 2010
    Month: Jan to Nov
    but, if i want to make new selection
    2) Year : 2011
    month : 1 to 11
    the query results are fine, but, the variable text return its old : return:
    year: 2010
    month: Jan to nov
    3) when I do it again
    year: 2011
    month: 1 to 11
    The query and text variable return right values
    Year 2011
    Month: Jan to Nov
    Why this happen? why they string doesnt work it 1rst..?
    Thx
    Reg

    I assume , variable 'ZP_CALY2' , which you are reading is created on calyear/ month which stores data as '2011.001' for e.g.
    and you are extracting year from the same and writing the same in a variable for calyear .
    In that case correct the code as
    WHEN 'ZP_AN2'.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZP_CALY2'.
    zt_dt1 = loc_var_range-low +0(4).
    l_s_range-low = zt_dt1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDLOOP.
    Otherwise you can try this option ,
    You are entering year in the selection screen , so create a text variable with replacement path and give the replacement characteristic as fiscalyear info-object used in the report .also restrict fiscal year variable in the keyfigure . use this variable along with the keyfigure .
    It will give you the correct year .

Maybe you are looking for