ActionScript 2.0 :: "Displaying XML Data In Flash" Tutorial
Oct 20, 2007I've been learning about XML in AS2 lately, and I've started the "Displaying XML Data in Flash" tutorial, but there is something i don't get:
[Code]...
I've been learning about XML in AS2 lately, and I've started the "Displaying XML Data in Flash" tutorial, but there is something i don't get:
[Code]...
Just got through with the "Displaying XML in Flash" tutorial and it was very easy. I took the XML document on the tutorial and created more childNodes within the parent node. The problem is that I cannot get the actionscript to display text in the text window beyond the first child node.I noticed in the [URL] that it tells how to get other data from the first child node but not the second.
XML:
<?xml version="1.0"?>
<flashcopy>
<intro>
[code]....
Is there a way to show data in flash rather than using the components? Something like name and date of birth in a table format somewhat. I'm trying to get something like the datagrid, but somehow I can't style it the way I want to. So, I'm kinda looking at other methods.
View 1 RepliesI sent an email to pom regarding a tutorial that he wrote, but the email was bounced and he hasn't replied to my PM. I have followed both of pom's tutorials that involve experiments with perspective in Flash, but I have encountered a problem while attempting to duplicate a movie clip symbol in the second tutorial ([URL]). I have a single instance of the "ball" movie clip symbol appearing at random positions. However, I cannot seem to successfully duplicate the symbol instance at random positions using the loop that pom provided:
[Code]....
how to get data from xml -file to flash. Now I have ran into a problem with it. I dont know how to get multiple news from a xml file. Ok ok..This might be easy for a pro but fer me its a killer
[Code]....
And changing the node properties/values (All this in one frame) I get just one news and its the last one specified in the code *sigh*..So lost with this... I know there SHOULD be easier and better way to do this..
i have been following the tut "displaying XML data in flash" and i understand what is going on, I have created my XML file that i want to display in flash.I am now slightly confused as to what to do next as i want to create a movie clip which runs through in a loop displaying the different lines of text in the XML file.
View 1 Replieswhen I run the following code in the getvars.php and click the submit button in flash ----
<?
// Receiving the variables.
$name = $_POST['name'];
$age = $_POST['age'];
[Code]....
I am trying to display few data from a PHP (which communicates with a second php that uses a database) into flash.I have created the code needed, but when tracing the php I get "Array" as a result of the trace. How can I display the data that is inside that php array into flash?
View 2 Repliesgetting data from a database and displaying it in a Flex (Flash) swf. Currently I have some C# code that gets the data from the DB and saves it to an XML file on my site. Then the .swf reads that xml file.
protected void Page_Load(object sender, EventArgs e)
{
DataTable _dt = new DataTable();
_dt = ProductList.GetProductssForAdmin(10);
[code]....
I am having an issue with ColdFusion's CFChart tag. I have a couple graphs that do not display properly. For a horizontal bar chart, when attempting to display 50 or more chart data items, the graph's bar labels stop plotting, but keeps plotting the bars themselves once it gets to bar number 50. I noticed making the chart height larger makes the issue worse as well. If i go from 1000px pixels to 2000px, it stopped plotting labels even sooner. The query that populates the chart items do not return blank label names either. See the screen below, the labels should keep plotting after "7 to 1".
I am running on ColdFusion 8 Developer Edition. Is this a possible limitation for ColdFusion's native charting capabilities? Or should I consider checking out Flex Charting instead?
<cfset hideZeroData = "25">
<cfparam name="paramID" default="25">
<cfset ecfData = QueryNew("ecfName,cumValue")>
[Code]....
I am trying to get a handle on XML and as such I am going through Kirupas tut on displaying XML.Unfortunately I cant een get past the first page without something going wrong.I have saved my inventors.xml and the test page all in the same directory.The inventors.xml looks like this:
Code:
<?xml version="1.0"?>
<inventors>
[code].....
I have a static, UTF-8 encoded XML document that gets loaded by a custom movie clip class into an array and then items from the array are read and displayed in a dynamic text field that is attached to the movie clip,depending on which one is rolled over.Everything works perfectly except that an ampersand displays as & apostrophes display as ' and quotes display as ", even if I use the special character inside the XML.Higher level character codes actually display properly, so character codes for circle shaped bullets,registered trade mark symbol, Greek characters, etc, work! But a blessed ampersand does not.Setting the dynamic text field to either read as HTML or not read as HTML makes no difference.
Using CDATA tags in the XML makes no difference.In fact,when I use CDATA tags and enclose text containing a special character code, Flash goes the extra step of converting the ampersand in the special character code to &!! So" becomes "Using & just gets converted to &.So Flash's XML parser is parsing the & to an ampersand,which Flash's text parser then converts to &. WHY? And how do I stop it?
I found the function below to clean out the unwanted characters,and it works,but it seems a ridulous length to go to.And I probably have to extend it to accomodate whatever other characters don't work in Flash, but I don't know what those might be until I encounter them. Also,the function works whether I use a special character in the XML or not. ie, if I put an actual "&" into the XML, this function will display "&" and if I put & into the XML,it will still display as "&".
have mysql set up and have my php set up which retrieves the data from sql database but i cant seem to make the label or dynamic text box to display the datais my php code
PHP Code:
<?php
$conn=mysql_connect("localhost","root","") or die(mysql_error());
[code].......
Im a bit of a novice with flash and have become stuck while trying to achieve what should be a simple task. I am trying to read in XML data and display the lables in a combo box and then display the corresponding data in a text field below. So that when for example "Vintage Red Wine" is selected in the combo box, the description for that wine will then be shown in the textfield below.Most of the code is functional. The combo box displays the information i want. The only thing that doesnt want to work is the text field which should show the wine decriptions.
Here is my XML data:
<?xml version="1.0" encoding="utf-8"?>
<Wines>
[code].....
My data grid is displaying stale data, rather than the real time data available in it's data provider (array collection). I've tried refeshing the data in the collection, but that has no effect. Below is my code, does anyone see what could be the problem?
<mx:Accordion/>
<fx:Script>
<![CDATA[[code].....
is it possible to display the output window's contents into a textField so it can be seen in the SWF?
Has anyone tried this?
I want to build a flash movie displaying data from an XML file from snow-forecast.com.The file is attached.
I realy do not have enough knowledge of XML.
The file contains data for 6 days forecast.
The structure is All days are in array <periods>
How can i read and parse data in a flash movie for each day? Just give me an example of the first two days _pdayname and the params _pmax _pmin for <max> <min> and <mid>
I have built a catalog in flash that was orginally built in InDesign and exported but it has some small content that is hard to read for the elderly users viewing it and I would like to add a zoom feature or some type of magnifying glass.
View 1 RepliesI have grabbed out the namedpair from php and the output from php is as follows:[code]But when i run, the output windows shows undefined for all my variables. I can display out my variables if I just use this.MuscleDesc0, this.Name0, this.ExID0 and output window will show the first set of variable which is Bicep, Bench Press, 2 respectively.But when I used the for loop, its all undefined. Is it something wrong with my for loop declaration? Can someone tell me how i can amend my for loop to display it?
View 1 Repliesbelow is the code I am using for my PHP script and my AS3 function which I am testing my PHP script is printing the following:
Code:
foo=bar&id_0=1&xfrom_1=100.00&yfrom_2=100.00&xto_3=200.00&yto_4=200.00&xcurrent_5=100.00&ycurrent_6=100.00&typeid_7=1&userid_8=1&date_9=2010-10-
[code].....
I have grabbed out the namedpair from php and the output from php is as follows:
MuscleDesc0=Bicep&Name0=Bench Press&ExID0=2&MuscleDesc1=Bicep&Name1=Bicep Curl&ExID1=1&MuscleDesc2=Bicep&Name2=Crunches&ExID 2=20&MuscleDesc3=Bicep&Name3=Desmond&ExID3=21&Musc leDesc4=Bicep&Name4=Hill
[code].....
I am looking for a tutorial called Senocular's 3D car race tutorial
View 1 Repliesoriginal: I really just need to figure out how to center the pictures. here is what I did I have modified the tutorial that I finished to have a bigger stage for bigger pictures. Everything is working properly but the pictures are displayed on the left side, I want to have them centered in the stage for the images, after clicking on the thumbnails, plus my images are different sizes as well. ranging from 200x410 to 744x410 but all are the same height of 410. i will post up what I am talking about at the end. I believe it is something within either the action script or the xml coding that allows the position of the image to be differently? please help here is what i am talking about[URL] Continued: Here is my coding in action script:
[Code]....
i did a function the captures the stage and save it to bitmap datai want to display that bitmap data on a different frame what code should i do (the bitmap changes becuse the capture function triggerd alot);
View 3 RepliesI have a custom dataGrid that acts more like a 2D list (if that makes sense at all). I am dynamically creating the columns and recreating the dataProvider to suit my needs. While debugging I can see that I am creating the columns and setting them to the dataGrid and creating and setting the dataProvider, but for some reason I am able to see the dataGrid and the columns but not the data.
[Bindable]
private var mockData:ArrayCollection = new ArrayCollection([
{value: "425341*"},
{value: "425341*"},
[Code]....
I have a Android Air project written in AS3, when the project starts I am loading the music and loading the XML file to be parsed. In the first frame I call my classes to parse the XML and set the nodes at strings, and to play the audio, these both work fine. Also in my first frame I am declaring some textfields to input the data from the XML file so that when the user enters frame 3 the user is able to see this data from the XML file. This also works fine. The problem I am having is going between frame 4 and back to frame 3, the data in the textfields disapears? I trace the strings from the XML class that are holding the data and these values appear everytime, but going from frame 3 to frame 4 and back to frame 3 wipes out the textfield display?
Ok here is some code from frame one where I am declaring the textfields
var name1TextField:TextField = new TextField();
var name2TextField:TextField = new TextField();
var format:TextFormat = new TextFormat();
[Code].....
Previously above I had stated that I am calling the audio class and the xml class from the first frame, declaring the text fields and moving on from there. Now I have decided that since this XML file is a list of scores and coded be always changing, I thought it would be good to load and parse this file everytime I enter frame 3. The same thing is still happening, I have my scores display and then when I go to frame 4 and back to frame three, the scores do not display, but when I trace the data from the class, it displays properly.
This is the data, and you can see that it has an indent on its first line.
Where I would like to see this:
This is the data, and you can see that it does not have an indent on its first line.
Some of the code,
// Define variables
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
[Code]....
I suspect that it has to do with prettyIndent and prettyPrinting, and I could not make it to work.
Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next when we click on the button for the second time(or anytime) it is not going and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
my Code looks like this:
submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
function onCheck2(evnt:MouseEvent):void {
var xmlLoader:URLLoader = new URLLoader(); var xmlurl:String =
[Code].....
I'm attempting to display external XML data in a dynamic text box. When I test preview my code, the information that I want to display shows up in the Output window, so I know that its linked and works. My trouble is creating the code that will link to my (txtBox) and displaying when previewed.
View 5 Repliesi have this code:
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
[Code]....
It works, in the output it tells me the tweets. but i need it to be displyed on the app, i need to no how to do this, someone pointed me in the direction of using a item renderer extended from sprite? But really all i need to do is display it in a text field, all i want to do is display the data.