question of the event: event ['data']

The following function is within a class of the YouTube API that the I found Googling.  It manages the state changes copied this function in my application because I need to listen to and consume some of the same events.  My function is triggered at the right times except this ['data'] event throws the following home runtime error.

ReferenceError: Error #1069: property not found on flash.events.Event data and there is no default value.

--

private void onPlayerStateChange(event:Event):void {}

/ / Event.data contains the parameter of the event, which is the new player State

var stateIndex:Number = event ['data'];

{switch (stateIndex)}

case 0: clearInterval don't (this.updateInterval); break;

case 1: updateInterval = setInterval (function (): void {})

currentTime = player.getCurrentTime () * 1000;

}, 500); break;

box 3: this.duration = this.player.getDuration () * 1000; break;

}

this.dispatchEvent (event);

}

--
Thanks for you help,
VC

this.loader.content.addEventListener ("onStateChange", onPlayerStateChange);

The content is of type DisplayObject, but the runtime is loaded a subclass of

DisplayObject. This object is dispatching onStateChange, is probably a custom

event with property inside data. However, the Manager is registered with the

class generic event that works for the custom event extends to the base event

class.  Your man is to avoid the compilation error by type table

event syntax ['data'] instead of an event.data object. I don't know what

event type is the contents of your shipment but it sholud be a data

property inside, because the one you use now of course didn't. That's why

the error only at run time and no compilation.

C

Tags: Flex

Similar Questions

  • Question about the events of list management

    I searched in the circles of a response to this problem for a while now.

    Background information:

    I have an application that uses a number of listservs. However, some end users have complained about this particular control since you not only have select from the popup LOV, but you then have to click on the 'Add' button until the selected value will be submitted to the page. They would like me to display some callback types click on 'Add' when a value is selected, but not yet added.

    I found the names of the different elements of the list manager and created a simple javascript function to change the background color of the text box where the selected value is displayed and attached that work to the onchange event.

    My problem is that if something enter the text box fire the onchange event, by clicking on the 'Add' button does not work. In other words, I can put a red background (or whatever I end up doing) if they have not yet added value, but I can't put it right back when the user clicks on 'Add '. The best work around I came uses the list manager onmouseover event, but is not as clean as I like it.

    The 'Add' button has an onclick (obviously) the events that first calls a function "appendToList" and then deletes the text box.

    {color: #0000ff} & lt; "input type ="button"name =" "value ="Add"onclick =" appendToList (return [0].p_v99.value.toUpperCase (), return [0] .p_v04); return [0].p_v99.value = "" / & gt;

    {color} {color: #000000} The appendToList function is defined in the body of the page, just forward to the & lt; fieldset & gt; tag that creates the list manager, leading me to believe that there is a template somewhere.

    Question:

    Is it possible to edit the template for the list manager so that I can call my function when the user clicks on the button "add"?

    or

    Is it possible to redefine the function appendToList somewhere on this page, so I can place a call to function within this function?

    or

    Is there another way to restore the appearance of the text box when the user clicks on the button 'Add' that I thought not again?


    Thanks for any help you can provide. This is bugging me. {color}

    Hello

    I think that what follows may work for you.

    Suppose you have a component called P4_LIST_MANAGER list manager. Add the following code in the Footer area of the region setting:

    <script type="text/javascript">
    var lm = document.getElementById("P4_LIST_MANAGER_ADD");
    lm.onchange = function()
    {
     if (lm.value.length > 0)
     {
      lm.style.backgroundColor = 'red';
     }
    }
    var lmfs = document.getElementById("P4_LIST_MANAGER");
    lmfs.onclick = function()
    {
     if (lm.value.length == 0)
     {
      lm.style.backgroundColor = 'white';
     }
    }
    </script>
    

    The main problem you see is that for an input element onchange event is not raised when its value is changed via javascript on the page. The above assumes that the user has clicked in the area of field set to use either the Add or Remove buttons, and then resets the background color.

    Andy

    Published by: ATD 15 January 2009 19:02

  • Calendar deletes the event data when upgrading to icloud

    Hey there,

    When I add an event to the calendar on my mac app I add details (time and title), but once the application updates to icloud details disappear and the default event is the title of 'New event' and the time of the default event. 09:00.

    I even tried to change preferences to only refresh every 15 minutes give me to add the event and then updated, but it still does not work.

    Maybe this will help.

    Calendar may not enter the new event.

    Calendar may not enter the new event (2)

  • Question about the event thread

    Hello world

    I need to perform a lot of Http 'Get' and 'Post' requests If I'm not directly interacting with the UI (event thread), then I need to put the class managing http requests in its own thread?

    Any advice would be appreciated, thanks!

    You should not run any operation (such as an HTTP GET or POST request) blocking or no matter how long processing thread in the case. If you do, you run the risk of allowing the event queue overflow while you have this thread do something else, which will cause your app ending with the system.

    You must always start a worker for any HTTP operation thread.

  • A few questions about the use of data and Cliq

    I have the cliq, however I chose to not get 3G (so I bought full fare). So I have a few questions about the phone and the use of 3G / 2 G/Edge:

    1 - is possible to disable completely the 2G / 3 G/Edge? I know you can switch between them, but are anyway just tell the phone to stop using them altogether since I'm not subbed to the service?

    2. when the update takes place, I guess we'll have to reconnect motoblur and etc, but if I don't have 3 G will I have motoblur connection problems after the update? Or he keeps the latest wifi settings so that it would connect to wifi to connect. When I first got my phone it was not a problem b/c I had 3G for the first month.

    I hope that makes sense, thanks!

    To stop all the data, I would like to download an application called APNDroid. He cut them all down. When you log on to blur you have 3G or WIFI doe this without getting a timeout error. During the process of setting up your Blur account, you can press the menu button and set up your wifi to work, this will connect you to Blur and your phone will be connected to the blur. If I were you I would be rethinking to do a data plan since you are really losing out on most of your main features of phones. It's your choice, however.

  • Question about the reports and data of rollups

    We followed in place that I need to create monthly reports. There is a custom agent that collects two key all measures that can be used to define a percentage of system availability. They check essentially two types of errors that may occur together or individually. I have not really used reports in Foglight but has spent a good amount of time to play with them today. The main problem/issue I have at this point is how to deal with the accumulation of data. Our retention policy performs three stacks of separate data in a month, how can you effectively report on these data rolled upward?

    Example: one of the agents simply return a 0 if the system is ok and 1 if it finds the error. In the end, we just need to know how many times that 1 has been returned in a month. How would one accomplish? If the sum is for example, 40 for a total of 4 hours is that it means that he met the 40 times error? The frequency of the agent is set to 60 seconds, so that would mean 40 minutes of time error...?

    The other control agent returns specific error codes and not a simple binary value. If the above example or the question is trivial I still don't know how to deal with this one...

    Most likely, you can use the value of the sum for the metric, just as you might have guessed.  Because the value is 0 or 1, the amount will be the total of the values for the time period.  There are also a number of samples, which should / could be higher because there might be 0.

  • A few questions about the design of Data Guard

    Hi, I have a few basic questions around design Data Guard

    Q1. Looking at the instructions of Oracle for the creation of a logical standby, he recommends first creating a physical standby and then convert waiting logic. However, I thought that a logical standby might have a totally different physical structure of the primary. How can this be the case if a logical standby first starts his life pending physical (where the structure must be the same)?

    Q2. It is a normal practice to back up your database before as well - if yes why?

    Q3. Can RMAN back up a database of the day before while he is in the State mounted (rather than opening it)?

    Q4. What is the point of cascade redo apply rather than just get the primary ship to each standby?

    I guess you could try to reduce the latency of node to node if some the day before were quite remote from the primary

    Q5. Is it possible to convert a physical logical Standby?

    Q6. What number best of Standby, you can have - Oracle suggests 30 but I thought I remember reading somewhere regarding the 11 GR 2, that this limit has now been increased?

    Thank you

    Jim

    Hello again;

    "begins each logical waiting first her life on hold physical?"

    Its the only way I ever did. I think it is the simple way to do it.  By the presence of a physical standby first you have already confirmed the network and most of the settings for Data Guard so that you can focus on only the logic of the standby database configuration.

    Chapter 3 of this book, it's easy:

    http://www.Visi.com/~mseberg/data_guard/new_dg_book.html

    Best regards

    mseberg

  • Question about the management of data Cache OBIEE 10g / 11g.

    Hi friends,

    I have a question: how we can find the display of data in the report (in the answers or dashboard) if Cache or paintings of DW? y at - there no mechanism for this? I know that normally we can find data in tables of aggregation using file view log. Can you please help on this and I would really appreciate your help.

    Cheers!
    Srini

    Add the suggestions above, to find the query caches

    1. use followed - cache_ind_flg O/N indicates whether or not the application has reached the cache.
    2 NQQuery.log will show "cache hit" (if not you will see SQL to the physical database)

    There is no mechanism to track if it hits the browser cache / cache of presentation server.

    I hope this helps...

  • Question on the form of data - implicit sharing

    Hello

    We have a data form that the user can down to the level 0 in the rows to enter data. The question is for some customers when the user tries to enter data at the client level 0 is not save the number of entry but get substituted automatically with the parent value. If the user has entered in the parent customer was filling too the same value for the client to level 0.

    When I checked in the outline... I noticed that they are customers who had only one child, and I guess that this happens because of the property on the part of the implicit. I don't know if there could be another reason to do this. If I am wrong please correct me.

    Now, I know that if you change the property of the customer parent to share never, it might solve the problem. But the problem here is - there is a lot of these customers. And each month we receive new clients that could belong to the same case. It would be difficult to go and change the property to share ever for all customers and keep track of it manually. It might be a maintenance problem.

    So is there any other solutions? We can sort it solve? Please let me know your suggestions or ideas on what you think would be the best way to resolve this problem.

    Any ideas are appreciated.

    Thank you!
    ~ Hervé

    Hi Gwen,

    You can disable the implicit sharing in the Essbase.cfg
    When you set the parent members and children store, you create blocks more in the database, so use with discretion.

    http://docs.Oracle.com/CD/E17236_01/EPM.1112/esb_tech_ref/impliedshare.html

    In addition, if you leave the parent on the form, you should be able to write data to the child.

    Kind regards
    Robb Salzmann

  • Questions on the aggregation of data for parents

    Hi guys,.

    I have two questions.

    One, once I have enter data in the leaf level, values aggregate to their parent except period dimension. The aggregation method is elsewhere, conservation never share type and data type is currency. Should provide the member formula to calculate the value for high level members?

    Two, some nonleaf members need their own values. For example, a business in the entity dimension unit has some departments. Apart from the consolidation of departments, the BU needs a budget for itself. But members nonleaf cells are read-only. How to deal with my situation?

    Thank you

    You can't, not in a release from the bottom up. You can allot of bu1_ to his brothers and sisters. Or you can use the version of up and down, to parents of input values and allocate up to nonleaf members.

    See you soon,.
    Alp

  • Question about the java.util.Date class.

    The book I read said, class Date represents a value int long since January 1, 1970.


    I created a class of Date like this


    long mesh = 2000L;
    d.setTime (st);
    System.out.println ("new time is =" + d.toString ());

    When the above code, ultimately she prints the date as follows.

    New schedule is = Wed Dec 31 16:00:02 PST 1969

    No idea why the printed date before 1970? I expect the date to be a value greater than 01, January 1970.

    Welcome to the forum!
    >
    The book I read said, class Date represents a value int long since January 1, 1970.

    I created a class of Date like this

    long mesh = 2000L;
    d.setTime (st);
    System.out.println ("new time is =" + d.toString ());

    When the above code, ultimately she prints the date as follows.

    New schedule is = Wed Dec 31 16:00:02 PST 1969

    No idea why the printed date before 1970? I expect the date to be a value greater than 01, January 1970.
    >
    Because of the way as the setTime method is defined. What time zone do you use?

    http://docs.Oracle.com/javase/1.5.0/docs/API/Java/SQL/date.html#SetTime (long)
    >
    setTime
    Public Sub setTime(long date) defines an object Date existing using time value given in milliseconds. If the value of milliseconds given contains time information, the driver will set the components at the time in the default time zone (zone of the Java virtual machine running the application) which corresponds to zero GMT.

  • put question in the form of data

    I have a SSN or EIN number field. The xml output must be in the format 123-45-6789 or 12-3456789 depending on whether the entity is a person or a company. I have a few other areas, I can probably use to trigger one format rather than the other, but I don't know if I can selectively format a field in several ways.

    Is this possible and if so, does anyone have a sample or a script that could do that?

    I know that I could view messages, postings and others on the ground, but it would be a better user experience, if she has been formatted endangered in this way, users can enter the data of some sort that they were comfortable. Thanks for your suggestions!

    Hello

    I did some tests and it seems that change the picture for text objects clause has no effect.

    This also does not work when you use the terms of the alternative image with different regional settings

    Thus, the only way I've found is to format the data with the Format() method in FormCalc.

    var source = $.rawValue
    var formattedSource
    
    if (AcctOpenProcesssubform.CSSystemSetupForm.Account_Client_Info.personalCust_domicile.US_Citizen.rawvalue eq "us") then
      formattedSource = Format("XX-XXXXXXX", source)
    else
      formattedSource = Format("XX-XXX-XXXX", source)
    endif
    
    $.rawValue = formattedSource
    
  • Question about the use of dates

    Hello

    I have a few SQL used for a calendar in the APEX and have a duration field to set the end date.

    What I need is an additional field that would be a date, but I need a registration for all dates in the date from beginning to end date, including all the dates between the two.
    select ID
             ,VISIT_DATE
             ,duration
             ,VISIT_DATE + round(DURATION)-1 END_DATE
    from FIELD_VISITS_CALENDAR
    
    Results
    
    ID     |VISIT_DATE|DURATION     |END_DATE
    -------------------|------------|---------
    241     |22-JAN-09 |     .5     |22-JAN-09
    239     |16-JAN-09 |     .5     |16-JAN-09
    242     |23-JAN-09 |     2     |24-JAN-09
    237     |08-JAN-09 |     1.5     |09-JAN-09
    221     |12-DEC-08 |     2     |13-DEC-08
    233     |23-DEC-08 |     1     |23-DEC-08
    238     |15-JAN-09 |     1     |15-JAN-09
    240     |09-JAN-09 |     1     |09-JAN-09
    
    Wanted results
    
    ID |VISIT_DATE|DURATION       |END_DATE  |CAL_DATE
    ---|----------|---------------|----------|---------
    241|22-JAN-09 |     .5     |22-JAN-09|22-JAN-09
    239|16-JAN-09 |     .5     |16-JAN-09|16-JAN-09
    242|23-JAN-09 |     2     |24-JAN-09|23-JAN-09
    242|23-JAN-09 |     2     |24-JAN-09|24-JAN-09
    237|08-JAN-09 |     1.5     |09-JAN-09|08-JAN-09
    237|08-JAN-09 |     1.5     |09-JAN-09|09-JAN-09
    221|12-DEC-08 |     2     |13-DEC-08|12-DEC-08
    221|12-DEC-08 |     2     |13-DEC-08|13-DEC-08
    233|23-DEC-08 |     1     |23-DEC-08|23-DEC-08
    238|15-JAN-09 |     1     |15-JAN-09|15-JAN-09
    240|09-JAN-09 |     1     |09-JAN-09|09-JAN-09
    
    
    {code}
    
    Thanks
    Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Like this?

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 241 as id, to_date('22-jan-2009','dd-mon-yyyy') as visit_date, 0.5 as duration from dual union all
      2             select 239, to_date('16-jan-2009','dd-mon-yyyy'), 0.5 from dual union all
      3             select 242, to_date('23-jan-2009','dd-mon-yyyy'), 2 from dual union all
      4             select 237, to_date('08-jan-2009','dd-mon-yyyy'), 1.5 from dual union all
      5             select 221, to_date('12-jan-2009','dd-mon-yyyy'), 2 from dual union all
      6             select 233, to_date('23-jan-2009','dd-mon-yyyy'), 1 from dual union all
      7             select 238, to_date('15-jan-2009','dd-mon-yyyy'), 1 from dual union all
      8             select 240, to_date('09-jan-2009','dd-mon-yyyy'), 1 from dual)
      9  --
     10  select distinct
     11         id
     12        ,visit_date
     13        ,duration
     14        ,visit_date+(case when rn < round(duration) then rn else 0 end) as end_date
     15  from t, (select rownum-1 rn from dual connect by rownum <= (select max(duration) from t)) x
     16* order by t.id
    SQL> /
    
            ID VISIT_DATE   DURATION END_DATE
    ---------- ---------- ---------- ----------
           221 12/01/2009          2 12/01/2009
           221 12/01/2009          2 13/01/2009
           233 23/01/2009          1 23/01/2009
           237 08/01/2009        1.5 08/01/2009
           237 08/01/2009        1.5 09/01/2009
           238 15/01/2009          1 15/01/2009
           239 16/01/2009         .5 16/01/2009
           240 09/01/2009          1 09/01/2009
           241 22/01/2009         .5 22/01/2009
           242 23/01/2009          2 23/01/2009
           242 23/01/2009          2 24/01/2009
    
    11 rows selected.
    
    SQL>
    
  • event data for the asynchronous timer

    My application uses an asynchronous timer to read analog and digital signals that are then loaded in a thread safe queue. The main part of the application unloads the queue, displays values and updates the locations of graph and also writes data to a file on disk.

    Asynchronous timer runs every 40 millisecs, show various updates run 5 times per second and the data is written to a file every second.

    Among the data elements is an entry SSI of lifting height, which, at this data rate should be increased to 25mm per second, or 1 mm each scan. I get a lot of variations in this reading, ranging from 0.3 mm to 1.7 mm and these variations seem to occur during updates of the display or the data file is written. I thought that using the async timer I would be safe from Windows Update problems, it runs in a separate thread.

    An earlier version used a timer Panel in which I was able to use the event data to show that timer interruptions were indeed affected by the activity of the screen. The async timer event data seem to zeros, whereas the event data of timer Panel that held a version of the hour and the time elapsed since the last interruption of the timer. How can I check that the async timer is interrupted at the right time?

    Reminder timer Asyncronus has the same exact structure of the timers UIR one, except for the first parameter, an integer that in the reminder timer UIR, holds the handle of the Panel the timer while it is reserved in the callback of the asynchronous timer. This means that the eventData parameter holds the information on the time elapsed in th eprogram, passed as pointers to values double. To read this information, you must operate this way:

    totalTime double, timeFromLastTimer;

    totalTime = *(double *) eventData1;      Time to start the program

    timeFromLastTimer = *(double *) eventData2;     The last reminder of timer time

  • Display today date + 10 days or show the date of the event if this is earlier.

    I have created an agreement form PDF.

    I would like to have the deposit due 10 days from "Date of the day" or the "EventDate", whichever comes first.

    currently it shows the date of the day + 10 days but sometimes the event date is earlier than that.

    Thank you all in advance!

    This script can be used for the filing date:

    document level scripts;
    function GetField (oDoc, cName)
    {
    get the object field with error checking.
    oField = oDoc.getField (cName);
    if(oField == null)
    {
    App.Alert ("Error to the field named" + cName + "\nPlease check the spelling of the domain name and capitalization.', 1, 0");
    }
    return oField;
    } / / end GetField function;

    Scand (cFormat, cDate) function
    {
    convert date stirng date with error checking object;
    Kai var = util.scand (cFormat, cDate);
    if(oDate == null)
    {
    App.Alert ("Date of conversion Error" + cDate, "using the format" + cFormat + "\nPlease verify that the date is valid", 1, 0);
    }
    Return to oDate;
    } / / end Scand function;

    function Date2Num (oDate)
    {
    convert the date object to the number of days since the EPO / / date of ch;
    set the time at midnight of the date;
    oDate.setHours (0, 0, 0, 0);
    convert milliseconds to days;
    Math.ceil (oDate.getTime (return) / (1000 * 60 * 60 * 24));
    } / / end of function Date2Num;

    function Num2Date (nDays)
    {
    Convert number of days date object.
    Back to oDate = new Date (nDays * 1000 * 60 * 60 * 24);
    } / / end Num2Date funciton.

    SetDate() function
    {
    If (GetField(this,_"Today").valuesAsString == null |) GetField(this,_"Today").valuesAsString == "")
    {
    var oToday = new Date(); get the date system;
    oToday.setHours (0, 0, 0, 0); Set to midnight;
    GetField(this,_"Today").value = util.printd ("dd-mmm-yyyy", oToday);
    }
    return;
    }
    Set the field to today's date.
    SetDate();
    end document level scripts;

    Event.Value = ""; Turn off the field;
    get the field objects and field values;
    var cToday = GetField(this,_"Today").valueAsString;
    var cEvent = GetField(this,_"Event").valueAsString;
    var cDateFormat = "dd-mmm-yyyy";
    If (cToday! = "" & cEvent!) = "")
    {
    objects convertdate to days;
    var oTodayDays = Scand (cDateFormat, cToday)
    var nTodayDays = Date2Num (oTodayDays);
    var oEventDays = Scand (cDateFormat, cEvent);
    var nEventDays = Date2Num (oEventDays);
    Make sure that the date of the event is not before the date of the day;
    If (nEventDays<>
    {
    App.Alert ("event date cannot be before the date. today', 1, 0);
    }
    on the other
    {
    Assume that filing date is the date of today + 10 days
    var nDepositDays = nTodayDays + 10
    If (nEventDays<>
    {
    nDepositDays = nEventDays;
    }
    fixed date of filing;
    Event.Value = util.printd ("dd-mmm-yyyy", Num2Date (nDepositDays));
    }
    }

Maybe you are looking for