XMLConnector And Dynamic Text
Hi,I have a text inside a xml file and i would like to display this text in a dynamic text field, using the xmlConnector.The files are at the following address: www.mais3marketing.com/xml.zipthanks,peter
Adobe > Flash Data Integration
Posted on: 09/01/2007 01:13:14 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
XMLConnector And Dynamic Text
Hi,
I have a text inside a xml file and i would like to display this text in a dynamic text field, using the xmlConnector.
The files are at the following address: www.mais3marketing.com/xml.zip
thanks,
peter
How To Set The Xmlconnector Properties (xmlconnector.url) Using A Combobox
hi guys, I'm tryin to make an application using a combobox component, xmlconnector component, dataset and datagrid component. The application should be able to load an xml file choose by the user using a combobox instance on the stage, sounds pretty simple, until I hit the fact that the xmlConnector.url method wouldn't load the local xml I was trying to load, it keeps saying "Error opening URL" eventhough the trace result of the variable already correct...
can anybody help me?.. I've surfed the net and found other people have been asking the same problem, but not an answer, not even the ADOBE/Macromedia people have a clue in their website.
my deadline is approaching, and all I get so far is a headache,
XMLConnector To Text Boxes?
Hey guys im using the xmlconnector to insert an xml file. I need it to load an image so im using the loader component which is fine, but i need to load the text into a dynamic text box. Is this possible cos i can only seem to do it with a text area component which i dont want. Or can i make a text area component have no border or shading or anything and format the text inside?, so it looks like plain text on the page.
URL With XMLconnector ?
peepz,
how can i give a $ to my PHP doc with a XMLconnector? so i send my data with one XML connector and recieve it with another connector!
script at keyframe 1:
Code:
stop();
_root.myReceiveXMLConnector.trigger();
listener = new Object ();
listener.afterLoaded = function (evt) {
trace ("ready");
dataSet = evt.target;
dataSet.first ();
i = 0;
while (dataSet.hasNext() ) {
trace (dataSet.categoryName);
var temp_mc = _root.e_mc.attachMovie("button", "b" + i, i);
temp_mc.btn_txt.text = dataSet.categoryName;
temp_mc._y = - 100 + i * 26;
temp_mc.categoryID = dataSet.categoryID;
temp_mc.onPress = function () {
gotoAndPlay(2);
trace (this.categoryID);
// flashkit peepz: i want to send an URL if i press on the button so it gives my categoryID to my php Document.
}
dataSet.next ();
i ++;
}
}
_root.myDataSet.addEventListener ("afterLoaded", listener);
i heard i also have to tweak the URL in the XMLconnector (inspector)...
my PHP script looks like:
PHP Code:
<?
include "connect.php";
$categoryID = .........;
//flashkit peepz: i have to get the categoryID from the XML connector on the dots "........."
$content = ("SELECT * FROM photos WHERE photos.cid = ".$categoryID."");
$result = mysql_query ($content);
?>
<photolisting>
<?php while ($row = mysql_fetch_array ($result)) { ?>
<photo>
<photoID><?php echo $row["id"]; ?></photoID>
<photoTitle><?php echo $row["title"]; ?></photoTitle>
<photoURL><?php echo $row["url"]; ?></photoURL>
</photo>
<? } ?>
</photolisting>
[/php]
hope somebody can help me with this ?
XmlConnector
Can I use a xmlconnector without xml file, only xml string?
Thanks
XMLConnector Help
Hi all,
I'm using an XMLConnector object to send and receive data from a server. This is how the object is set up.
var XMLObj:XMLConnector = new XMLConnector();
XMLObj.addEventListener("result", XMLObjListener);
XMLObj.addEventListener("send", startTimer);
XMLObj.ignoreWhite = true;
XMLObj.multipleSimultaneousAllowed = false;
XMLObj.suppressInvalidCalls = true;
XMLObj.direction = ("send/receive");
The startTimer listener starts a timer when the XMLObj send data to the server and the XMLObjListener checks and precesses the XMLObj result. If the server does not responds within a set time the timer displays a simple pop up message.
The problem I have is when the server is timed out and the pop up is displayed, the XMLObj will still process the result if the server response is received after the time out.
So, is there a way of telling the XMLObj not to wait for a response from the server anymore. Maybe I can send the XMLObj a fake response which I can then process as a timeout!!
Does any have any suggestions.
Thanks,
T
URL With XMLconnector ?
peepz,
how can i give a $ to my PHP doc with a XMLconnector? so i send my data with one XML connector and recieve it with another connector!
script at keyframe 1:
Code:
stop();
_root.myReceiveXMLConnector.trigger();
listener = new Object ();
listener.afterLoaded = function (evt) {
trace ("ready");
dataSet = evt.target;
dataSet.first ();
i = 0;
while (dataSet.hasNext() ) {
trace (dataSet.categoryName);
var temp_mc = _root.e_mc.attachMovie("button", "b" + i, i);
temp_mc.btn_txt.text = dataSet.categoryName;
temp_mc._y = - 100 + i * 26;
temp_mc.categoryID = dataSet.categoryID;
temp_mc.onPress = function () {
gotoAndPlay(2);
trace (this.categoryID);
// actionscript peepz: i want to send an URL if i press on the button so it gives my categoryID to my php Document.
}
dataSet.next ();
i ++;
}
}
_root.myDataSet.addEventListener ("afterLoaded", listener);
i heard i also have to tweak the URL in the XMLconnector (inspector)...
my PHP script looks like:
PHP Code:
<?
include "connect.php";
$categoryID = .........;
//actionscript peepz: i have to get the categoryID from the XML connector on the dots "........."
$content = ("SELECT * FROM photos WHERE photos.cid = ".$categoryID."");
$result = mysql_query ($content);
?>
<photolisting>
<?php while ($row = mysql_fetch_array ($result)) { ?>
<photo>
<photoID><?php echo $row["id"]; ?></photoID>
<photoTitle><?php echo $row["title"]; ?></photoTitle>
<photoURL><?php echo $row["url"]; ?></photoURL>
</photo>
<? } ?>
</photolisting>
[/php]
hope somebody can help me with this ?
XMLConnector
Hi
I want to use the XMLConnector component to read and update XMLdocuments, binding it to a DataGrid.
As long as I only receive data there is no problem. As soon as I want to work with send/receive nothing works anymore. Unfortunately all tutorials I can find only show how to receive data.
Does somebody know of a suitable tutorial or can give me some hints about updating XML-files using the XMLConnector.
regards
Peter Klausli
Pbl To Use XMLConnector
Hello
I use the XMLConnector component linked to a DataSet linked to a DataGrid component in order to display the full content of a XML file.
This works fine !
Here is my problem ... :
My DataGrid is editable in order to add a line ...
I would like to insert a new line and when i clik on a 'validate' button, this new line is added to my linked XML file...
I already defined all direction components to 'in/out' or 'send/receive'.
How can I do this ?????
Thanks a lot for your help !!
Disconnet XMLConnector
Hi
I use a XMLConnector connected to a xml file. How can i disconect it? I need in my movie to delete the file and i can't because she is in use...
Thanks
Mario
XmlConnector Question.
I've been looking at the xmlConnector component.
It seems to be really useful.
What I would like to do is:
Use the component to read in XML data and have it act as an object that I can refer to to access the XML data.
This is going on the assumption that all of the XML data is read in when you call the trigger function.
Have I misunderstood the use of the component?
Does the component act more like an 'open pipeline' to the XML data source? And i.e. doesn't store all the XML data in one go?
If I want to do what I want to... do I have to go the long way and use the XML functions that Flash has to read in the data and store in my own data set?
Any help would be appreiciated.
Thanks.
OM
Xmlconnector Variables
hello,
I have some XML i'm pulling into Flash, and everything works perfect except one thing i must do with actionscript which i haven't been able.
I want to access on the variables that's pulled from the XML document and insert it into a URL which is attached to a button.
on (release) { getURL("http://www.beefnet.org/auction/Populate_Client-new.cfm?PassBid="+__level0.dataxml.result.index.el ements2);
}
something like this... excpet i can't get it to work. I can't find any docs on how to access XMLConnector Variables thru javascript. The XML document is very simple isn't even an array of variables, just on set.
<index>
<blah>hello</blah>
<variable>i want</variable>
</index>
it's a number that i want. and i just want it to put into the URL??? how do i access the variables from the XMLconnector without the GUI binds, etc.
thanks,
holden
Schema In XMLConnector
Hello,
i am using Flash MX 2004 Pro and currently working with components. I realized that the build in XMLConnector build a XML Schema of the XML file you supply.
It seems to be possible to alther it in the Component Inspector, but I would like to load a predefined Schema into XMLConnector. I dont like the idea to supply an example file instead of a real Schema!
General questions: Is it possible to load a Schema (XSD) into Flash (maybe into another component)Is if possile to somehow validate an XML-file against a given Schema (XSD).Is it possible to access the XMLConnector-component from ActionScript. The API is pretty pretty simple! Any not documented methods available? Maybe its possible to inherit from XMLConnector and add a loadSchema class or something?Isnt it strange that Flash can reverse-engineer a Schema in the XMLConnector-Component but cannot (see above) take a custom Schema (XSD)?
Maybe its possible to load a Schema in MXML or something or maybe someone extended the XMLConnector-Class already?
It seems pretty strange to me that Flash MX 2004 pro supports advanced (Schema based) services such as Webservices, but does not give me a sophisticated API to the XMLConnector component or Schemas in general!
Yours,
Matthias
Xmlconnector Url Question
Hi,
I have a application that uses a xmlconnector component to pull information from an xml file into a combo box. It works fine if I put the xml file in the same directory as the exe file, and just put the name of the xml file into the url field for the component.
Here is my problem. The XML file needs to be in a different folder then the exe. And I need to set the URL dynamically with ActionScript. It seems that this can be done, but I can't seem to get ti to work using any examples I have found.
Here is what I have so far:
------------------------------------------
fullurl = "C:\path to file here";
this.xcTrips.url = fullurl;
// Trigger Data Source Behavior
// Macromedia 2003
this.xcTrips.trigger();
------------------------------------------
Thanks in advance for any help.
Bill
AS For XmlConnector.results
Can anyone tell me the AS for assigning a null value to xmlconnector.results. I want to be able to flush this property prior to it re-triggering??
XMLConnector Problem
Hi again :P
im using XML connector in my project for listing some data from php/xml file.
The thing is that i want to use a simpler way to configurate my project (im gonna publish the project for dowload) and instead of going into the fla file, to change the XMLconnector URL i need my project to scan a textfile for variables.
now, i tested a lot of way, but cant seem to get over the problem. so, how do i give XML connector a URL in the AS2.0 instead of giving it in the parameters tab ?
i tried mostly this way without any results:
feed. load(list_address);
and its defined in the textfile
list_address=http://localhost/nmsos01/nmsos.php
Data Via XmlConnector
Figured out the oroginal problem, but encountered another :/
I have disabled numeric stepper component and I wan't one of the comboBoxes value to enable it. How do I do this with the bindings?
Edited: 04/25/2007 at 02:33:02 AM by Tomppalonen
Xmlconnector And Databinding
hii everyone,
i am working off a tutorial which allows me to link an xml document to my flash file. (the tutorial is at http://www.macromedia.com/devnet/mx/...connector.html)
In the tutorial (which uses the XMLConnector component) we determine the search by titling an array in the xml doc (eg <trips name="something">). however, i was wondering whether it is possible to bind data from within the array to the combobox, essentially creating a system where the user can browse different catagories (eg price, rather than location).
Obviously, the tutorial tags the array, but is it possible to avoid tagging the array, and basically search a specific index within every array.
A long winded solution would be to create several, differently formatted xml documents, but if anyone could either enlighten me regarding this subject, or point me towards a better tutorial, i would be extremely grateful.
cheers in advance for any replies.
cudos
ps, my scripting ability is not great, which is why im using the xmlconnector, rather than coding the whole thing.
pps, sorry about the skatty explaination of my problem
XmlConnector And DataSet
I've been working to get the dataSet component to load an xml file via xmlConnector and transfer that information to a movieclip that is attached once the xml file has been loaded. For some reason it attaches the movieclip but doesn't load the values.
ActionScript Code:
//
content_con.trigger();
//Listener to prevent attaching before the XML content is loaded.
contentListener = new Object();
contentListener.afterLoaded = function() {
attachMovie("a_target", "a_target", 0, content_ds.currentItem);
};
content_ds.addEventListener("afterLoaded", contentListener);
stop();
Any help with this would greatly appreciated.
Files:
html
zip
Add To Url Result From XmlConnector
using components for the first time (thought it looked quicker than a.s. for everything)
i'm using xmlConnector, getting all text info ok (displaying it in textareas).
also need to display an image (in a Loader component) but the url in the xml file is truncated - doesn't contain full path. (e.g. need http://www.blahdomain.com/imagefolder/image.jpg... xml only contains /imagefolder/image.jpg )
how/where do i add the http://www.blahdomain.com bit so flash goes to the full url?? there must be a box somewhere?!? or can i add it in a.s.?
Xmlconnector And Databinding
hii everyone,
i am working off a tutorial which allows me to link an xml document to my flash file. (the tutorial is at http://www.macromedia.com/devnet/mx/...connector.html)
In the tutorial (which uses the XMLConnector component) we determine the search by titling an array in the xml doc (eg <trips name="something">). however, i was wondering whether it is possible to bind data from within the array to the combobox, essentially creating a system where the user can browse different catagories (eg price, rather than location).
Obviously, the tutorial tags the array, but is it possible to avoid tagging the array, and basically search a specific index within every array.
A long winded solution would be to create several, differently formatted xml documents, but if anyone could either enlighten me regarding this subject, or point me towards a better tutorial, i would be extremely grateful.
cheers in advance for any replies.
cudos
ps, my scripting ability is not great, which is why im using the xmlconnector, rather than coding the whole thing.
pps, sorry about the skatty explaination of my problem
XMLConnector - Update Possible?
I want to use the XMLConnector component to display data in my Tree.
Users can change the value of some nodes in the tree or add new nodes. Is it possible to show this change in runtime.
I can do the same using the traditional xml load. How about if I wanted to use the xmlConnector?
Thanks
RS
Dumping DataSet To XML Thru XMLConnector
Using MX 2004 Pro: DataSet: DataGrid: XMLConnectors
I have two XML Connectors, one DataSet, and one DataGrid. The first connector successfully brings in XML and loads the dataset, which then successfully loads the data grid.
I want to then dump ALL of the information back to an XML file to send to the server, NOT just the deltaPacket. I tried to DataBind the dataset to the second XMLConnector. When I call the trigger, a post is succesfully called to the server but it's empty. And no errors are being thrown in the XMLconnector.status.
My question is of course... what do I need to do to successfully dump the entire dataset to XML using the XML Connector.. I of course could iterate through the entire dataset and build the XML manually.. but I figure this is what DataBinding is all about. Do I need some specific Schema? I've created one based on the fields in the dataset.. but doesn't seem to work
XMLConnector And Runtime Binding
I am trying to use the Flash MX 2004 DataBinding classes to bind UI components to xML Data. Using the "location" attribute in an EndPoint class I have not found a way to set an XML "attribute" in a XMLConnector. It only works for elements. I have not found a way to set or bind to an attribute in a XML file. Here is a snipplet from my program
var xmlDestination:Object = {component:_level0.xmlconn_out, property:"params", location:"XMLRequest.Parameters.Parameter.Value"};
var dataholderSource:Object = {component:_level0.dataholder, property:"vlanname"};
var xmlOutBinding = new mx.data.binding.Binding(dataholderSource,xmlDestin ation);
Now using this code snipplet I can set data to the Value tag if it is an XML element but not to an attribute.
Any pointers ?
thanks
-sanmitra
XMLConnector And Varibales Sent To Server
are there any variables that sent to the server by the XMLConnector
that the user dont give'for example maybe like the name of the domain or things like that,like a browser send's to the server( the header thing)?
thnaks i n advance
peleg
Pass InstanceName To Xmlconnector.url
I am trying to call a .xml file via a menubar
menubar.xml to populate a datagrid xmlconnector.url
the xmlconnector is populating a datagrid with data.xml
i want change it to newdata.xml
menubar.xml code
Code:
menus>
menuitem label='xml'>
menuitem label='data' instanceName='newdata.xml'/>
/menuitem>
/menus>
XMLConnector & Custom Component
Hi all,
I will resume what i'm trying to do in a simple example.
Here's my xml, let's call it data.xml
Code:
<data>
<group label="snake" family="reptile">
<animal label="copperhead" />
<animal label="cobra"/>
</group>
<group label="spider">
<animal name="Black Widow"/>
<animal label="Redback"/>
</group>
On the stage, i have placed a xmlConnector called xmlPlug
I also have a custom component called Menu
xmlPlug is bound to Menu, so that when xmlPlug is triggered,
the group:Array is paased to Menu.
Menu then creates a class item for every entry in its data.
Code:
private function createChildren():Void {
createEmptyMovieClip("rack_mc", getNextHighestDepth());
for (var $i = 0; $i<__data.length; $i++) {
var item_mc:MovieClip = rack_mc.attachMovie(menuitem_id, 'item_'+$i, $i+100, __data[$i]);
item_mc._x = $i * item_mc._width + 10
}
}
How can I create a bind between xmlPlug and the newly created items, so that the attributes of the corresponding group will match.?
ultimately, i'd like to pass this through the initObj, without having to format data.
(i'm trying to avoid writing:
Code:
var $itemData = {};
for(var $k in __data[$i].attributes){
$itemData[$k] = __data[$i].attributes
}
var item_mc:MovieClip = rack_mc.attachMovie(menuitem_id, 'item_'+$i, $i+100, $itemData);
since the data received won't always be from an xml source...
XMLconnector Won't Send Data
I want to use XMLconnector to retreive data from a database and fill combo boxes. I have setup the data binding between XMLconnector and comboBox and this works if I'm only XML receiving data from an external URL (On my server).
However, with XMLconnector if the "direction" is set to "send/receive" it stops working.
As an experiment I created a PHP script that logs its access time and the raw POST data. I used this script as the URL.
With the "direction" set to "receive" may script logs the access time. With "direction" set to "send/receive" no access time is logged. It appears that in the "send/receive" mode flash doesn't even attempt to connect to the URL.
Any ideas?
XMLConnector - How To Know When Data Is Loaded
Hi,
I'm using the XMLConnector with a datagrid.
It's only loading about 60kb of data, but I'd like to put some sort of "Loading" movie on the screen while the data is loading.
I know the data starts on "trigger" but is there a way to know when the load is finished?
Thanks
XMLObject, XMLConnector, And XML2Object
Personally, I've only used XMLObject. Yesterday I was given someone else's project to modify who used WebConnectors. That got me playing around with data components and searching this site for alternatives (such as Alessandro Crugnola's XML2Object).
I've found a performance test that said XMLConnector use of XPath & schemas makes it far slower. Does anyone have facts from personal experience on these methods, or know of any others I haven't found yet?
Anyone know a way to connect to a web service w/o using the component?
XMLConnector Isn't Loading New Data
Hi --
Briefly: I've got a PHP program reading data from a MySQL database and writing it to an XML file. Flash 8's XMLConnector is triggered when the PHP file is done, and the XML is loaded into a DataSet.
The user can make selections on the Flash page which cause the PHP file to re-execute and alter the XML file. The XMLConnector is triggered at the completion of this event, and if this were a perfect world, it would then load new data into the DataSet.
Problem: Unfortunately, it doesn't work like that. I've discovered that unless I manually load the XML file into a different IE page and hit REFRESH, the XMLConnector reads what is apparently a cached XML file and doesn't bother to load the new data. Thus, the user just sees the same data over and over.
What can I do to eliminate this problem? The process works perfectly well in Flash's sandbox environment, and it took me a long time just to figure out what was going on. Can anyone help me?
Thanks,
Rob
XMLConnector To DataSet To DataGrid
Conider the tutorial from Macromedia, "Data Integration: Using XML for a Timesheet (Flash Professional Only)" in the Flash Tutorials which uses the XML file,
quote:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<datapacket>
<row act="10" custId="0" date="05/12/2002" billable="true" duration="3" id="1" notes="Here is note(1)" projId="1" rate="45.50" servId="0"/>
<row act="9" custId="0" date="05/13/2002" billable="true" duration="8.25" id="2" notes="Here is note(2)" projId="1" rate="45.50" servId="1"/>
<row act="8" custId="0" date="05/14/2002" billable="false" duration="7.75" id="3" notes="Here is note(3)" projId="1" rate="45.50" servId="1"/>
<row act="7" custId="0" date="05/15/2002" billable="false" duration="6.5" id="4" notes="Here is note(4)" projId="1" rate="45.50" servId="2"/>
<row act="6" custId="0" date="05/16/2002" billable="false" duration="5.5" id="5" notes="Here is note(5)" projId="1" rate="45.50" servId="2"/>
</datapacket>
The tutorial carefully steps you through the process of creating the Bindings and the Schema in all three components. There is another tutorial that uses a slightly different XML, "Creating a Simple Application" in the Data Integration part of Using Flash. It uses the following XML file,
quote:<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with Macromedia Dreamweaver -->
<dinner_menu>
<food>
<name>Butternut Squash Ravioli</name>
<price>$5.95</price>
<description>Handmade ravioli filled with butternut squash puree sauteed in brown butter and sage</description>
<calories>650</calories>
</food>
<food>
<name>Warm Spinach Salad</name>
<price>$7.95</price>
<description>Fresh spinach with a warm lemon-tarragon dressing</description>
<calories>350</calories>
</food>
<food>
<name>Boquerones</name>
<price>$8.95</price>
<description>Delicate anchovies on toast points topped with tobiko</description>
<calories>500</calories>
</food>
<food>
<name>Seafood Paella</name>
<price>$14.50</price>
<description>Spanish rice slow-cooked with chorizo, shrimp, mussels, and rock cod</description>
<calories>800</calories>
</food>
</dinner_menu>
But now I'd like to try my own XML file and DataGrid, but my XML file is a little different. Here is a sample of what I am looking at,
quote:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ROOT SYSTEM "CountrySampleII.dtd">
<ROOT>
<row>
<field name="Name">Japan</field>
<field name="Continent">Asia</field>
<field name="Region">Eastern Asia</field>
<field name="Capital">1532</field>
</row>
<row>
<field name="Name">United States</field>
<field name="Continent">North America</field>
<field name="Region">North America</field>
<field name="Capital">3813</field>
</row>
<row>
<field name="Name">China</field>
<field name="Continent">Asia</field>
<field name="Region">Eastern Asia</field>
<field name="Capital">1891</field>
</row>
<row>
<field name="Name">Indonesia</field>
<field name="Continent">Asia</field>
<field name="Region">Southeast Asia</field>
<field name="Capital">939</field>
</row>
<row>
<field name="Name">Russian Federation</field>
<field name="Continent">Europe</field>
<field name="Region">Eastern Europe</field>
<field name="Capital">3580</field>
</row>
</ROOT>
In the Macromedia Timesheet tutorial, the data are attributes variables in the row node and the field names are the attribute names. In the Dinner Menu tutorial, the node name is the field name and the text node is the data. In my example the child node "field" is the field and the field name is the variable for the attribute "name", but the data is also a text node.
I can find no documentation to help make the transition from the demonstrated XML to this new schema. If I make my XML so that it is exactly like the samples and tutorials, I have no problem. But I really need to have some basic command over the process and the XML I want to use should not be a source of alienation. I've gone through the Data Integration part of Using Flash. I suspect there are some clues there, but nothing to suggest an actual procedure or solution. I haven't the slightest idea what to do. Does it need a virtual schema or path expression? If so, what do I do?
How do you apply the Component Inspector and the Properties windows of the XMLConnector, the DataSet and DataGrid components to display this data in the DataGrid?
XMLConnector + DateChooser -> DataGrid
Id like to have an XMLConnector read an xml-file (containing dates, and a "To Do" string for each date).
A DateChooser should be on stage, enabling the user to select a date, and view the textstring for that specific date pop up in a DataGrid.
Something very similar to this tutorial, in the section "Arrays and Indexing", replacing the ComboBox with a DateChooser:
http://www.ultrashock.com/ff.htm?htt...atabinding.php
I tried modifying the tutorial accordingly, but without success. I guess my skills aint good enough to accomplish this yet.
Anybody here understands the ins and outs of this type of databinding?
EndPoint XMLConnector And Binding
I am trying to use the Flash MX 2004 DataBinding classes to bind UI components to xML Data. Using the "location" attribute in an EndPoint class I have not found a way to set an XML "attribute" in a XMLConnector. It only works for elements. I have not found a way to set or bind to an attribute in a XML file. Here is a snipplet from my program
var xmlDestination:Object = {component:_level0.xmlconn_out, property:"params", location:"XMLRequest.Parameters.Parameter.Value"};
var dataholderSource:Object = {component:_level0.dataholder, property:"vlanname"};
var xmlOutBinding = new mx.data.binding.Binding(dataholderSource,xmlDestin ation);
Now using this code snipplet I can set data to the Value tag if it is an XML element but not to an attribute.
Any pointers ?
thanks
-sanmitra
Using XMLconnector To Edit XML Files?
howdy-
i'm just getting into some basic data binding stuff using 2k4's data components, and so i need a bit of hand-holding. i'm trying to setup a simple web based 'control panel' that would let the owner of a website update their site by logging in, then editing a few data fields (a datagrid component), then save these changes to an .XML file.
i thought this would be simpler than using a php and mySQL db solution, but maybe not? so far i can get my flash doc to read and display data from an xml file located on a server, and i can even display the data in a datagrid and make it editable, but i can't figure out a equally easy way to WRITE data to this xml file. it seems that using a second XMLconnector with it's "direction" parameter set to "send" should work - but documentation on this seems to be scarce. i read that flash cannot directly write XML and needs to go through PHP or some other server-side script to do so - if THIS is the case, then would anyone know how i pass the XML data from the XML connector to the PHP script sp that it would generate or overwrite the exisiting XML file? i think i found the PHP script that will make the XML file, just need to know how to get the data in there.
i dunno if XML is the way to go - but my "database" is pretty simple with maybe 5 text strings or number elements for 20 items or so - so i was trying to avoid SQL or Xupdate or other web services since they seem to be overkill for what i need...but maybe not? any thoughts?
thanks for your time!
-josh
Preloading Swf Containing DataSet & XmlConnector
I'm creating a flash web application for a carpet company that users can build a floor plan, save, load, blah blah. It's database driven to load the carpet swatches and to save the layout to sql, using the xml connector.
Problem: xmlConnector and DataSet components need to be on the first frame of the movie clip to work. Can't use loader component on another movie and load the swf into that (even using lockroot) because flash still wants any components used on the first frame of that movie...
How, please, if anyone knows can I preload this movie?
Is XMLConnector Worth The Trouble?
I am relatively new to Flash and have done little more than build a few simple animations. I am currently trying to create an application to parse, view, and write xml files which are several levels deep, and contain nested arrays. I was hopeful that Flash's XML and Dataset components would make my job easier. However, I have found them very difficult to work with, and I have found no documentation or tutorials whatsoever that present more than the most simplistic applications of these components. I have just discovered this site with its wealth of xml-related tutorials, which do not appear to use the XML components. Does it make more sense to simply handle XML files in code? Do the components buy me anything at all if I'm trying to read, display, and write complex XML files?
I would appreciate and value comments from some experienced Flash users.
-jheske
Is XMLConnector Worth The Trouble?
I posted this on the Flash 8 forum and got no response, so I'll cross my fingers and try this one. I can't believe I'm the only newbie who is wondering this.
I am relatively new to Flash and have done little more than build a few simple animations. I am currently trying to create an application to parse, view, and write xml files which are several levels deep, and contain nested arrays. I was hopeful that Flash's XML and Dataset components would make my job easier. However, I have found them very difficult to work with, and I have found no documentation or tutorials whatsoever that present more than the most simplistic applications of these components.
I have just discovered this site with its wealth of xml-related tutorials, which do not appear to use the XML components. Does it make more sense to simply handle XML files in code? Do the components buy me anything at all if I'm trying to read, display, and write complex XML files?
I would appreciate and value comments from some experienced Flash users.
-jheske
MenuBar, XmlConnector And Links
Hi there,
I'm not a Flash expert, but I want try to implement its components in my websites.
So far, I'm having the MenuBar component properly filled from an xml file trough the XmlConnector component.
HTML Code:
<menu>
<menu-title label="Products">
<menu-title label="Identity Access Management">
<menu-item label="Legacy" link="http://www.my-sandro.net" />
<menu-item label="Legacy" url="http://www.my-sandro.net" />
<menu-item label="Management" url="http://www.my-sandro.net" />
<menu-item label="User selfservice" url="http://www.my-sandro.net" />
<menu-item label="Workflow" url="http://www.my-sandro.net" />
</menu-title>
<menu-title label="Manager">
<menu-item label="Manager" url="http://www.my-sandro.net" />
<menu-item label="Provisioning" url="http://www.my-sandro.net" />
</menu-title>
<menu-title label="Site">
<menu-item label="Administration" url="http://www.my-sandro.net" />
</menu-title>
<menu-title label="Directory">
<menu-item label="Status" url="http://www.my-sandro.net" />
</menu-title>
<menu-title label="Access Control">
<menu-item label="Status" url="http://www.my-sandro.net" />
</menu-title>
</menu-title>
<menu-title label="Collaboration tools">
<menu-item label="PHP collab" url="http://www.my-sandro.net" />
<menu-item label="Bullettin Board" url="http://www.my-sandro.net" />
</menu-title>
</menu>
Unfortunatly the labels don't link at all.
Is there any way, without have strong actionscript knowledge to link those labels?
Thanks in advance.
Regards
XMLConnector + DateChooser -> DataGrid
Id like to have an XMLConnector read an xml-file (containing dates, and a "To Do" string for each date).
A DateChooser should be on stage, enabling the user to select a date, and view the textstring for that specific date pop up in a DataGrid.
Something very similar to this tutorial, in the section "Arrays and Indexing", replacing the ComboBox with a DateChooser:
http://www.ultrashock.com/ff.htm?htt...atabinding.php
I tried modifying the tutorial accordingly, but without success. I guess my skills aint good enough to accomplish this yet.
Anybody here understands the ins and outs of this type of databinding?
EndPoint XMLConnector And Binding
I am trying to use the Flash MX 2004 DataBinding classes to bind UI components to xML Data. Using the "location" attribute in an EndPoint class I have not found a way to set an XML "attribute" in a XMLConnector. It only works for elements. I have not found a way to set or bind to an attribute in a XML file. Here is a snipplet from my program
var xmlDestination:Object = {component:_level0.xmlconn_out, property:"params", location:"XMLRequest.Parameters.Parameter.Value"};
var dataholderSource:Object = {component:_level0.dataholder, property:"vlanname"};
var xmlOutBinding = new mx.data.binding.Binding(dataholderSource,xmlDestin ation);
Now using this code snipplet I can set data to the Value tag if it is an XML element but not to an attribute.
Any pointers ?
thanks
-sanmitra
Using XMLconnector To Edit XML Files?
howdy-
i'm just getting into some basic data binding stuff using 2k4's data components, and so i need a bit of hand-holding. i'm trying to setup a simple web based 'control panel' that would let the owner of a website update their site by logging in, then editing a few data fields (a datagrid component), then save these changes to an .XML file.
i thought this would be simpler than using a php and mySQL db solution, but maybe not? so far i can get my flash doc to read and display data from an xml file located on a server, and i can even display the data in a datagrid and make it editable, but i can't figure out a equally easy way to WRITE data to this xml file. it seems that using a second XMLconnector with it's "direction" parameter set to "send" should work - but documentation on this seems to be scarce. i read that flash cannot directly write XML and needs to go through PHP or some other server-side script to do so - if THIS is the case, then would anyone know how i pass the XML data from the XML connector to the PHP script sp that it would generate or overwrite the exisiting XML file? i think i found the PHP script that will make the XML file, just need to know how to get the data in there.
i dunno if XML is the way to go - but my "database" is pretty simple with maybe 5 text strings or number elements for 20 items or so - so i was trying to avoid SQL or Xupdate or other web services since they seem to be overkill for what i need...but maybe not? any thoughts?
thanks for your time!
-josh
Trigger XMLConnector - A Challenge
I have an XML Connector that triggers a PHP file that produces XML from a MySQL database.
Everything loads great. The Connector triggers and populates my DataGrid, etc. There is also a form that allows users to edit the database (add, edit, delete). The "add", "edit", and "delete" buttons write/delete information from the database and retrigger the XMLConnector so that the new information is reflected in the DataGrid.
However, after I add, edit, or delete items from my database I never get anything more than the original XML -- even though I know the information is being updated in the database. It's as if the information is cached somewhere in Flash or in the browser.
The following should trigger the new XML.
Code:
this._parent.MyXMLConnector.trigger();
This almost works. That is, it will clear the selectedItem from the datagrid and return it to the original sort order, but it doesn't reflect the new information from the database. If I close my browser and open it again the new information appears.
I can't drop the original data from the Flash environment.
Any suggestions?
Thanks,
Danny
Bind XMLConnector To DataSet During RUNTIME
Howdy Y'all,
I'm trying to bind to a dataset from an xmlconnector. Here is my code:
the binding occurs but the dataset does not have any items (ie: length =0)
what is my problem?
i am also assigning schema and params to both components.
Code:
function GenerateGraphData(sql){
trace("depththingy:"+ mx.managers.DepthManager.kTop);
this.createObject("XMLConnector", "xCON", curLevel++);
this.createObject("DataSet", "xDS", curLevel++);
xCON.URL = server+sql;
xCON.direction = "receive";
xCON.ignoreWhite = true;
xCON.params = new XML(XMLschema);
xDS.schema = new XML(DSschema);
trace("XMLConnector: "+xCON);
trace("URL: "+xCON.URL);
trace("DataSet "+xDS);
//trace("xCON Results: "+xCON.results);
var src = new EndPoint();
src.component = xCON;
//src.property = "results.NewDataSet._x0030_";
src.property = "results";
src.location = "/NewDataSet/_x0030_";
//src.event = "result";
var dest = new EndPoint();
dest.component = xDS;
//dest.property = "dataProvider:Array";
dest.property = "dataProvider";
//dest.location = "Array";
//dest.location = "XML";
//dest.property = "items";
bind = new Binding(src, dest);
xCON.trigger();
xCON.addEventListener("result", xConResults);
};
var xConResults = function (ev) {
trace("xConResults "+ev.target);
xDS.addEventListener("afterLoaded", xDsResults);
err = bind.execute();
trace("just after execute dataProvider:"+ xDS.dataProvider._name);
trace("Err:"+err);
trace("just bound"+xDS.length);
//trace("xCON Results: "+xCON.results);
}
var xDsResults = function (ev) {
trace("xDsResults w/ xDs len: "+xDS.length+ " ev: "+ev.target);
for( var t = 0; t < xDS.length; t++ ){
trace(xDS.items[t]);
}
}
Getting Values Through The XMLConnector To Control Timelines.
I'm wanting to pull from an rss feed then have my flash movie search the contents of the feed and use it to play certain timelines according to the results found. Does anyone know how difficult of a task this is, and if so could you give me some insight into how to do this? I'm relatively new to hardcore actionscripting so please go easy on me. However I greatly appreciate any input that can be offered.
Thanks!
Michael
URGENT GetURL Or Web Service Or XMLConnector?
First, apologies for starting a new thread. Searched, but couldn't find anything related.
Working on a movie that will be displayed in a kiosk in one location and will need to get data from another location. We're having a bit of a dissconnect with the people who are trying to set up there end to send us what we need. We ultimately only need 4 or 5 values from them.
Do I need to use XMLConnector or WebServiceConnector to retreive these values from the remote location? Or is getURL "smart" enough? I was assuming
Can anyone advise? I keep getting e-mails from the client's IT guy and I need to be able to articulate what I need from them.
THANKYOU!
StormyGirl
|