Variable Definitions - weird results

Using Flash8 I am getting some weird results when defining
variables.
In my Actionscripts I am trying to define and assign
variables on the same line and then trace it as below :
var light_critical_colour:String = "#FF0000";
trace ("light_critical_colour = " + light_critical_colour);
If I create an new blank fla file and place this in the first
frame, scene 1, it works as you would expect and opens a trace
window and returns "light_critical_colour = #FF0000". Also if I
remove the first line then the result is "light_critical_colour =
undefined" again as expected.
My issue is that I have another fla file which i have created
from scratch as per the example above. I have 2 scenes, scene 1 is
the preloader and scene 2 is the main user screen. It does not
matter where I place the code even in the the first frame of scene
1, the var definition seems to be ignored and if I remove the var
definition line and just have "trace ("light_critical_colour = " +
light_critical_colour);" I get "light_critical_colour =" rather
than "light_critical_colour = undefined" as expected.
Does anyone have any idea's ?
Thanks

More Information:
I have managed to get around this by cutting and pasting my
ActionScript and objects into a new fla and its now working fine.
If I was not such a ActionScript newbee I would suggest that
this is a Flash8 bug !
This sure managed to waste lots of my time.........

Similar Messages

  • Add new variable definition

    how to add new variable definition in report painter?

    Hi,
    in Transaction GR32 use menu ->Report Writer -> Variable -> Create
    regards
    Walter  Habich

  • Unable to refresh variable definition in ODI Load Plan

    Hi All,
    We recently removed the variable definition and changed it to default value. After that we tried to refresh the variable in  Load plans / Scenarios but it still shows old SQL. Can you please suggest if there is a way to force refresh the variable definitions in load plans? We tried removing and re-adding the variable but that didn't help. Last resort will be to recreate the load plans but we are trying to avoid that.
    Thanks,
    Andy

    Hi Alastair,
    Thanks for the reply. Actually variable is returning the correct value. Only problem is that in the Load Plan's variable section variable still shows old definition even after trying to refresh n number of times and also tried removing it from load plan and then inserting it back in after changing the definition. We don't want to migrate load plan like this. Kindly suggest.
    Thanks,
    Andy

  • What about these variable definitions?

    I inherited a set of FM books, and I don't understand the variable definitions. What is the difference in the several ways that "< >" is used in these examples?
    ProductLine       <italic>Cheese
    ProductName    <skim milk>
    Company          </>S&J</>
    CompanyLong    Smith and Jones Dairy
    Is one or more variable ill-defined?
    Thanks!

    <italic> implies that a Character Format of that name exists and is to be applied to the word "Cheese" which is inserted in the flow.
    <skim milk> makes no sense at all. What does it show up as, if anything?
    </>S&J</> is syntactically the same as <Default ¶ Font>S&J<Default ¶ Font>
    The leading </> might make sense if the author thought there was some risk of a format override in the paragraph that needed to be turned off. The trailing </> is at the very least unnecessary.

  • Pacman variable definitions

    I develop pajman. a boosted bash based package manager.
    What I found is that it would be easier to understand and implement pacman alternatives if variable names where in a concrete file to be able to check them.
    Pacman should have a file in which we have all the variables that sit in configuration or information files (/etc/pacman.conf, /var/lib/pacman/local/*/depends, etc).
    Right now if we look for %DEPENDS% we get that it is inlined in the code:
    [root@patito src]# busca %DEPENDS%
    gensync
    129: echo "%DEPENDS%" >>depends
    updatesync
    132: echo "%DEPENDS%" >>depends
    convertdb.c
    102: fputs("%DEPENDS%nn", fp);
    db.c
    450: if(!strcmp(line, "%DEPENDS%")) {
    581: fputs("%DEPENDS%n", fp);
    [root@patito src]#
    if there was a file with all variables, pajman would be able to check if there is something new to keep in mind and tell me.
    I could check if the vesion of pacman changed and then using cvs download this new version of the variable definitions.
    This file could also implement a clear explanation of what is what every variable means and what it does. This way I could also check if the explanation changed and know that i have to update pajman, because the few things that it does may not work anymore.
    i suggest having something like:
    definitions.c
    23: VARNAME_DEPENDS="%DEPENDS%";
    24: // DEPENDS CONTAINS A LIST OF PACKAGES THAT ARE NEEDED FOR THIS PACKAGE TO RUN
    25: // ASSOCIATED TO EACH PACKAGE YOU CAN FIND REQUIRED VERSION INFORMATION (ex: kdelibs>=3.2.3)
    I post this in the forum first to see other opinions about it.

    fputs("%DEPENDS%n", fp);
    %*% = %DEPENDS%
    read until end of line:
    n", fp);
    what's the point of that?
    what i want to do is to be able to know when pacman has new/modified features.

  • "filename" text variable acting weird

    I have a weird problem with the "filename" variable, my documents have a specific name (code) that are shown via a variable in the documents (filename without the extension).
    in order to print I have to place several documents together on one page, to make work easier, I place the indesign files and what do I see? in the placed documents the file extension shows up!! altough I de-select that option in my original documents...  when making pdf's there's no extension to see.
    anyone know a solution for this curious problem?

    I've tried to "hide" the extension in finder, with no result.
    it shows realy the name as used in the "Links" palette.
    I've found a little workaround: search for all the indesign files in that certain folder, select them and use "a better finder rename" to delete the extensions, that works!! but then I have to re-link all the files becouse the filename isn't the same anymore ... sad...

  • Where to put xsl:variable definition

    I apologize in advance if this is a really obvious question/answer for most of you.
    I want to use this definition code to create a variable called color:
    *<xsl:variable name="color" select="'red'"/>*
    I want to include this code in my RTF template to display the contents of that variable:
    *<?$color?>*
    My question is this: where do I put the definition code? I've tried it in several different places, none of which have worked: at the top of my RTF template, on the top row of the table where I'm referring to it, and so forth.
    When I run the preview, I get the typical error screen with this key line: Variable not defined: 'color'.

    The subtemplate idea works quite well (mostly).
    In my subtemplate, I defined this:
    <?template:Format1?>
    <?if:number(Sales) gt 1000000?><?attribute@incontext:color;'red'?> <?attribute@incontext:font-weight; 'bold'?><?end if?>
    <?end Format1?>
    In my template field, I call Format1 like this:
    <?call@inlines:Format1?><?end call?>
    Sure enough, my values are shown in bold red. Yay!!!
    But now I've got extra vertical space in the affected cells. I've used table functions to align the values at the bottom of the cell. If I don't apply this conditional formatting, the row is what I'll call a "normal" height. When I apply the conditional formatting, the bold red numbers are displayed at the bottom of the cell as expected, but the row is twice as tall as its "normal" height.
    The difference is found in the page source for the browser page. The <tr> tag shows a height of 13.216pt for the "normal" rows, but 25.933pt for the rows affected by the formatting. For some reason, BIP wants to generate a much taller row when it contains these formatted results.
    I've experimented with attribute tags such as <?attribute@incontext:linefeed-treatment;'ignore'?> and <?attribute@incontext:height;14?>. I've used Word table formatting to fix the height of the row at exactly .3 inches. I removed the bold tag, and just kept the font color. None of those ideas was successful in removing the extra height.
    Thoughts?

  • Window.bounds gives weird results

    I run without Application Frame and without Application Bar. I see no point to the former and the latter is just a shocking waste of space. For years, I've been using a handful of scripts to manage my window positions. One of them is now misbehaving. The script is so old that it didn't use functions and all its variables were global -- it probably dates all the way back to when I was beta-testing the original ExtendScript in CS.
    So I decided to rewrite it in case I'd done something weird that rewriting would expose. Well, I found the weirdness but it wasn't me. With one document window open, I typed this into the JavaScript Console (I'm running with a monitor that is 1920 x 1200):
    app.windows[0].bounds = [22,32,1140,863]
    and the console duly responded with:
    Result: 22,32,1140,863
    and visually, I can see that the window is indeed at that location.
    But now when I type:
    app.windows[0].bounds
    into the JS Console, it responds with:
    Result: 60,32,1178,863
    The x values are right but the y values are off by 38.
    Is this a Mac-only issue? I'm running with Mountain Lion on a Retina MacBook Pro. Oh: of course it's Mac only: you can't switch off the Application Frame on Windows, can you?
    Dave

    It turned out that moving to 0,0 created problems with the x-coordinate, but since those were the only x-coordinate problems I ever saw, I decided to focus only on the y-coordinate. In this version of the script, I move the window to y = 0 to measure the current value of the y error.
    //DESCRIPTION: Resets active layoutWindow size or uses front layoutWindow to set page default size.
              Rewrite of a venerable old favorite
              1. If no layoutWindow open offer to delete settings file
              2. If no settings and layoutWindow offer to make layoutWindow bounds new settings
              3. If settings and layoutWindow move layoutWindow to settings location unless there's a layoutWindow already there
                  in which case, move layoutWindow next to that other layoutWindow or move only layoutWindow right by its width
    (function() {
              var settingsFile = getSettingsFile();
              if (app.layoutWindows.length == 0) {
                        // no front layoutWindow; offer user chance to delete settings
                        if (confirm("No layoutWindow is open; would you like to delete the settings file?")) {
                                  // user said yes; only bother to delete it if it exists
                                  if (settingsFile.exists) {
                                            settingsFile.remove();
                        return; // no layoutWindow, so nothing more to do
              // there's at least one layoutWindow
              var yDelta = getDelta(app.layoutWindows[0]);
              if (settingsFile.exists) {
                        applySettings(settingsFile, yDelta);
              } else {
                        if (confirm("Settings file is missing. Use current front layoutWindow to set default?")) {
                                  // user said do it
                                  var bounds = app.layoutWindows[0].bounds;
                                  var bounds = [
                                            bounds[0] - yDelta,
                                            bounds[1],
                                            bounds[2] - yDelta,
                                            bounds[3]
                                  new File(settingsFile);
                                  settingsFile.open("w");
                                  settingsFile.write(bounds);
                                  settingsFile.close();
              function getDelta(layoutWindow) {
                        // get current layoutWindow position and dimensions
                        var reportedBounds = layoutWindow.bounds;
                        var wHeight = reportedBounds[2] - reportedBounds[0];
                        // move to 0, 0
                        layoutWindow.bounds = [0, reportedBounds[1], wHeight, reportedBounds[3]];
                        $.sleep(10);
                        var newBounds = layoutWindow.bounds;
                        // calculate errors
                        var yDelta = newBounds[0];
                        // restore layoutWindow to original position
                        layoutWindow.bounds = [
                                  reportedBounds[0] - yDelta,
                                  reportedBounds[1],
                                  reportedBounds[2] - yDelta,
                                  reportedBounds[3]
                        $.sleep(10);
                        return yDelta
              function applySettings(settingsFile, yDelta) {
                        // values written out to the settings file must take delta into account
                        settingsFile.open("r");
                        var savedBounds = settingsFile.read();
                        settingsFile.close();
                        var myBounds = savedBounds.split(",");
                        for (var j = myBounds.length - 1; j >= 0; j--) {
                                  myBounds[j] = Number(myBounds[j]);
                        // Check to see if an existing layoutWindow is already at these bounds;
                        var layoutWindowsBounds = app.layoutWindows.everyItem().bounds;
                        // all these values are off by delta
                        for (var j = layoutWindowsBounds.length - 1; j >= 0; j--) {
                                  if (layoutWindowsBounds[j][0] - yDelta == myBounds[0]
                                                      && layoutWindowsBounds[j][1]  == myBounds[1]
                                                      && layoutWindowsBounds[j][2] - yDelta == myBounds[2]
                                                      && layoutWindowsBounds[j][3] == myBounds[3]) {
                                            // layoutWindow right there, so:
                                            var myWidth = myBounds[3] - myBounds[1];
                                            myBounds[1] += myWidth;
                                            myBounds[3] += myWidth;
                                            break; // only do it once!
                        app.layoutWindows[0].bounds = myBounds;
              function getSettingsFile() {
                        var scriptFile = getScriptFile();
                        return File(scriptFile.parent + "/PageDefault" + parseInt(app.version) + ".txt");
              function getScriptFile() {
                        // This function returns the file of the active script, even when running ESTK
                        try {
                                  return app.activeScript;
                        } catch(e) {
                                  return File(e.fileName);

  • Session Variable not producing results in answers

    Hi,
    I have a Session initialization block and I have the variable target assigned to a variable region_info. My SQL is this "select Region from SH.USER_INFO where UPPER(USER_ID)=UPPER(':USER'). It gives me the correct results in RPD.
    In answers and in the filter I say Region is equal to/is in NQ_SESSION.Region_info until this point it works great.
    How would I modify it to accept multiple rows. I tried the Row-wise initialization and I am getting an error, saying NQ_SESSION.Region_info has no value definition. How can I make it work if the initialization block returns multiple rows and in the answers if I have to pass them both in my filter?
    Please help. Thank you.

    ssk,
    No,it will not work u can't use that in answers fx
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_Variables5.html
    http://108obiee.blogspot.com/2009/10/using-multiple-values-row-wise-session.html
    Thanks,
    Saichand.v

  • How to get Error Msg from A step in TestStand into a variable (with Record Result disable)

    I have disable "Record Result" in a step (action) that call a Labview VI (Minimise memory usage during long run).
    But I want to capture the error msg and put it in a local variable (locals.log).
    So in the "Post Expression" of that step, I add:
    locals.log = step.result.error.msg
    But it always an empty string, Is the post expression executed when the there is an error in the step ?
    So How can I capture it ?

    Hi,
    The trouble is that when a step errors, the Post Expression doesn't get executed.
    Try using one of the Override callbacks - SequenceFilePostStepRuntimeError, ProcessModelPostStepRuntimeError or StationPostStepRuntimeError.
    There is an example in the Examples\Callbacks.
    The Step properties are passed as a parameter to the callback so you can get the error message and do your logging.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • How to make use of the presentation variable in SQL result query

    I have 2 prompts in my dashboard.
    Prompt1 decides the values of Prompt2.
    I have set a presentation Variable (selected_comp) in prompt1 which holds the value selected.
    To populate the values for Prompt2, I need to execute a query using the presenation variable set by Prompt1.
    SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=@{selected_comp}
    the query is resulting into
    SQL Issued: SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=0
    but the value in selected_comp is "ABC".
    Can anybody help in how to make use of the presentation variable in query to get the correct value
    thanks
    Shubha

    Just use constrain check box to filter your 2nd prompt values based on the 1st prompt.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How to use bind variables in "query result" "validation rule"

    I have created a validation rule on my entity object. rules=compareValidator attribute=InvoiceNumber operator=NotEquals queryResult=SELECT ...
    In this query, I would like to reference entity attributes from the current instance of the entity when the value fires, for example SELECT invoice_number where invoice_id != :invoiceId
    How can I reference a bind variable inside the query result compare validator validation rule?
    THanks,
    Jerry.

    bump

  • Name of ODI variable in the result of Oracle SELECT

    Hello,
    I seek to evaluate the contents of an ODI variable (VP) which is the result of SELECT with other ODI variables (V1, V2,…, Vn) in its contents.
    Currently, the result of this first variable (VP) returns the name of the variables (V1 to Vn) and not the value of these variables.
    For example :
    My variable VP is a select from oracle (SELECT FIELD_NAME FROM TABLE_NAME WHERE XXX = VALUE)
    The field FIELD_NAME contains "The #PROJECT.V1 is OK and the #PROJECT.V2 is KO".
    I want to replace the two variables by their values.
    Does there exist simple means of recovering the value of these variables instead of their names ?
    Else, do you have a solution of skirting knowing that there can be several variables (V1 to Vn) and that they can be different according to the cases ?
    I'm in ODI 10.
    Thank you in advance for your assistance,

    Thanks for your answer.
    The second solution isn't possible to us because we don't know which variables are included in the SELECT result. We can have many variables and it is not always the same variables.
    For the first solution, I try to find the link between the data of table SNP_VAR_DATA and a session (SESS_NO). Unfortunately, I do not arrive there.
    Can you how make ? And by which tables of ODI ?
    Thanks in advance,

  • Const not allowed in global variable definitions?

    Can someone tell me why the compiler complains when I do this:
    const int MY_CONST = 100;
    char *myStr[MY_CONST];
    This is being done outside of a function, as I want myStr to be a global variable.
    I get an error saying the initializer must be constant. I've tried this with other compilers, and they don't complain. Any ideas?
    Thanks.

    In C a variable of type int remains a variable, even if the const keyword prevents it is modifiend during program life. Given this, C does not permit to use it in a array definition since it is not a "constant". As far as I know C++ does permit this declaration.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • User-defined variables in Search Results pane

    I am working with user-defined variables for WebHelp output.
    I have successfully added the variables to the topic, the displayed
    topic title, the TOC, and the Index entries. The problems lies in
    getting the search output to display the specified variable text.
    For example, the base topic title is "Introduction to XX". I
    use a variable to change the XX to YY throughout the project;
    however, when I generate the output and then Search for YY, the
    search results pane displays "Introduction to XX" even though the
    displayed topic is titled, correctly, "Introduction to YY". I am
    assuming, because the topic title is not adhering to the variables,
    that the search results displays the metadata <title>.
    What should I do so the search results title syncs with the
    other data?
    Carol

    Welcome to the forum.
    There have been two posts about this recently so do a search
    for more information.
    Basically the search results show the Topic Title as defined
    in Topic Properties. Your variable is in the Topic Heading at the
    top of the page. Not the same thing.
    I suggest you request a feature change.
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Maybe you are looking for

  • 5800 camera picture clarity.

    i bought the 5800 recently and was blown away to have this phone.... but the camera looks like a let down in bad light.. the pics that i took came out grainy and hazy at night.. bright light pics are really gud... Also the game that i have on my phon

  • ELive TAB is missing. PSE 13

    I installed Photoshop Elements 13 form a original DVD, but there is no eLive tab. Only -quick, guided and expert. I have the Dutch version. How can I get the eLive tab on my menu bar?

  • Keychain frustration - How do I disable it?

    My teachers log into an Xserve and run Entourage for email. I have had a lot of problems with Keychain access. I don't need it (I think), we are not the Bank of America. How do I disable it?

  • Loving Flex Time

    For the past few days I've been editing vocals for the first using flex time for a remix. the original tempo of the song was around 89-90's. I wasn't provided the original tempo. But my remix is 120 I imported the vocals put the tracks on Polyphonic

  • Comparing Tables In Two Different Databases

    Hi, As part of our project, we need to perform table comparisons in two different databases. I am currently looking for various options to accomplish this. One of them is doing minus operation between these two tables. Also, i have looked at the data