Help (retrieving image name from xml then will be echoed inside the movieclip
Hello guys, I just want to ask sometihng on how to show the image inside the movieclip by pulling the image name inside the xml file.
this is my xml file.
<?php
header("Content-type: text/xml");
$host = "localhost";
$user = "root";
$pass = "";
$database = "test";
$gelo= "image1.jpg";
/*xml output*/
$xml_output = "<?xml version=\"1.0\" ?>";
$xml_output .= "<GALLERY>";
$xml_output .="<IMAGE>" . $gelo . "</IMAGE>";
$xml_output .= "</GALLERY>";
echo $xml_output;
?>
//this is the code inside my actionscript
stage.scaleMode = StageScaleMode.NO_SCALE;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT
loader.addEventListener(Event.COMPLETE, loadCompleteHandler);
loader.load(new URLRequest("http://localhost/loadimagefromxmlAS3/data.php"));
function loadCompleteHandler(event:Event):void {
var xml:XML = new XML(event.target.data);
//txt.text = xml.toXMLString();
trace(xml.IMAGE[0]);
var list:XMLList = xml.data.title
var loader:Loader = new Loader()
this["holder_mc"+0].addChild(loader)
loader.load(new URLRequest(list[0].IMAGE))
When I run it in flash, I got the error
image1.jpg
TypeError: Error #1010: A term is undefined and has no properties.
at xml_fla::MainTimeline/loadCompleteHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
I hope you will consider my ignorance since im a beginner using the actionscript. Thank you
1) You should have "Permit debugging" enabled in Publish settings so you could tell exactly witch line is wrong
2) This line makes no sense to me: var list:XMLList = xml.data.title
Change it to var list:XMLList = xml.IMAGE;
3) loader.load(new URLRequest(list[0].toString()));
4) Also this line is suspicious: this["holder_mc"+0].addChild(loader)
Why don't just say: holder_mc0.addChild(loader)?
Similar Messages
-
Hi, I have an XML file that I loaded into Flex converting it
into an arrayCollection.
If I want to retrieve the node name rather then the node
content, how do i do?
For istance:
<root>
<node1>content1</node1>
<node2>content2</content2>
</root>
What I would like to do is to assign the text "node1" or
"node2" to a variable of my Flex project.
Is this possible?
Many thanks to who may help.I think easiest way is to use e4x. look here :
http://livedocs.adobe.com/e4x -
Retrieving Images Embedded In XML (from rss using xsl)
I am trying to comsuem and rss feed into my site but i dont seem to see an "image" element in the Item node. can someoen tell me how to retrieve Images Embedded In XML dreamwaever. i am using an xsl fragment on a pap server.
DohHi there, I am using a jsp page that takes a xml page from the internet (user defines what page it is) it then takes the xsl feed and transforms the xml with a TransformerFactory object to get the results as an html page, the error is received when the jsp page is called
Ian -
How to retrieve user name from a given Subject?
I am in a situation where I need to retrieve user name from the Subject that is populated when user logs in. I have the active Subject and I do following to get the principals in the subject and iterate through them:
Set principals = subject.getPrincipals();
Iterator ite = principals.iterator();
while (ite.hasNext()) {
Principal prin = (Principal)ite.next();
String name = prin.getName();
But this contains all the principals, including user name, roles, password, etc. How do I programmatically determine which one is user name?Don't you have different principal types? I am making a jaas module and I have different principals for roles, groups etc. I think of principals as attributes, the type in the attribute name and the principal name is the attribute value.
To get all the principals of the type SomePrincipal, you can use:
Set principals = subject.getPrincipals(SomePrincipal.class)
You can also take som principal an test wether it is an instance of som type:
if (Principal p instanceof SomePrincipal){..}
An other solution which might be better if you have many different attributes is to store both attribute name and value in the name of the principal.
If "mark" is a username the principal name will be "username:mark" el.
Then it will be easy to find the username. -
So we just got a new Macbook and I also installed the apple configurator tool. I'm using it to prepare the iPads for deployment and it won't let me prepare them? It gets an error stating "retrieving iOS info from apple" then it stops and says "internet error". My Internet connection is fine with the Mac-book. It shows the iPad is listed under the Prepare logo up top as 1 but under supervise none are shown. Although it does show itself in iTunes. Also the profile I created is fresh and has no errors. We have tryed nearly everything I cna think of and online forums are not giving us to much info on this error.
A wag at this. A port issue?
"Apple Push Notification network setup
When MDM servers and iOS devices are behind a firewall, some network configuration may need to take place in order for the MDM service to function properly. To send notifications from an MDM server to Apple Push Notification service, TCP port 2195 needs to be open. To reach the feedback service, TCP port 2196 will need to be open as well. For devices connecting to the push service over Wi-Fi, TCP port 5223 should
be open."
http://www.google.com/url?sa=t&rct=j&q=ports%20ios%20configure%20ipad&source=web &cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fimages.apple.com%2Fipad%2Fbusiness%2Fdocs%2 FiOS_MDM.pdf&ei=5lXGUPCcJMXx0gH2wYG4BA&usg=AFQjCNFzINvs7ktT-6o6Q_l4Qk2HkpjtCA&ca d=rja
google: ports ios configure ipad
Try it on your home network where there isn't a lot of 'controls' -- network filtering , firewalls, etc.
Robert -
Syndicate Images(name) from MDM
Hi All,
as syndication of image file is not possible from MDM, and we can only syndicate image names from MDM. Say we have a record in MDM and an image(ABC.jpg) attached to it. Now we edit that record and add another image(DEF.jpg) to it. Now if we want to syndicate the record only with the new image(DEF.jpg), MDM doesn't allow this feature as an out of box functionality.
Is it possible to achieve this using JAVA API's and how, or is there any workaround available for this, on which some one has worked.
Regards
ManishHi,
Try this.
Create a time stamp field in the repository and specify Image field as selected field property for time stamp. So this field will hold time when image is changed for the record. Now in syndicator use this time stamp field and specify filter to select all the records which have image changed after last syndicatin date (you need to know last syndication date in this case, which is easy) for record selection . In this way you can acheive your requirement. But you may face problem if Image Field is multivalued. Because in that case it will syndicate names of all the images, and not only new images names.
Regards,
SHiv -
I get error message each time I try to retrieve image (BLOB) from Oracle
Can anyone help me?
I am working with Servlet and JDBC with Oracle database. I can insert an image (GIF file) in a Oracle
table in a BLOB field. But everytime I want to retrieve it
I got an error "AbstractMethodError". My retrieve program (only the main part) is as below:
String dbURL="jdbc:oracle:thin:@200.200.100.2:1521:tvm";
String db_username="PROJ1"; String db_password="PROJ1";
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch(ClassNotFoundException e1){ }
try{
Connection c=DriverManager.getConnection(dbURL,db_username,db_password);
// Retrieving image file from database
RandomAccessFile raf=new RandomAccessFile("//Davison/jakarta/webapps/examples/images/a10.gif","rw");
PreparedStatement pstmt2=c.prepareStatement("Select fname,photo From testtable1 where fname=?");
pstmt2.setString(1,"rere100");
ResultSet rs=pstmt2.executeQuery();
while(rs.next()){
Blob blobImage=rs.getBlob("photo");
int length=(int)blobImage.length();
byte[] blobArray=blobImage.getBytes1,length);
raf.write(blobArray);
raf.close();
Please help me soon, my email is: [email protected]
Bye , ReaProbably a bit late, but I just got the same problem.
Oracle seems to instantiate a class which is not fully defined-
oracle.sql.BLOB. This class has abstract methods, and is therefore
an abstract class.
In short, Oracle are stupid fools. How they managed to instantiate
an abstract class in the first place should be of concern to the
Java gurus, however. Native code in the OCI driver perhaps?
If you still need help, you could try uning the Thin driver- or
a database with a JDBC driver which actually meets the spec. There
are third party Oracle drivers which might fit the bill- they
usually cost money, however. -
Retrieve Operation Name from WSDL
Hi All,
In a text box any WSDL can be given as input but its operation name should be displayed in a combo. Let me know how to retrieve operation name from WSDL. I want the java coding to be written in backing bean class.
Thanks,
Maanickka.Hi,
the reference to a WSDL file produces a XML document to be returned. So you need to parse that document for methods. Have you tried this?
Frank -
Whenever I try to sync music to my ipod from itunes, it will go through all the steps up until it actually downloads the music, then it starts, and doesnt move. Why wont it download anything?
Try here:
iTunes: Error 13019 during sync
Not updating the iOS should not effect your problem.
As long as all the apps are in the iTunes library, you will not lose app data by updating the iOS. -
If the ipod is being bought from USA then will the warranty be valid in India?
if the ipod is being bought from USA then will the warranty be valid in India or not?
Yes
-
File name from an attribute of an element of the payload
Dear Experts,
Could you suggest the syntax for specifying the file name from a variable in the file receiver communication channel? I need to grab the file name from an ATTRIBUTE of an element of the payload.
Thanks a lot.
Example: Need to pass the attribute "descReceipt" of the element "promotionEvent" to the variable in the following payload:
<?xml version="1.0" encoding="UTF-8"?>
<promotionExport>
<promotionEvent eventIdentifier="30" status="A" descReceipt="FILE1">The scenario is IDOC to FILE. I need to get the value of the receiving partner.
The message header has the node "DynamicConfiguration". Please see the xml below. I need to grab the key RCVPRN (0000002104) from this and pass as the file name in the receiver file adapter.
How do I setup my receiver file adapter for this? I tried changing the values for the variable, and also enabling the adapter specific message attributes. No solution yet.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">LXDCLNT250</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">0000002104</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPLCD</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">LCDCLNT220</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP" />
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">WPDBBY01</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">WPDBBY</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">KU</SAP:Record>
</SAP:DynamicConfiguration> -
How can I make albums from events then delete events without deleting the album?
Hey, just need a little help!
How can I make albums from events then delete events without deleting the album?
Many thanksYou'll be more likely to get help with this if you ask in the iPhoto forum:
https://discussions.apple.com/community/ilife/iphoto
You'll need to tell people what version of iPhoto you have so they can give you correct advice.
Regards. -
I wanted to purchase iPad from apple store, will they give me the VAT refund VAT407 form?
If the ipod is still under warranty and Apple determines it to be defective then they will replace.
-
I have read the HT4627 but I think my original question is more specific Our new iphone5 id name is the same as an existing still in use iphone4 in the family; if I remove the devise; change its name can I then immediately associate it with the correct name.
You can change the name of a device on it via Settings > General > About > Name - you shouldn't need to remove the association and then reassociate it.
-
If I want to delete other people's iCloud accounts from my phone will it interfere with the backups on their phones?
Hello Stacey140
You should not have an issues with removing accounts and messing with others users backup. As long as you are not removing the main account that is yours that you use for back up, everything will be fine.
iCloud: iCloud storage and backup overview
http://support.apple.com/kb/PH12519
Thanks for using Apple Support Communities.
Regards,
-Norm G.
Maybe you are looking for
-
Editing an Adobe Forms Central form
I have an old form created in Adobe Forms. How do I get into edit mode?
-
Why is the process opendirectoryd running on my ML MBP? I am not running any server software
Lots of entries in the system log: Feb 10 13:50:55 MacBook-Pro.local authorizationhost[6960]: in pam_sm_authenticate(): OpenDirectory - The authtok is incorrect. Feb 10 13:50:59 MacBook-Pro.local authorizationhost[6960]: in pam_sm_authenticate(): Ope
-
What is the best resolution for adding and viewing pictures/images in ibooks?
I'm trying to add pictures/images and I was wondering what the best resolution is for viewing? Any help would be great.
-
Will camera connection work with sdhc card
I just got a camera connection for my new ipad and I have a sdhc card and it is not reading it. Does it not support this card?
-
i tried to restore my iphone 3GS with the OS 5.1.1 but failed and itunes show an unknow error (29), what can i do? my phone is usless now Somebody help!