Note that there are some explanatory texts on larger screens.

plurals
  1. POData Provider problem
    primarykey
    data
    text
    <p>While running following code ,I got the error message as below,</p> <pre><code>function urlLoader_complete(evt:Event) { XMLdata=(evt.target.data).toString(); XMLdata=XMLdata.split("&amp;lt;").join("&lt;"); XMLdata=XMLdata.split("&amp;gt;").join("&gt;"); xml=new XML(XMLdata); **fnctn();** } function fnctn() { var tp:int = bulb1 + bulb2 + bulb3 + bulb4; if(tp == 1) { **gep.addItem(new Object());** gep[gep.length-1].voltage1 =evt.result.Array.Voltage.Val; gep[gep.length-1].current1 = evt.result.Array.Current.Val; gep[gep.length-1].voltage2 = 0; gep[gep.length-1].current2 = 0; gep[gep.length-1].voltage3 = 0; gep[gep.length-1].current3 = 0; gep[gep.length-1].voltage4 = 0; gep[gep.length-1].current4 = 0; } </code></pre> <p>Error is</p> <pre><code>ReferenceError: Error #1065: Variable evt is not defined. at vi_fla::MainTimeline/fnctn()[vi_fla.MainTimeline::frame2:449] at vi_fla::MainTimeline/urlLoader_complete()[vi_fla.MainTimeline::frame2:436] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() </code></pre> <p>The two lines with errors are marked in the above code...what will be the reason for this error?</p> <p><em><strong></em>**<em>*</em></strong><em>UPDATE</em><strong><em>*</em>**<em>*</em>****</strong></p> <p>Now I have modified the code as below.</p> <p>function fnctn(evt:Event) </p> <p>{ var tp:int = bulb1 + bulb2 + bulb3 + bulb4;</p> <p>if(tp == 1)</p> <p>{</p> <pre><code> ChartDataProvider1.push(xml.Value.Array.Voltage.Val.text()) ChartcategoryNames.push(); trace("value= "+xml.Value.Array.Voltage.Val.text()) </code></pre> <p>}</p> <p>}</p> <p>Now there is no error while running,But trace value shows no values. It shows as Value=</p> <p>How this problem can be solved?</p> <p><em><strong></em>**<em>*</em>****</strong><em>UPDATE</em><strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>****</strong></p> <p>I modified code as below </p> <p>var ChartcategoryNames:Array=new Array();</p> <p>var ChartDataProvider1:Array=new Array();</p> <p>var lineArray1:LineSeries=new LineSeries();</p> <p>if(tp == 1)</p> <p>{</p> <pre><code> ChartDataProvider1.push(xml.graph.Voltage.text()); ChartcategoryNames.push(); trace("hi= "+xml.graph.Voltage.text()); yAxis = new NumericAxis(); yAxis.maximum=10; yAxis.minimum=0; yAxis.majorUnit=2; Exp_Content.input_mc.in_graph.verticalAxis=yAxis; //Exp_Content.input_mc.in_graph.dataProvider=ChartDataProvider1 lineArray1.dataProvider=ChartDataProvider1; </code></pre> <p>}</p> <p>Now the trace hi shows correct values,which is also seen in ChartDataProvider1.But lineArray1 does not have any values...Please suggest a solution for this problem..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload