XML Online Reading Problems
I've created a fairly simple flash movie that is supposed to just read in data from an XML file and then display it. It also uses the XML to format some colours in the file. It works fine offline but when I upload it to the server, nothing happens.
Can anyone see anything wrong with my code? The xml file and flash file reside in the same directory. Heres the as.
headlineXML = new XML();
headlineXML.ignoreWhite = true;
headlineXML.onLoad = myLoad;
headlineXML.load("xmlnews.xml");
counter = 0;
function myLoad(ok) {
if (!ok && counter<20) {
//keep trying to load xml 20 times if can't the first time
headlineXML.load("xmlnews.xml");
tArea.text = "<h1>Sorry. No news available</h1>";
counter++;
} else {
Publish(this.firstChild);
}
}
function Publish(HeadlineXMLNode) {
if (HeadlineXMLNode.nodeName.toUpperCase() == "NEWS") {
content = "";
//articles is first child of news
articles = HeadlineXMLNode.firstChild;
article = "";
while (articles != null) {
article = articles.firstChild;
while (article != null) {
if (article.nodeName.toUpperCase() == "ARTICLE") {
heading = "";
URL = "";
//references the parts of the individual article
element = article.firstChild;
while (element != null) {
if (element.nodeName.toUpperCase() == "URL") {
URL = element.firstChild.nodeValue;
}
if (element.nodeName.toUpperCase() == "HEADING") {
heading = element.firstChild.nodeValue;
}
element = element.nextSibling;
}
content += "<body><a href='"+URL+"'>"+heading+"</a><br></body>";
tArea.text = content;
}
article = article.nextSibling;
}
if (articles.nodeName.toUpperCase() == "ATTRIBUTES") {
element = articles.firstChild;
while (element != null) {
//set the colour of the banner to the sector colour
if (element.nodeName.toUpperCase() == "COLOR") {
bannerCol = new Color(col);
bannerCol.setRGB("0x"+element.firstChild.nodeValue );
}
//set the url of the top banner
if (element.nodeName.toUpperCase() == "URL") {
URLName = element.firstChild.nodeValue;
col.onRelease = function() {
getURL(URLName);
};
}
//set the title of the top banner
if (element.nodeName.toUpperCase() == "TITLE") {
topBarText = element.firstChild.nodeValue;
}
//apply the formatting to the text area
element = element.nextSibling;
}
}
articles = articles.nextSibling;
}
}
}
Any help would be most appreciated. My initial thoughts are either that the XML path is wrong or that the file is being published in the wrong version. The current version is 7 with action script version 2. Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 05-03-2006, 10:55 AM
View Complete Forum Thread with Replies
Sponsored Links:
Reading Xml Differently When Online [CS3] [AS2]
Hi,
I have an xml gallery that works perfectly offline/locally, but when online/uploaded it suddenly reads the xml file differently. The xml file is being loaded, but the app gets lost in the structure tree of the xml file, and gets the wrong data.
Anyone that has a clue what's going on, and how to fix it?
View Replies !
View Related
Reading Of Array Items Works Until Online
I have a pre-loader code that loads all of my exteranl XML text files. When I click on a link several frames later, the appropriate file is pulled from the resulting Array and placed on the stage. It works perfectly offline, but as soon as I upload it I get random text files loaded instead of the correct one. Any ideas?
Thanks!
Code below:
//combine all the arrays into one and send it to the preloader
allText = new Array().concat(introText,textForCard1,textForCard2 ,textForCard3,
textForCard4,textForCard5,textForCard6);
textForContent = allText;
//text preloader starts here
var counter:Number = textForContent.length, ii:Number = 0;
for (var i:Number = 0; i<counter; i++) {
xmlToLoad = textForContent[i];
this["xmlData"+i] = new XML();
this["xmlData"+i].load(xmlToLoad);
// Check if data loaded
this["xmlData"+i].onData = function(src:String) {
if (src != "undefined") {
AfterData(src, num);
}
};
}
AfterData = function (src:String) {
++ii;
if (ii<counter) {
_level0["xmlToDisplay"+ii] = src;
} else {
_global._level0["xmlToDisplay"+ii] = src;
//stop();
play();
}
};
//hard coded line sends #2 in this case to function that places text on stage
textForStage = _level0.xmlToDisplay2;
View Replies !
View Related
Reading From A .dat
Ok, I know quite a bit of c++. But I am a little iffy when it comes to action script. Even though it is basically the same, I would like some help. If someone could please change this c++ code to action script and tell me how to integrate it into a flash movie which is used as a webpage interface, that would be great. I am doing this so when i want to upgrade my webpage, all i will have to do is update the .dat file. The first line in the .dat will be a number, which is the number of lines in that file.
Code:
//C++ file to be changed to actionscript
#include "fstream.h" //the include files are usually enclosed in chevrons but cannot be displayed in the forum
#include "apstring.cpp" //may need to be changed for flash variables
#include "conio.h"
#include "iomanip.h"
ifstream infile; //global initialization of the class to read from external files. 'infile >>' can
//now be used to save a template (int, double, char, string) to a variable
void main()
{
infile.open("http://url.com/datfile.dat"); //opens the url to the .dat file
int x, y = 0;
infile >> x; //reads the number
apstring line[x]; //creates an array of the variable 'line' which has the number of lines in the .dat file
while(!infile.eof()) //a while loop, reads from the .dat until it comes to the eof (end of the file)
{
getline(infile, line[y]); //reads from the .dat and saves the entire line (carriage returns and other ascii included) in the variable line[y]
cout << line[y] << endl; //outputs the variable, i have no idea how to do this in flash!! (i seriously dont)
y++;
}
}
That is a very short version of the program I would like to write in flash. It would print it out into a text box with a scroll bar so I wont have to limit its length. I would really appreciate someone helping me convert this into action script, and also how to integrate this into the frames. Thank you.
View Replies !
View Related
Reading URL
Hi all
I need to read the URL tha"ts in de address line of the browser into a Action script Var.
When I try to use _url it read the location url of the swf file. Not the data that is shown in de address line.
How can I get the htm url into an actionscript var.
Thank you for reading ....
Regards
Frank Schrauwen
View Replies !
View Related
Reading On A Mac
selemat pagi
ok so i make a project for mac and an exe for PC then by some weird cause of events i burn the files to cd put it in another mac and it wont read the projector ? what's the go,
also if i try to open it in Flashplayer it wont work either.
a friend of mine viped it in a hqx file and if you unzip it, it reads it fine.
can anyone help
P.S. isn't Malaysia beautiful ?
View Replies !
View Related
Url Reading
Hi,
Is it somehow possible for AS to read the current url address in the browser and then do an action?
Imagine I have a navigation bar on flashkit.com. Th nav bar is the same on flashkit.com/index.html, flashkit.com/forum.html, flashkit.com/contact.html, etc. I would like, in the nav bar, AS to perform an action if the visitor is on flashkit.com/index.html, another action if he is on flashkit.com/forum.html, etc.
Is this possible?
Thanks,
View Replies !
View Related
Reading Through XML
Ok, so I have an outside XML file that has been parsed in, and the raw data given to a class. The challenge now is to search through the XML data and for each <menu> tag create a menu object (numbered menu1, menu2, menu3 .....menun). For each <menu> tag, there is an option for it to have a submenu named <menu_option> which in turn can have its own <menu> etc etc etc.
Here is my XML code for reference:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root_menu>
<menu name = "main">
<menu_option name = "Announcements">
<link>announcemnts.html</link>
</menu_option>
<menu_option name = "Training">
<menu name = "training">
<menu_option name = "Review">
<link>review.html</link>
</menu_option>
<menu_option name = "Modification">
<link>mod.html</link>
</menu_option>
</menu>
</menu_option>
<menu_option name = "Knowledge">
<menu name = "knowledge">
<menu_option name = "Department">
<link>dep.html</link>
</menu_option>
<menu_option name = "Office Policies">
<link>policies.html</link>
</menu_option>
</menu>
</menu_option>
<menu_option name = "Forums">
<link>forums.html</link>
</menu_option>
<menu_option name = "Log Out">
<link>logout.html</link>
</menu_option>
</menu>
</root_menu>
And what I need help on is how to set up the freaking searches (the XML will be able to change, but the actionscript should be able to stay put). My idea was to make methods that look to see if there is a "submenu" and return a boolean, but I still can't figure out the looping part for creating menu objects. Here is what I have so far on the class:
Code:
package{
public class CNetMenu
{
private var xmlStream:XML;
public function CNetMenu(raw_data:Object)
{
xmlStream = new XML(raw_data.target.data);
trace("done");
var counter:int = 0;
var tag:XML = <menu></menu>;
var tag_option:XML = <menu_option></menu_option>
//My Futile attempt at a For search through the data...
//for each (tag in xmlStream)
//{
//var menu:Object = new Object();
//menu.name = "menu" + counter;
//trace(counter);
//for each (tag_option in xmlStream)
//{
//}
//}
}//end function
public function subYN(menu:XML):Boolean//says if there is a submenu or not
{
if(menu.descendants.(hasOwnProperty("menu")) || menu.descendants.(hasOwnProperty("menu_option")))
{
return true;
}
else
{
return false;
}
}//end function
}//end class
}
Thanks for any ideas or actual code help!
View Replies !
View Related
Mac Not Reading Swf?
heya i made a flash file and when i look at the swf's on my machine it looks fine. but my client can't see the file on their machine, which is a mac..
has anyone dealt with this before??
could the problem be that it is published for flash player 6?
View Replies !
View Related
Reading Php Xml
Hello.
I'm trying to retrieve information from a XML created inside a PHP file, with AS3. Seeking in Flash's Help, I found this code:
var externalXML:XML;
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("file.xml");
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
var loader:URLLoader = event.target as URLLoader;
if (loader != null)
{
externalXML = new XML(loader.data);
trace(externalXML.toXMLString());
}
else
{
trace("loader is not a URLLoader!");
}
}
It works when using an actual XML file, but when I replace it with a PHP file that internally creates an XML, I get an error.
What should I do to read this information?
Thanks in advance!
View Replies !
View Related
Reading Xml
I have a xml file
ActionScript Code:
<idioma>
<ingles>
<cat1>value1</cat1>
<cat2>value2</cat2>
</ingles>
<espanol>
<cat1>value3</cat1>
<cat2>value4</cat2>
</espanol>
</idioma>
how can I replace the value of cat1 with de functin replace() ?
View Replies !
View Related
Reading XML
Hi, i have an xml file, which i have to read. I know how to read it once, but i have to read it all the time, because it reads some numbers, which are changing and managing my events.
The XML file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
- <hotspots>
<sequence>47</sequence>
<hotspot id="1">0</hotspot>
<hotspot id="2">0</hotspot>
<hotspot id="3">0</hotspot>
<hotspot id="4">0</hotspot>
<hotspot id="5">0</hotspot>
<hotspot id="6">0</hotspot>
<hotspot id="7">0</hotspot>
<hotspot id="8">0</hotspot>
<hotspot id="9">0</hotspot>
</hotspots>
I have to read if hotspot has value 1 or 0. I have to read only hotspots, with id=1,id=2 and id=3.If the number changes, then something happens in my flash file.
My current code:
var mojXML:XML = new XML();
mojXML.ignoreWhite = true;
var output:String = "";
mojXML.onLoad = function(success){
if(success)
{
var tabela:Array = mojXML.firstChild.childNodes;
//ce je prvi ena
if(tabela[1].childNodes[0].nodeValue == 1){
if(tabela[2].childNodes[0].nodeValue == 0){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni prvega");
}else{trace("zazeni tretjega");}
}
else if(tabela[2].childNodes[0].nodeValue == 1){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni drugega");
}else{trace("zazeni tretjega");}
}
}
//ce je prvi 0
else if(tabela[1].childNodes[0].nodeValue == 0){
if(tabela[2].childNodes[0].nodeValue == 0){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni prvega, ki je default");
}else{trace("zazeni tretjega");}
}
else if(tabela[2].childNodes[0].nodeValue == 1){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni drugega");
}else{trace("zazeni tretjega");}
}
}
else{
trace("first as default");
}
}
else{
trace("XML ni OK");
}
}
mojXML.load("hotspot_processed.xml");
It is probably a simple solution, so i hope that someone can help me.
Attach Code
mojXML.onLoad = function(success){
if(success)
{
var tabela:Array = mojXML.firstChild.childNodes;
//ce je prvi ena
if(tabela[1].childNodes[0].nodeValue == 1){
if(tabela[2].childNodes[0].nodeValue == 0){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni prvega");
}else{trace("zazeni tretjega");}
}
else if(tabela[2].childNodes[0].nodeValue == 1){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni drugega");
}else{trace("zazeni tretjega");}
}
}
//ce je prvi 0
else if(tabela[1].childNodes[0].nodeValue == 0){
if(tabela[2].childNodes[0].nodeValue == 0){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni prvega, ki je default");
}else{trace("zazeni tretjega");}
}
else if(tabela[2].childNodes[0].nodeValue == 1){
if(tabela[3].childNodes[0].nodeValue == 0){
trace("zazeni drugega");
}else{trace("zazeni tretjega");}
}
}
else{
trace("first as default");
}
}
else{
trace("XML ni OK");
}
}
mojXML.load("hotspot_processed.xml");
View Replies !
View Related
Reading XML In AS 3.0
Hello, i have some trouble finding information in the 'migration section' about the replacement command's
for reading XML in actionscript 3.0.
For example, the firstChild, childNodes commands don't work anymore.
I find it hard to understand the help files about xml and don't know how to do it the proper way.
If i would read this xml (for building a drop down menu) example from kirupa.com
<?xml version="1.0"?>
<menu name="links">
<menu name="macromedia">
<item name="flash" action="gotoURL" variables="
View Replies !
View Related
Reading XML
I'm working on a simple image gallery that will use an xml document to load in varibales.
I read in this xml document sructure from my text file:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<gallery>
<image>
<thumb>thumb_1.jpg</thumb>
<imageName>image_1.jpg</image>
<caption>Image 1 caption</caption>
</ image>
<image>
<thumb>thumb_2.jpg</thumb>
<imageName>image_2.jpg</image>
<caption>Image 2 caption</caption>
</ image>
<gallery>
using the following actionscript:
Code:
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.load("events/events.xml");
gallery_xml.onLoad = function(success) {
if (success) {
trace(gallery_xml.childNodes)
}
};
when i look at the trace of gallery_xml.childNodes, I get this:
Quote:
<gallery><image><thumb>thumb_1.jpg</thumb><imageName>image_1.jpg</imageName></image></gallery>
My XML appears to have loaded in incorrectly- the xml object is only quoting back the first <image> tag, not its siblings. When i try to access the second <image> node my structure, it isn't there at all.
Its probably something simple- can anyone help?
View Replies !
View Related
Example Of XML Reading.
Could Anyone point out a site where I can get an example of how to load images from a XML file into an empty MC?Or even send an example!
I have this empty MC that will load one image at a time.When user clicks next I want to show the next pic.
How would I do this with AS3?
View Replies !
View Related
Reading XML
I have an application im designing thats size or height is determined by how many string characters are present in an external XML content sheet.
However the prob i have found is that if there is a line break in the XML this isnt taken into consideration. The whole line of white space needs to be considered for.
My application will have say 100 character per line, so for everyline break in the xml i need to add an extra 100 characters to my height.
Is there a way to detect line space or can anyone suggest a work around?
View Replies !
View Related
Reading Xml
I have a xml file
PHP Code:
<idioma>
<ingles>
<cat1>value1</cat1>
<cat2>value2</cat2>
</ingles>
<espanol>
<cat1>value3</cat1>
<cat2>value4</cat2>
</espanol>
</idioma>
how can I replace the value of cat1 with de function replace() ?
View Replies !
View Related
AS3.0 XML Reading An XML
Hello everyone,
I have a specific question geared towards XML.
I currently have several documents that have been formated using XML.
So for instance, I have multiple documents that are named doc1.xml, doc2.xml, doc3.xml, etc...
I then have a doclist.xml that carrys the information regarding all the documents.
So this doclist.xml has doc1.xml, doc2.xml, and etc... as its Subchild nodes.
Currently, I've managed to display one document on the screen. However, my for loop currently skips all the previous documents except for the final one. Is there a way for flash to put all the texts on the screen without skipping everything until the last one?
Here's my current code
Code:
stop();
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
var type:String = "govdoc.xml";
myLoader.load(new URLRequest(type));
var document:String;
var mydocXML:XML;
var mydocLoader:URLLoader = new URLLoader();
myLoader.addEventListener(Event.COMPLETE, processDocXML);
var k:Number = 1;
function processDocXML(e:Event):void {
myXML = new XML(e.target.data);
for(var i:int = 1; i <= myXML.*.length(); i++){
document = myXML.DOC["SUBDOC"+i];
mydocLoader.load(new URLRequest(document));
mydocLoader.addEventListener(Event.COMPLETE, processXML);
}
}
function processXML(e:Event):void {
mydocXML = new XML(e.target.data);
{
this["txt"+k].text = mydocXML.DOC.SUBDOC1;
k++;
}
}
View Replies !
View Related
Pb Reading Swf
Hi,
I have a fla with some As files exT (As3).
When I work on my extern xlm files no pb.
When I amend my pictures no pb.
But if I open my fla and I 'd to move some objects, when I want to export I see my swf white?
If I can have some idea on that , thank you
View Replies !
View Related
Reading Id3
hi i am carrying on from lee's tutorial on the mp3 creation and im trying to get it to display the artist and title of the song but i get the undefined error reading the information im using flash 8 pro so it sould read all type's of id3??
Code:
//playing the file
function playSong()
{
s=new Sound();
if(cps == sa.length-1)
{
cps = 0
s.loadSound(sa[cps],true);
disptit.text = s.id3.songtitle;
dispart.text = s.id3.artist;
}
else
{
s.loadSound(sa[++cps],true);
disptit.text = s.id3.songtitle;
dispart.text = s.id3.artist;
}
playPause.gotoAndStop("pause")
}
thanks very much
dan
View Replies !
View Related
Reading The C Drive
If one wanted to have people be able to load images (JPGS) from their C: drive into FLASH program which was online, how could one do that? XML or something?
Just curious... Thank you...
-pXw
View Replies !
View Related
Reading Variables
Hey people,
I ran into a little problem and hope thought some of you might be able to help me out.
I have set some variables in my root movie and my second movie (loaded into a target on the root movei, not using levels) doesn't seem to be reading that. And I am just wondering why.
I have tried the 'with' command too, no luck.
Thanks in advance.
View Replies !
View Related
How'd They Do That.....Thanks For Reading This Post.
i am trying to create a similar effect as seen on the portfolio section of http://www.choppingblock.com
when you mouse over the windows on the left, it reveals more of the image. (a mask-like effect i guess.) i know how to create the jiggle effect, but what i want to know is how to reveal more of the image when you mouse over it, like the site above does.
thanks for your help!
View Replies !
View Related
Help... Why Is It Not Reading This Variable?
It says when it traces (closewhich) in the first instance that it is nAn.... what I am trying to do is
I have a menu of buttons on the right, that when you click on one it slides to the left, I want it to tell any that are already over on the left handside to close and go back to the right.
Any help would be appreciated
on (release) {
trace (closewhich);
tellTarget (closewhich) {
gotoAndPlay ("close");
}
gotoAndPlay ("open");
var nav = eval([this]);
var closewhich = nav;
trace (this);
trace (nav);
trace (closewhich);
}
View Replies !
View Related
Reading From File
Can somebody help me in code to read a file and put them in variables. Right now I can do that by creating Dynamic text boxes. When I use "loadVariables()" it loads in the dynamic text box variable only not in frame variables.
Your help will be appriciated.
View Replies !
View Related
Reading Variables
hi
is it possible to read a variable that is defined in a javascript on the HTML-Page where my swf-movie is embedded?
i need a solution that works on Macintosh-Systems too.
thanks for help
View Replies !
View Related
Reading Directories
Hi,
I was wondering if anyone knows if it is possible for Flash to read the directory structure? I need to create a dynamic menu that will be created depending on the folders that are in the root directory?
Thanks.
View Replies !
View Related
Reading An XML Attribute
I've got a few dynamic text fields that i want to build filled with certain info from an xml doc.
The xml doc is fine and it contains three different peoples names with an email aswell.
What i am trying to do is when a user clicks on a specific button, the relevant info for that button is loaded into the text fields.
What i can't get my head around, is how do i use action script to search through the xml do, and pick out the info it needs.
if anyone has a .fla i can have a look at, with also some advice i would be chuffed as beans!!!
hope somebody can help me cheers
lee
View Replies !
View Related
Reading Out <PARAM> Tag
I know how to pass on variables to an swf by querystring (http://my.domain.com/mymovie.swf?myparam=myvalue) for use within ActionScript, but I'm curious wether it is possible to pass information to an swf by the <PARAM> tag. The <PARAM> tag sits in the OBJECT/EMBED tags and is meant to hand some extra information to the Flash Player, e.g.:
Code:
<PARAM NAME=movie VALUE="mymovie.swf">
to set the movie source.
I can imagine that there's some special param name (like 'movie' in my example) that would make the accompanying 'value' available for ActionScripting in the swf. This would allow me to write something like
Code:
<PARAM NAME=parameter VALUE="myvalue">
Anyone...?
View Replies !
View Related
Reading From A File
Hi there,
How can I read a variable that is on a text file.
Thnks.
Example.
1. I´ve got the text file myfile.txt
2. There is a variable in that text file called myvar, and it looks like this ---> myvar=This is a text test.
3. I want to put the value of that variable into a dinamic text variable inside the flash code.
4. Did I make myself clear?
5. Thnks a lot...
View Replies !
View Related
Reading A PHP File
Hi, i do flash games for a virtual pet site and as a sucrity thing the PHP coder wnats me to make it so when it sends the score flash will take a code from a PHP file. This is what coder says:
[Sunday September 15 03:01 PM] _Tommy _: You get the text from flashsc.php
put that text into a variable
lets call the variable... skvar
you then send the score to
flashsc.php?page=submit&sk2=[skvar]&score=[scorevar]
So can someone please help? And go easy, im not exectly the best actionscripter ever
View Replies !
View Related
Reading An XML Doc From Website
Hey guys, have a question about flash reading xml, not to indepth i hope.
Basically, when i run the swf on my comp, it reads the XML file just fine, but when it's uploaded to the server, does'nt want to do it. Any reason why this would be?
thanks.
View Replies !
View Related
Reading Cookie
I need to read some cookie to check whether a user has log on or not. but I do not know the way. I thought I'm suppose to use SharedObjects, but after some failed testing and intensive reading on this, I found that SharedObject is not used to read cookies. It is just some function that is able to do something like what cookies does. So can someone please teach me how to read cookie?
View Replies !
View Related
Reading Filenames
I need to show in flash movie the filenames of dynamicly
loaded jpg's or mp3's,
is there any way I can read their filenames and display it
in flash movie (please without use of some asp or php scripts)?
thanx a lot
View Replies !
View Related
Reading .sol Files
I want to write a lengthy test. I would like to use the shared object to store the students' answers and then print out a hard copy for school records.
I would have about 20 students taking the test at a time on 20 different computers. I am thinking about using a different name for each .sol file and manually collecting the files into one file to be opened later and printed. Is there any way to open the .sol file outside of flash? I realize I could load the file in an swf and print, but this could be even more tedious than what I had hoped.
I am the only teacher pursuing this in my school and funding is very limited and my time to learn additional software is also very limited. Any suggestions???
Thxs.
View Replies !
View Related
? Reading Returned CGI Value ?
OK. I need to send some info to my CGI program then receive and be able to read the response.
I set my info like so:
command="cgiFunction";
version="1";
session_id="2";
password="";
ect...
then use:
loadVariables("http://myserver/cgi-bin/mycgi.exe/varA,diffVar",_root.myMovieClip,"POST");
on the movieclip "myMovieClip"; I have:
onClipEvent (data) {
_root.play();//have stop() on main timeline frame 1
_root.textField = error; //error is the first variable received
}
Now, when I test the movie the clip event runs, so it appears the code works.
However, I can't seem to read any of the values sent back???
If I use debug to view variables I see the info. But it looks kinda like this:
error = "0
error_text=Successful
my_id=test1
my_n ame=nameTest
"
(I have truncated the above a bit for brievity)
the 'error' should be 0 and all the other values are correct, I just can't read them.
It seems like there must be a simple explaination that I am too blind to see.
Any help would be awesome.
Cheers
View Replies !
View Related
Flash Reading ASP
ok i have an asp file that acts as a counter... it reads the number from a .txt file and the adds +1 to the number and stores the new number into the .txt
In my main movie i putted a dynamic textbox with variable name counter. In the action i have Loadvarnum("counter.asp",0) and im not getting the number??? how could i get the number to show?? thanks by the way
View Replies !
View Related
Reading Variables From A Url
let's say I have a url like
www.mysite.com/index.php?name=sam
How can I then use this variable in flash? I figured something like this would be a start but I can't seem to finish it:
PHP Code:
s = unescape(_url);
useURL = s.substr(s.indexOf("?")+1, s.length);
Thanks for the help!
View Replies !
View Related
Reading Xml Problem
When i read a xml file into MX the special characters do not show up.
I know you have to encode the xml (im using spy) however when i save it using encoding UTF-8 same: i get crap instead of special characters.
Any one know what the issue is?
Tnx
View Replies !
View Related
Reading Images From The Dir
Hello!
I wanna create an image gallery, so that it would take all images from the directory and show them to the users in my movie...
problem is - i'm really newbie here
can anyone give me examples or something to read?
thanx
View Replies !
View Related
|