AS3 syntax question

Hello

Having a problem or issue of syntax. When I'm writing this in AS3, I get the right result: 4

var wordArray1:Array = ['test', 'Apple', 'orange', 'olive'];

var theLevel:Number = 1;

trace (root ["wordArray" + likethis] .length);

but when I write it in this way, inside a function, I get an error:

function test (): void

{

var wordArray1:Array = ['test', 'Apple', 'orange', 'olive'];

var theLevel:Number = 1;

trace (root ["wordArray" + likethis] .length);

}

test();

I don't understand what I am doing wrong? Any ideas?

in the second case, wordArrays scope is limited to the function.

so when you try to address wordArray with root.wordArray, the main timeline is unclear on this issue.

simple solution: declare it outside the function.

var wordArray1:Array;

function test (): void

{

wordArray1 = ['test', 'Apple', 'orange', 'olive'];

var theLevel:Number = 1;

trace (root ["wordArray" + likethis] .length);

}

test();

Tags: Adobe Animate

Similar Questions

  • (Newbie question) Interval syntax question / explanation of the error

    Ok. So I reach into a big ticketing system based on Oracle (64 bit 11g 11.2.0.1.0) where they store 'ticket-open-time', 'ticket-fixed-time' and the interval of 'time-to-repair. Initially I wanted to calculate the number of minutes of the time of repair. 6 hours and countless Google searches later, I'm not about to the appropriate syntax. I was able to work around the problem through a simple calculation based on the values open and resolved. What I can't understand, is why I can't apply the same syntax extract just the interval field.

    Here's a simplified query that works:

    SELECT
    To_char (OpenTimeGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "OT".
    , TO_CHAR (ResolvedTimeGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "RT".
    , TO_CHAR (TimeToRepairGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "TTR".
    excerpt (days of day (ResolvedTimeGMT - OpenTimeGMT) the second) "days".
    excerpt (time of day (ResolvedTimeGMT - OpenTimeGMT) the second) "hours."
    excerpt ((ResolvedTimeGMT - OpenTimeGMT) minute second day) "Minutes."
    , (extract (day of (ResolvedTimeGMT - OpenTimeGMT) day to second)) * 24 * 60 +.
    (extract (hour of the day (ResolvedTimeGMT - OpenTimeGMT) the second)) * 60 +.
    extract (minute since (ResolvedTimeGMT - OpenTimeGMT) second day) "TotalMinutes".
    FROM there where

    Which produces:
    [OT] 24/09/2012 20:06:29
    [RT] 26/09/2012 13:56:13
    [TTR] 4000/02/01 17:49:44 - Note the year.
    [Days] 1
    [Hours] 17
    [Minutes] 49
    [TotalMinutes] 2509

    The question:
    When I write [extract (minute of day (ResolvedTimeGMT - OpenTimeGMT) the second) "Minutes"], I get 49 minutes I expect

    When I write [extract (minute since (TimeToRepairGMT) second day) "Minutes"], I get an error "syntax error was found in the interval value expression.

    The three fields are declared as 'date' DESC command (even if TimeToRepairGMT is clearly an interval, based on the value of "4000/02/01 17:49:44" ""). While I can plough with my work-around, I really want to know how to deal with intervals that are stored in Oracle tables as dates. Any help is appreciated!

    Hello

    Welcome to the forum!

    966091 wrote:
    Ok. If I am living in a large (64 bit 11g 11.2.0.1.0) Oracle-based ticketing system

    Thanks, that's very useful. Always give your version (11.2.0.1.0) whenever you post a question.

    where they store 'ticket-open-time' and "ticket-fixed-time" interval "time-to-repair. Initially I wanted to calculate the number of minutes of the time of repair. 6 hours and countless Google searches later, I'm not about to the appropriate syntax. I was able to work around the problem through a simple calculation based on the values open and resolved. What I can't understand, is why I can't apply the same syntax extract just the interval field.

    Here's a simplified query that works:

    SELECT
    To_char (OpenTimeGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "OT".
    , TO_CHAR (ResolvedTimeGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "RT".
    , TO_CHAR (TimeToRepairGMT, ' ' the HH24: MI: SS DD/MM/YYYY) "TTR".
    excerpt (days of day (ResolvedTimeGMT - OpenTimeGMT) the second) "days".
    excerpt (time of day (ResolvedTimeGMT - OpenTimeGMT) the second) "hours."
    excerpt ((ResolvedTimeGMT - OpenTimeGMT) minute second day) "Minutes."
    , (extract (day of (ResolvedTimeGMT - OpenTimeGMT) day to second)) * 24 * 60 +.
    (extract (hour of the day (ResolvedTimeGMT - OpenTimeGMT) the second)) * 60 +.
    extract (minute since (ResolvedTimeGMT - OpenTimeGMT) second day) "TotalMinutes".
    FROM there where

    Which produces:
    [OT] 24/09/2012 20:06:29
    [RT] 26/09/2012 13:56:13
    [TTR] 4000/02/01 17:49:44 - Note the year.
    [Days] 1
    [Hours] 17
    [Minutes] 49
    [TotalMinutes] 2509

    The question:
    When I write [extract (minute of day (ResolvedTimeGMT - OpenTimeGMT) the second) "Minutes"], I get 49 minutes I expect

    When I write [extract (minute since (TimeToRepairGMT) second day) "Minutes"], I get an error "syntax error was found in the interval value expression.

    The three fields are declared as 'date' DESC command (even if TimeToRepairGMT is clearly an interval, based on the value of "4000/02/01 17:49:44" "").

    In fact, it is more likely that it is just a DATE, who got the year wrong somehow. Show how you have assigned values to these columns.

    While I can plough with my work-around, I really want to know how to deal with intervals that are stored in Oracle tables as dates. Any help is appreciated!

    The intervals are difficult to work. I suggest that you use very little, or not at all. Keep the storage points in time as DATEs, but store the length of the time as a NUMBER; either the number of minutes, hours, or days, depending on what is appropriate for your data and your business needs best.

    Let's say you decide to keep TimeToRepair as the number of minutes, the length of time of OpenTImeGMT to ResolvedTimeGMT. When you subtract one DATE from another in Oracle, the result is a NUMBER, the number of days between these two DATEs. To get the number of minutes, which multiplied by the number of minutes per day. So the forumla for TimeToRepair is

    (ResolvedTimeGMT - OpenTimeGMT) * 24 * 60
    

    If you store the length of time as a NUMBER, it is very easy to get totals and averages.

    If you want to display this number of minutes like days hours: minutes: seconds, then you can use an INTERVAL, but just for display. Use the NUMTODSINTERVAL function to convert the NUMBER to an INTERVAL DAY TO SECOND:

    NUMTODSINTERVAL (TimeToRepair, 'MINUTE')
    

    I hope this helps you.
    Whenever you have a question, it is useful to show an example of what you have tried and what results you want to get. Post CREATE TABLE and instructions INSERT for examples of data and the results you would get from these data. You will get answers sooner if your question is specific. "How work intervals?" is a very difficult question. Many people who can help you to not trying to answer a question as broad. But if you can formulate your question as: "I need help understanding intervals. Beginning with this data... I tried thinking it would follow... but instead, I got... Why is this? The manual SQL language, to... says..., why is... happening? ", and then it will be easier to help you.

  • Table MC AS3 n00b question

    OK I loaded xml in video clips created dynamically, and when the user clicks on these other dynamically created clips video clip appears with more info loaded in XML. My question is how can I go back the information individually for each clip instead of all at once. My code:

    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.events.MouseEvent;

    var theXml:XML;
    var loader: URLLoader = new URLLoader();
    var mcArray:Array = new Array();
    var boxArray:Array = new Array();
    Loader.Load (new URLRequest ("template.xml"));
    loader.addEventListener (Event.COMPLETE, loadXML);
    function loadXML(e:Event):void
    {
    Check = new XML (e.target.data);
    for (var i: Number = 0; i < theXml.name.length (); i ++)
    {
    var theMC:MovieClip = new MovieClip();
    var theText:TextField = new TextField();
    theText.text = theXml.name [i]. @ Title;
    theText.x = 20;
    theText.y = 40;
    theText.selectable = false;
    theMC.addChild (theText);
    theMC.graphics.beginFill (0xff0000);
    theMC.graphics.drawCircle (50,50,50);
    theMC.graphics.endFill ();
    theMC.x = theMC.width * i;
    theMC.name = "mc" + i;
    mcArray.push (theMC);
    mcArray [i] .addEventListener (MouseEvent.CLICK, moClick);

    var descBox:MovieClip = new MovieClip();
    var descText:TextField = new TextField();
    descText.height = 100;
    descBox.graphics.beginFill (0xff0000);
    descBox.graphics.drawRoundRect (0,0,100,200,10,10);
    descBox.graphics.endFill ();
    descBox.name = 'box' + i;
    descBox.addChild (descText);
    boxArray.push (descBox);
    mcArray [i] .addChild (boxArray [i]);
    descText.text = theXml.name [i]. @ Title + ":"+ theXml.name [i]; ".
    boxArray [i] = mcArray [i] there .height-70;
    boxArray [i] .visible = false;
    addChild (mcArray [i]);

    }

    function moClick(e:MouseEvent)
    {

    / * If I try to put a loop here obviously it would display all and when I try to target by e.currentTarget.boxArray [n] .visible = true;

    its not able to find the properties in the table and get the error:

    TypeError: Error #1010: a term is undefined and has no properties.

    to MethodInfo - 1)

    */


    }
    }

    Any help would be greatly appreciated, thank you!

    Load the data separately only must not serious.  I don't see a reason why you want to put a loop in the event handler.  If you add a descBox as a child of each object in mcArray, then you should be able to target the descBox using his name, but I would just change the name to be 'box' for each of them so that you can use the following syntax...

    MovieClip (event.currentTarget) .getChildByName ('box');

    That should be the object descBox, you have added as a child object theMC as long as you assign it the 'name' box (instead of 'box ' + i).

  • interpolation syntax question

    Dear list

    I have a question of basic syntax that I realized that I'm not very familiar with in flash8. It came when I tried to create a combobox to allow the user to choose different types of interpolation and the relaxation of the Tween class.

    I created two comboboxes, one with all the values of interpolation (Regular, Strong, elastic...) and the other with all values of acceleration (easeIn, easeOut...)

    When I trace the variable comboFunc below it draw a function, but once that I plug it on the method of tweenExtended nothing happens. It seems to interpolate all the same way.

    What I'm missing here?

    all the tracks are appreciated.

    Thank you

    Stephan



    -----------------
    var tweenType = [_root.growingTween.selectedItem.data];
    var easeType = [_root.growingEase.selectedItem.data];
    var comboFunc = [tweenType + easeType];
    This.Tween = new TweenExtended (this.ring, ["_xscale", "_yscale"], ([tweenType + easeType]), eval [this.ring._xscale, this.ring._yscale], [_root.getMinSize (), _root.getMinSize (), _root.getShrinkSpeed (), true);


    Not real clear about your code snippet. But I guess that you can store the name method acceleration under a label and the tween as the data class. Then use the selectedItem.data to the Tween class. But you can also watch the code attached for another example.

  • Java syntax question

    I'm sure it's very banal, but I saw this syntax used in the development of BlackBerry:

    //default gauge
        final GaugeField gf1;
        {
          gf1 = new GaugeField();
          gf1.setLabel("default gauge:");
          gf1.setValue(12);
          fields.addElement(gf1);
        }
    

    What is the purpose of braces here? There is no method/condition/iteration header before, then what is it in the code? I've seen this used in books and tutorials of BlackBerry. I can't find all the details on its use. Can someone shed light on this or point me to the material that covers this syntax? trivial, but it's probably...

    c it is a compound statement. in this block, all defined variables are no longer valid within this block. That's all.

  • other syntax question on two points

    I had learned that the meaning of ".." is to access the child nodes in XML.

    but I saw this in the flex source, < mx.skins.halo.RadioButtonIcon.as >

    override the updateDisplayList(w:Number,_h:Number):void function

    {

    ...

    ...

    g... beginFill (radioColor);
    }

    where the variable g is a graphics object. ordinary, it should be 'g.beginFill', I thought.

    now my question is, what does it mean ".." means?

    Thanks for any help.

    I think it's because Flex uses a structure tag (MXML) language, so the operator down ".." would be valid in a context of structure of nodes in Flex.

  • CSS syntax question

    "Now that I have my foot in the door), are there pieces read absolutely understand how Adobe Edge uses JQuery to advanced level a little more (not that I am). The JavaScript API gives some decent clues, but this isn't ASDocs with examples of use fully annotated.

    That said, what is the correct syntax to get and set the z-index of a symbol, I have create dynamically from the prototype in the Panel resources. Presents all works, but I still have to hit the correct syntax to set the depth of the symbol, which is hide other objects I need more closely in the foreground. It works:

    playNext() {} function

    Slovak ++;

    var audioID = "slide" + Slovak;

    playSound (audioID);

    var slideID = "slide_" + Slovak;

    sym.createChildSymbol (slideID, "Stage");

    but it does not work (EC.info you can consider an alert if you do not use Commons Edge)

    EC.info (sym.$('slideID').css ('z-index'));

    EC.info (sym. $(slideID).css('z-index'));

    EC.info (sym.$('slideID').zIndex);

    EC.info (sym. $(slideID) .zIndex);

    EC.info (sym.$('slide_1').css ('z-index'));

    EC.info (sym.$('slide_1').zIndex);

    EC.info (slideID.zIndex);

    }

    I'm close to one of them? Of course, I want to set the z-index but it would be a soft step.

    I also tried defining the child object, resulting in a variable with the same attempts, but nothing sticks yet.

    var mySlide = sym.createChildSymbol (slideID, "Stage");

    EC.info ("my slide is" + mySlide);

    EC.info (sym.$('mySlide').css ('z-index'));

    EC.info (sym. $(mySlide).css('z-index'));

    EC.info (sym.$('mySlide').zIndex);

    EC.info (sym. $(mySlide) .zIndex);

    EC.info (sym.$('mySlide').css ('z-index'));

    EC.info (sym.$('mySlide').zIndex);

    EC.info (mySlide.zIndex);

    Thank you very much.

    Ah, this works in your example rect (try to set the z-index of a negative):

    function showCover() {}

    myRectangle var = sym.createChildSymbol ("Slide1", "Stage");

    myRectangle.getSymbolElement (.css({"z-index":-100});))

    }

  • AS3 button Question

    Hey all,.


    My problem is this: I have a flash file in which I add MovieClips dynamically as buttons using a loop for. At each iteration, I add a new button, give it a name and add an event listener. My question is, with this method, how do I not know what button was clicked? In other words, say my for loop runs 5 times, adding 5 different buttons in 5 different places on the stage. Anyway is to leave in the code to determine which button has been activated? I feel like there should be a simple way to figure it out and I just lack.


    The code looks like this:


    for {(var aCount:String in pNameArray)


    This ["btn" + m1Count] = new buttonMC();


    This ["btn" + m1Count] .addEventListener (MouseEvent.MOUSE_OVER, select);

    This ["btn" + m1Count] .addEventListener (MouseEvent.MOUSE_OUT, leave);

    This ["btn" + m1Count] .addEventListener (MouseEvent.CLICK, goTo);

    This ["btn" + m1Count] .buttonMode = true;

    This ["btn" m1Count] .name plus 'btn' + m1Count;


    addChild (this ["btn" + m1Count]);

    function goTo(e:MouseEvent):void {}

    Code.

    }

    }


    Any advice or ideas would be greatly appreciated. Thank you.

    Don't include this feature inside the loop.

    The argument passed to the function can be used to identify the button that was clicked.  Given that you have assigned a name to the button property, you can make use of that.

    function goTo(e:MouseEvent):void {}

    trace (e.currentTarget.Name);

    }

  • O'Reilly book: AS3 essential Question page 29

    Hello

    I was hoping that someone has read or maybe this book by Moock has called «Essential AS3» I'm stuck on page 29, I want to understand what is happening here.

    package zoo {}

    Friend class VirtualPet {}

    petName internal var = "unnamed pet";

    public void VirtualPet (name) {}

    this.petName = name;

    }

    }

    }

    --------------------------

    Maybe it's simple and I'm making it bigger than it is. Please forgive me if I do not mention the correct sentences to the code that I learn.

    The "Unnamed pet" value is the value of the variable to petname and I understand that the code creates an instance via the var function. The restructuring next code [shown in the book don't here] they remove actually "="Unnamed pet";" as I assume that this is redundant since they added the code after him thus showing the reader that it is a placeholder for an idea of the past.

    The constructor function 'this.petName = name.' is shake me. If the variable is defined in the constructor? And "(name)" in the line of code above is the return value? Or it creates a link between the code and the ' = name: "below?

    The line of code "petName internal var ="Unnamed pet";" which is then reduced to "var internal petName;" is it because he is no longer a decisive value and is just a simple local variable needed to help start the constructor function under?

    Thanks for any input... I do my best to pass any info in this book do not confuse myself later.

    Yes, you have. There are several different flavors of variable. The importance of this is the scope or extent of the structure of code, when this variable is accessed. Variables are only containers of storage.

    Variables are defined outside a function so that they can be used in more than just only one function. If you set the variable inside a function, then it will recognize only inside the function. If you give the variable an initial value when you set it, then it has value first. There are times where you want an initial value and when it is not important. For example, if you set a Boolean variable, it is generally important to give an initial value. When you define a variable that will be used as a parameter in a function, it may be less important.

    There are only constructor function in a given class. Think of a class as a set of code that performs a single operation. In this example, VirtualPet made a single instance of a pet. VirtualZoo made on an instance of a zoo, which can contain one or more instances of VirtualPet.

  • New in AS3: stupid question about event listeners...

    Hi all

    I am a newbie in Flash and have a question about event listeners. I have a site I'm developing with a movie clip navigation which is composed of several buttons. What is the right way to write the event listener?

    Here's a sample of what I have:

    I have a clip called 'buttons_mc' that contains the symbols of individual button with various names such as "btn_history". So far, I don't have an instance name for the clip of the film itself.

    My event listener:

    btn_history.addEventListener (MouseEvent.CLICK, history);

    I have to put something before the "btn_history" which refers to the video? I get this error message:

    1120: access of undefined property btn_history.

    Thank you!!!

    Julia

    Yes, it is preferable to have at least one layer dedicated to actionscript.  I often use a couple... one for code shared (functions and variables) and a level of the frame code (stop(), etc.).

    The code must be in a scenario where the button is directly accessible.  If your button is accessible in frame 1, which means that it does not animate in place such that it is not really intended to be used until you get somewhere near the bottom of the timeline, then you can target the button of the timeline that holds the buttons_mc movieclip.  So as I described earlier, if you give this movieclip an instance name of "buttons", and then to assign a code to the button on the inside you should use...

    Buttons.btn_history.addEventListener (MouseEvent.CLICK, history);

    But if the button exists somewhere down the timeline inside the buttons_mc due to the animation of the button, which means that there is more than one key image for the button, then you must place the code that you have initially shown in the last keyframe to the bottom of the timeline where he set the button in place.

    .

  • Simple syntax question

    Hey everybody,

    I'm doing a match/replace with a template that contains special characters and run in syntax errors in a Flex 3 application. I want just the following regex to compile... (also replacing the html tags with "")

    value.replace(/</?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?>/g, "");

    On a side note, the pattern /<.*?>/g wouldn't work in cases where there are html entities between tags, 
    like so:
    
    <TEXTFORMAT LEADING="2">
    <P ALIGN="LEFT">
    <FONT FACE="Arial" SIZE="11" COLOR="#4F4A4A" LETTERSPACING="0" KERNING="0"><one</FONT>
    </P>
    </TEXTFORMAT><TEXTFORMAT LEADING="2">
    <P ALIGN="LEFT">
    <FONT FACE="Arial" SIZE="11" COLOR="#4F4A4A" LETTERSPACING="0" KERNING="0">two</FONT>
    </P>
    </TEXTFORMAT>
    
    The first regex would get both "<one" and "two", but the second would only get "hi"

    Thank you!

    L stabby

    This one works for me:

    value. Replace(/<\ \w+((\s+\w+(\s*="\s*(?:" .*?"|'.*?'|[^'""="">\s]+))?) +\s*|\s*)\/?>/g, "");

    (Same as yours, but hot escaping the /)

    Are < and=""> special characters can only be between tags? [in this case, even if /<.*?>/g wouldn't work, able to /<><>] *? > / g be enough?

  • Simple task - syntax Question (how do you pass variables from one component to another component - databinding)?

    Hi all

    I'm moving some width/height/URL of a Video Player component to a Social Bookmarking component incorporate text entry field. (for people capture and share videos).

    I know that it's a simple task, but it's the end of the day and I seem to have a brain failure... What is the syntax to achieve this? Do I have to import the video player component? These widths/heights/URLs are all generated dynamically by a XML... should I be pulling the XML or reuse just variables already existing in the Video Player component?

    Here is my code...

    Video player:

    [Bindable]

    var public source: String = "";

    [Bindable]

    public var autoPlay:Boolean = false;

    [Bindable]

    public var fullScreenMode:Boolean = false;

    [Bindable]

    public var clipTag:String = '_movie;

    [Bindable]

    public var iag_code:String = "";

    [Bindable]

    public var officialURL:String = "http://www.movies.com/"; ""

    [Bindable]

    public var referer:String = 'unknown ';

    [Bindable]

    public var gID: String;

    [Bindable]

    public var starterImageURL:String = 'http://www.movies.com/jazzmaster/images/default_starter_image.

    [Bindable]

    public var oldWidth:Number;

    [Bindable]

    public var oldHeight:Number;

    Component sharing:

    < mx:HBox

    Height = "10%".

    horizontalCenter = "-25".

    Red = '0 '.

    paddingBottom = "5" >

    < mx:Text text = "" Embed Code: "paddingTop ="1"color ="#FFFFFF"fontSize ="12"/ >"

    < mx:TextInput text = "{oldWidth}" / >

    < / mx:HBox >

    The above code generates an error... "Any attempt of property inaccessible oldWidth via a reference with a static type com:SharingBookmarks."

    Thank you all!

    DK

    Try this...

    Create a flex project and add a folder called 'src '.

    create a new component MXML named "VideoComp.mxml" and copy/paste

    http://www.Adobe.com/2006/mxml"width ="400"height ="300">

    [Bindable]

    public var videoWidth:int = 300;

    [Bindable]

    public var videoHeight:int = 300;

    ]]>

    create a new component MXML named "SharingComp.mxml" add copy/paste this...

    http://www.Adobe.com/2006/mxml"width ="400"height ="300">

    [Bindable]

    public var videoWidth:int;

    [Bindable]

    public var videoHeight:int;

    ]]>

    and here's the main.mxml file

    http://www.Adobe.com/2006/mxml '.

    xmlns:src = "src.*" >

    private void doSomething (): void

    {

    sharingComp.videoHeight = videoComp.videoHeight;

    sharingComp.videoWidth = videoComp.videoWidth;

    }

    ]]>

    Hope this helps,

    BaBo,

  • Flashback database syntax question

    EE Oracle 10.2.0.4 on OEL 5

    This should be a matter of syntax simple, right?

    Practice some scenarios to return back and looking at the syntax to
    http://download.Oracle.com/docs/CD/B19306_01/backup.102/b14194/rcmsynta032.htm#sthref515

    In the examples, they show a
    RMAN> FLASHBACK DATABASE TO TIMESTAMP
       TO_TIMESTAMP('2002-03-11 16:00:00', 'YYYY-MM-DD HH24:MI:SS');
    but the real syntax diagram does not show an option "TIMESTAMP", just "on TIME" and "AHEAD of TIME".

    Based on, let's try a simple test
    RMAN> flashback database to time = '18-MAY-2010 12:50:00';
    
    Starting flashback at 18-MAY-2010 13:10:00
    using channel ORA_DISK_1
    
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of flashback command at 05/18/2010 13:10:00
    ORA-01830: date format picture ends before converting entire input string
    Hmm, okay, then what format does? In fact, he reported in two different formats:
    Starting flashback at 18-MAY-2010 13:10:00
    and
    RMAN-03002: failure of flashback command at 05/18/2010 13:10:00
    If pressing on some others, let's try that should be obvious:
    RMAN> flashback database to time = to_date('05/18/2010 12:50:00','mm/dd/yyyy hh24:mi:ss')
    
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "double-quoted-string, single-quoted-string"
    RMAN-01008: the bad identifier was: to_date
    RMAN-01007: at line 1 column 30 file: standard input
    
    
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "(": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 37 file: standard input
    
    RMAN>
    Built on the docs and other resources on the web, I find several variations on the theme, but all end up throwing one of the errors above.

    I can't believe, I've been reduced to what should be a matter of doc, but in this case, it's the documentation examples which throw errors. I'm going blind? The brain cell was killed by that I had last week of beer criticism? ;-)

    From:

    RMAN> flashback database to time = to_date('05/18/2010 12:50:00','mm/dd/yyyy hh24:mi:ss')
    
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "double-quoted-string, single-quoted-string"
    RMAN-01008: the bad identifier was: to_date
    RMAN-01007: at line 1 column 30 file: standard input
    

    Could you please try adding double quotes around the expression date?

     flashback database to time = "to_date('05/18/2010 12:50:00','mm/dd/yyyy hh24:mi:ss')";
    
  • SQL loader syntax question

    SQL * Loader: release 11.1.0.7.0 - Production on Wed Mar 18 07:21:37 2010

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    SQL * Loader-350: at line 1 syntax error.
    Expecting keyword SUPPORT, found "DI".
    DIA¡±a
    ^

    My sqlldr file looks like this:

    sqlldr control=C:\data\ctl\ss.ctl log=C:\data\logs\ss.log userid = user/password errors = 999 discard=C:\data\discard\ss.dis

    control file looks like this:

    DOWNLOAD THE DATA
    INFILE ' C:\data\SS. TXT' "STR"\r\n"
    REPLACE
    IN THE SS TABLE
    FIELDS TERMINATED BY '; '.
    TRAILING NULLCOLS
    (
    ACCOUNT_NBR TANK,
    ADDR1 TANK,
    ADDR2 TANK,
    ADDR3 TANK,
    ADDR4 CHAR,
    TANK OF THE CITY,
    STATE TANK,
    POSTCODE TANK,

    .......
    more columns are all the same syntax and char column name
    )

    I can load this table using enterprise manager but when you use the sqlldr his does not work.
    Something stand out?

    Published by: mlojan on March 18, 2010 05:33

    The only thing I can think is some characters problem between the file of control and operating system/oracle server.

    You have the control file using a text editor such as Notepad or wordpad haven't you? You have not used something like MS Word?

  • MathScript syntax question

    One can tell me why it does not compile.  I get a red X on the last line, and the variable LampV is shown in red and is output.

    I seem to have a problem using multiple conditional statements in a script.

    Deleting the last conditional statement removes the error.  The error refers to the last line and said ' line 14, column 1: expected EOF, found "end"

    Thank you

    If (RadLampV > IrrLampV)
    Bench = "Radiance."
    CradleT = RadCradT;
    LampV = IrrLampV;
    LampT = IrrLampT;
    on the other
    LampV = RadLampV;
    CradleT = RadCradT;
    LampT = IrrLampT;
    Bench = "O_Irradiance";
    end;
    If LampV<>
    Bench = 'unknown ';
    end;

    I think your mistake is perhaps than your second if the statement is capitalized. Try to replace 'If' with 'if '.

    Kevin C.

    National Instruments

Maybe you are looking for

  • Hello to Firefox says something went wrong and firm.

    Hello. I am trying to use the video chat program, Hello Firefox. I start a new conversation with no one guest. I see myself on the screen, which means that Hello has access to my camera. But after a second or two, the vision of the videochat box disa

  • iPhone is blocked and is not turned off of either

    Hello. I was updating my iphone to the latest iOS version 9.3. Everything is going well, and then he started to check the update. A few seconds later, a message box appears saying that iOS 9.3 could not be updated because connectivity issues and the

  • new printer not found "LaserJet Pro 100 color MFP M175a" "scan."

    Hello I just installed and tested my new printer "LaserJet Pro 100 M175a MFP color". In the first test to copy a completely black page is out. Scanner is also 'not found '. Should I is it possible for me to find the solution to the problem or I have

  • 10.11 back to earlier versions

    Problem with the compatibility of the OS X 10.11 with third party software.  Given that I've improved 10.7 can I come back to say 10.10?

  • Satellite P500 a bad performance in windows 7

    I have a satellite P500, model No. PSPE8C-026006 for 3 years. Core 2 Quad Q9000 @ 2.00 GHz, 2.00 Ghz, 6 GB Ram, 1 TB HD.64 bit windows 7 OS. Even if it is 3 years old, it is still decent Spec This laptop is preforming really kicking up. It took 10 mi