?
Solved

xml/flash

Posted on 2003-02-27
5
Medium Priority
?
246 Views
Last Modified: 2010-04-03
hi guys!
i have tag like this


<good></good>
<vgood></vgood>
<ci></ci>
<nb></nb>

I want to integrate flash/xml for rating my site.i have four buttons in the stage,as good,very good,not bad,can Improve.if a user presses
first button,the  <good> tag should be incremented by 1 and so on for all tags.


i can get values from xml file but i don't know how to send from flash to xml file.please provide me the code for modifying a
particular tag,deleting values from a particular tag and adding values to a particular tag.I am sure that  the people
reading my question can help me .please help me as early as possible.
0
Comment
Question by:vinoddb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Expert Comment

by:elhy
ID: 8039529
I did it before but not with xml alone. I used asp and from asp response.write the xml tags. Not sure if u can do it directly with xml alone. what i did was send the variable to a asp page then with the vbscript, modify the value. response.write the name data in xml format.

here's a sample code for flash:

myXml = new XML();
loadDataXml = new XML();
loadDataXml .onLoad=function(){
    //do sth here.
};
myXml.sendAndLoad("aspfile.asp", loadDataXml);
0
 
LVL 6

Accepted Solution

by:
henryww earned 120 total points
ID: 8040905
hi vinoddb,

if u know how to load from the xml file, that's good

then u have to construct a new XML object
and do the calculation etc and add the node and send the xml to ur script (asp,php etc) -> save to db ...
is that what u want?

// a, b ,c ,d being the values u get from load XML and manipulated add, minus, remove etc

myStats= new XML();
XMLObject = STATS.createElement("statREC");
XMLObject.attributes.good= a;
XMLObject.attributes.vgood= b;
XMLObject.attributes.ci= c;
XMLObject.attributes.nb= d;
myStats.appendChild(XMLObject);
trace(myStats.toString()); // if u wanna see what is happending

myStats.send("update.asp")
// etc ...


have a look at this question, it may give u some hint
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20515181.html

cheers
0
 

Expert Comment

by:hansamryan
ID: 8061270
I might being missing something here, so forgive me if this does't go along with what you are asking.

But, upon clicking on a button just have that access an asp page behind the scene with a querystring? And have your asp page do all of the work?


example: update.asp?good=0&vgood=1&ci=0&nb=0


---------update.asp-----------
<%
if not isempty(request.querystring("good")) then
Good=request.querystring("good")
vGood=request.querystring("vgood")
ci=request.querystring("ci")
nb=request.querystring("nb")
if good <> 0 then
''XML ADD 1 to GOODVOTE
elseif vgood <> 0 then
''XML ADD 1 to VERY GOOD VOTE
elseif nb <> 0 then
''XML ADD 1 to NOt BAD VOTE
elseif ci <> 0 then
''XML ADD 1 to IMPROVE VOTE
end if
%>

===========
or Use one querystring variable and a switch statement in the asp page.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question