Load value one by one from xml as3
Hi all
I want to load value of xml.item.slika and use it to generate the link to the image
XML file:
<gallery>
<item>
<id>1</id>
<strana>0</strana>
<naslov>Lokacije</naslov>
<aktuelno>1</aktuelno>
<slika>1.jpg</slika>
</item>
<item>
<id>2</id>
<strana>2</strana>
<naslov>Coaching</naslov>
<aktuelno>1</aktuelno>
<slika>2.jpg</slika>
</item>
<item>
<id>3</id>
<strana>0</strana>
<naslov><![CDATA[O.Å . Bratstvo - panel]]></naslov>
<aktuelno>0</aktuelno>
<slika>3.jpg</slika>
</item>
</gallery>
Function:
function ucitaneSlike(evt: Event): void {}
var xml = new XML (evt.target.data);
var slika:String = ";
var loader: URLLoader = new URLLoader();
for each (var xml... {point)
Slika += item.slika;
Loader.Load (new URLRequest (domen + ' podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+ ' /' + slika + "?" + new Date () .getTime ()));
centralniText.htmlText = ' < a href = "javascript:popUp(\''_+_domen_+'podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+_'/'_+_slika_+_'\')" > < img src = "'+ domen +'podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+" / "" + slika + ' "height ="50"width ="50"> < / has > ';"
vScrollBar.update ();
}
}
I get the result:
localhost/podaci/igraci/slike/1/1.JPG2.JPG3.jpg
Oh, if you want your textfield to display all links, use:
kglad wrote:
Use the following to get the good reference for each item slika. If the rest of these urls are correct or not, I don't check:
function ucitaneSlike(evt: Event): void {}
var xml = new XML (evt.target.data);
var slika:String = ";centralniText.htmlText = "";var loader: URLLoader = new URLLoader();
for each (var xml... {point)
Slika = item.slika;Loader.Load (new URLRequest (domen + ' podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+ ' /' + slika + "?" + new Date () .getTime ()));
vScrollBar.update ();
}}
Tags: Adobe Animate
Similar Questions
-
Bought one from Best Buy Apple Watch that had been returned. Original purchaser cannot be contacted. The phone is synchronized to their account, how can I sync to mine?
You can not. Take it back to Best Buy and ask for a refund.
-
Hello
How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.
Thank you
Jay.
Hi if your task is running an informatica mapping you can set your DAC task to run the full mapping for incremental and full loads, so tab task just point to the mapping.
Hope that helps.
Thank you
-
Recently I upgraded my laptop to one from the same supplier so all I had to do was to upgrade a few drivers on the hard drive. My copy of ADE is unfortunately not too cooperative. Whenever I try to download an eBook, I get the message "E_AUTH_BAD_DEVICE_KEY_OR_PKCS12". Uninstall ADE (three versions), as well as cleaning the registry does not clear the error. And I can't cancel and reauthorize my new laptop as to authorize is greyed out. Anyone else having this problem?
Problem solved finally. Used regedit.
https://helpx.Adobe.com/Digital-Editions/KB/error-e_act_not_ready.html
-
(Edited for clarity 13:16's)
OK thanks to Greg, I have this with a redirect built in barchart:
This is my simple histogram:
< mx:BarChart = x "561" y = "198" id = "CapitalExpenditures" dataProvider = "{I}" width = "762" showDataTips = "True" fontSize = "12" height = "371" >
< mx:verticalAxis >
"< mx:CategoryAxis categoryField="@type "/ >
< / mx:verticalAxis >
< mx:series >
"< displayName = 'Spending' xField="@balance mx:BarSeries ' fill = race "{sc1}" = "{s1}" labelFunction = "formatNumber.
Click = "navigateToURL (new URLRequest (rptWebsite))" >
< / mx:BarSeries >
< / mx:series >
< / mx:BarChart >
It works very well, but rather than hard code the URL, I would like to get from XML data that are already loaded into the system and assigned to a XMLList "di". My XML file is structured as follows:
<>projects
"< prName work = hours of 'One-project' = '705.50' rptUrl = ' http://www.google.com" / > "
"< prName work = hours of project 'B' = '370.00' rptUrl = ' http://www.yahoo.com" / > "
< / project >
What I want to do, use the URL of the XML file, under the name of rptUrl as the URL path in my re - direct.
I tried to put everything in navigateToURL (new URLRequest (@rptUrl) "> in but could not compile.")
My confusion is the place where to insert the value in the URL variable and precisely what syntax to use? I have to use e4X for example?
I created this function to my redirection:
public void goUrlTFP(event:MouseEvent):void
{
' rptWebsite =' http://www.google.com "
navigateToURL (new URLRequest (rptWebsite)) return
}
It compiles, but I get nothing in the variable.
I'm using the wrong syntax? I have to do something other than a mouseEvent of my function? Should I trigger the function somewhere else to the click event? I have to browse the file and fill a XMLList or something?
I tried rptWebsite=item.@rptUrl and rptWebsite=ceDs.@rptUrl, but those who could not compile
M.M, without trying to sound like I'm raggine on you (yet), I'm curious to know how you go about detective your way through the API to come up with possible solutions. What is your thought process? I wonder if it wouldn't you get more if you provide some tips on how to use the API correctly. Teach you to fish instead of giving the fish (for setting the proverb a little).
I certainly did not know the answer to your problem just a few minutes ago, but it's literally what it took me to find what I think can be an answer to your problem.
You have defined your features such as:
Click on a bar chart and have it redirect to a URL that does not exist in the dataProvider of the histogram.How can we get these data to URL? The first thing to check would be click events. We look at the possible events that can be shipped when clicking the chart element (BarSeries) or component BarChart himself. When you look at the 'click' for the two event I wasn't expecting much in the measure where this event carrying additional information that I might be able to use, it's just a simple click event. And if I did event.currentTarget, there is no property that directly gives me the data I'm looking. However, in the API, I see an event type itemClick ChartItemEvent (under events) for BarChart which seems promising.
Then I look in the API to ChartItemEvent and note that there is a property "hitData" type HitData which seem also promising. Now I look at HitData in the API and see that there is a property "item. It's more likely that the element that is used to render the particular BarSeries I clicked on. So I think that I can easily get the related data on an itemClick event.
I tried and it was of course the data that I expect. I can remember something painfully obvious and much simpler to obtain these data, but I think this thought process shows that with a little effort, you can get a few runs in the API that you will probably have your solution. I doubt there is anyone on this forum who knows everything there is to know about the API. Use the docs, they are your friend.
BTW, what is the other language that you are more familiar with what you're talking about from time to time?
TS
-
Update of a column of table from xml data
Hello
I have an obligation to update a particular table from xml data column. to do this, I wrote the code below but I am not able to insert. could you please a peek into that.
create table emp3 as select *From emp where 1=1; alter table emp3 add (fax_response varchar2(50)); /*create sequence EmailRecords_XMLFILE_SEQ minvalue 1 maxvalue 999999999999999999999999999 start with 1 increment by 1 nocache;*/ /* create global temporary table EmailRecords_XMLFILE ( ID NUMBER not null, xmlfile CLOB ) on commit preserve rows;*/ /* create global temporary table UPD_Email_Records_With_Xml ( id NUMBER not null, response VARCHAR2(500) ) on commit preserve rows; */
the XML data is
<FAX> <EMAILOG> <ID>7839</ID> <RESPONSE>FAX SENT</RESPONSE> </EMAILOG> <EMAILOG> <ID>7566</ID> <RESPONSE>FAX NOT SENT</RESPONSE> </EMAILOG> </FAX>
CREATE OR REPLACE PROCEDURE proc_upd_email_records ( loc_xml IN CLOB, p_err_code_out OUT NUMBER, p_err_mesg_out OUT VARCHAR2 ) IS loc_id NUMBER; BEGIN loc_id := emailrecords_xmlfile_seq.NEXTVAL; --created sequence INSERT INTO emailrecords_xmlfile --created Global Temp table (ID, xmlfile ) VALUES (loc_id, loc_xml ); COMMIT; insert into UPD_Email_Records_With_Xml --created Global Temp table (ID, RESPONSE) select x1.id, x1.RESPONSE from EmailRecords_XMLFILE, xmltable('/FAX/EMAILOGID' passing xmltype.createxml(EmailRecords_XMLFILE.xmlfile) columns header_no for ordinality, id number path 'ID', RESPONSE VARCHAR2(250) path 'RESPONSE' ) x1 where EmailRecords_XMLFILE.id = loc_id; COMMIT; UPDATE emp3 er SET er.fax_response = (SELECT response FROM upd_email_records_with_xml pr WHERE pr.ID = er.empno) WHERE er.empno IN (SELECT ID FROM upd_email_records_with_xml); EXCEPTION WHEN NO_DATA_FOUND THEN raise_application_error (-20000, 'Sorry ! The Xml File which is passed is empty. Please try with Valid Xml File. Thank you!!! ' ); WHEN OTHERS THEN p_err_code_out := 4; p_err_mesg_out := 'error in insertion=> ' || SQLERRM; END proc_upd_email_records; {code}{code}
Someone suggest me a slightly easier way to insert data...
Thank you...
You're complicating things
A simple MERGE statement will do.
create or replace procedure (proc_upd_email_records)
loc_xml in clob
)
is
Start
merge into e emp3
a_l'_aide_de)
Select id
response
from xmltable)
"/ FAX/EMAILOG.
by the way xmlparse (document loc_xml)
the columns id number way "ID".
, path of varchar2 (250) response 'RESPONSE '.
)
) v
on (e.empno = v.id)
When matched then update
Set e.fax_response = v.response
;
end;
/
But there is no value added by using these temporary tables if you are not at least an intermediate XMLType column (storage preferably binary XML).
-What is the input XML code?
-What is the version of db?
-
to retrieve data from xml data type
Hello...
I have a doubt in the oracle database... Here's how to retrieve data from xml data type?Like this...
SQL> ed Wrote file afiedt.buf 1 with t as (select xmltype(' 2
3') as xml from dual) 12 -- 13 -- end of sample XMLDATA, use below query on your own table etc. as required 14 -- 15 select x.* 16 from t 17 ,xmltable('/DETAILS/FIELDS_VALUES/FIELD' 18 passing t.xml 19 columns name varchar2(30) path './NAME' 20 ,val varchar2(10) path './VALUE' 21* ) x SQL> / NAME VAL ------------------------------ ---------- toMonth 5 ctTestPan 1 costType 2 toYear 2012 fromMonth 12 fromYear 2011 6 rows selected.4 11 5toMonth 5 6ctTestPan 1 7costType 2 8toYear 2012 9fromMonth 12 10fromYear 2011 -
Please, give me an advise how to search for a number in a file xml (as3.0)
Hello! Sorry for the troubling.
Please, give me an advice how to search for a number in a file xml (as3.0)
Thank you!
My answer was based on your question to find numbers anywhere in the data to an xml file. If you know that the data is digital data and the names of the nodes that contains this data, you do not have to check the characters and can only check numerical data using string values...
function searchXMLFile(Event:MouseEvent):void
{
searchDisplay.text = "";
var pageList:XMLList = xmlFileToSearch.receipt.number;
searchDisplay.text = "false";
for (var i: int = 0; i< pagelist.length();="">
{If (pageList [i] == searchInput.text) {}
searchDisplay.text = "true";
}}
}Even if you are looking for individual digital characters in the previous code that you would have always done by a false exit due having the line 'false' always cancel the real line...
If (t.toString () .indexOf (m_sSearchTerm)! = - 1).
{
searchDisplay.text = "true";
}
searchDisplay.text = "false"; This will always overwrite the textfield
-
Hallo,
I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.
I need to go to the second page the value of a field on the line that is selected on the first page.
How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?
Thank you
F.
Why would user, you need to pass a value of the line to the shape?
The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.
Timo
Post edited by: Timo Hahn
And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf -
Loading values... is displayed in the drop-down list
Hi all
(1) loading values... get appears in the drop-down list in the new form of consignment and the update form.
I tried several options to solve this problem as restarting the virtual machine, the schema again unsuccessfully to edition.
There is no error in the logs.
Please suggest what to do?
(2) I created a component of filter customized and wrote a RIDC code performs a validation on the metadata. How can I display the error message as a pop-up on the content server over the consignment in case of validation failure.
Thank youthrow new ServiceException (msg);
-
A simple way to load a pdf page into flash with as3
Hallo,
is there a simple way to load a pdf page into flash with as3 at Flash.
I mean no plug in or as a class.
Thank you.
If it is an air application, you can use the htmlLoader.
Otherwise, you can use navigateToURL but that only opens 'in' your swf, and you cannot manipulate the PDF with actionscript.
-
How to pass the value of the Timestamp from one Page to another
From a column report link, I need to pass a DATE (that includes both) form one page to the next. If I use the basic name/value pairs under the section of the column link, the URL stops when it encounters a colon. For example, '2012-05-08 16:38 ' invades as ' 2012-05-08 16 "»
In addition, all values after the colon in the DATE value are removed from the URL.
I know not why this is happening. This is because oracle sees the ":" and this is a field terminator does not assume.
How can I work around this problem? I saw the post suggesting the API URL_ENCODE but, I can see someone to call this, or any other code in the section of the link column. I've also seen some people suggest that this be done as a conditional branch. Simularly, I can't find in any case to call the branch section of the link column.
There must be a way to pass this value, and I can't be the first person to ever attempt this. I am totally stuck and have spend hours on this issue.
Thank you
-JoeAs fac586 said, you wouldn't have this problem if RISKDM2. INTRADAY_VM_CLEARER has a primary key, you can reference instead. Still, can you guarantee that the date will be unique?
If so, suggested use fac586 of 'YYYYMMDDHH24MI' format mask for the link, but set the value of a hidden point new (say PX_HIDDEN_PARAM_ITEM). The last step then on the page that you are linking, have simply a page process that defines the element of effective date of to_date (PX_HIDDEN_PARAM_ITEM, 'YYYYMMDDHH24MI'). This before the process that brings back the record and after that should work just fine.
-
Loading problems burned a program from one pc to the laptop.
Original title: program does not load
Ive burned a program from a pc on a disc and load on this laptop... problem, it's the files and program is split top and not a program. How can I get these to work please
Hi Andy,.
If you copied the program files and the desktop shortcuts, then you will not be able to load it on the other computer. You can only copy the installation files and try to load the program on another computer.
-
How to pass the value of the element from one form to another form?
Hi all
I need your help to complete this task.
I have a form page named reserve form.i have some five fields selection list in the form of reserve, after I chose the first value from the selection list, I create a button in the form of reserve, when I click on the button create, it will open another form page named set form in this form page , I have a field selected, the list of values in configure the form depends on the values selected as a reserve, it means that I have to change the value of page of a form to another form.
Please suggest a solution, how to pass the value?
Thank you
Robette.Check out the button create on Page 8.
In the Action when the button is clicked, the configuration is
The value of these P35_IT_PRODUCT
With these values & P8_IT_PRODUCT.Kind regards
-
Hi all
I don't know how to extract the POLICY of XML value which is 25000.
Here's what I got tired.
SELECT extractvalue (COLUMN_VALUE, ' / Member/MemberId ') MemberID,.
ExtractValue (' COLUMN_VALUE, ' / Member/membership/MembershipKey/Key / * ') PolicyID
TABLE (XMLSequence (xmltype (')))
< member >
MRD000200 < MemberId > < / MemberId >
< 00 > BenefitRecordId < / BenefitRecordId >
< membership >
< MembershipKey >
< issuer > CBA < / transmitter >
< key name = "ABC_DIVISIONS" Id = "A_5" / >
< / MembershipKey >
< MembershipKey >
< issuer > CBA < / transmitter >
< key name = 'POLICY' Id = "25000" / >
< / MembershipKey >
< MembershipKey >
< issuer > CBA < / transmitter >
< key name = "SECTION" Id = "E22" / >
< / MembershipKey >
< / membership >
< / member >
'
() .extract ('/member')));
I want the rest of output
Member ID PolicyID SECTION
MRD000200 25000 E22
Please suggest.
Thank you.One way is like this:
SELECT extractvalue(COLUMN_VALUE, '/Member/MemberId') MemberID, extractvalue (COLUMN_VALUE, '/Member/Membership/MembershipKey/Key[@Name="POLICY"]/@Id') PolicyID, extractvalue (COLUMN_VALUE, '/Member/Membership/MembershipKey/Key[@Name="SECTION"]/@Id') SectionID FROM TABLE(XMLSequence(xmltype('
MRD000200 00 ABC ABC ABC
Maybe you are looking for
-
Fixes for a slow 2007 Macbook?
Girls 2007 MacBook is really slow! Have you tried dumping programs, emptying trash and now computer is still slow. Any suggestions for me, please?
-
G6-2030SL: Paviolion G6-2030SL graphics card update
Hello I would upgrade my AMD Radeon HD 7670 M graphics card, but I found nothing on the internet. Can I upgrade my gpu? In the case of, what gpu should I get?
-
What channel configuration should I use: nickname?
I have three terminals of signal; a, a V0 and a V1, with V0 and V1 measured relative to the ground terminal common ground. There is some contamination of noise in the environment, so I can't ignore the field common and just wire V0 as the Center wir
-
Hello I have a 4 GB FUZE and I put a card inside. I have synced albums mp3 on the map SD of WMP (Vista 32). It works very well! But when I read the name of the artist or album on the "rocket", the name is 'Unknown'. Albums of same in the "rocket" (no
-
First Clip: problem downloading on youtube
Try to upload videos to YouTube and fails each time. Takes forever to load, gets to the end and then get an error msg stating that it is unable to download and try again later. Any ideas? Thank you!