ActionScript 3.0 :: Flash Noob Treated Roughly While Parsing XML?

Aug 24, 2010

I'm linking an XML document to a Flash file to control all sorts of things and it's going quite well until i tried to fill a dynamic text field with a paragraph of type from the XML document. I've done this a million times in AS2 and I've done it in AS3 using attributes, but this time I'm using childNodes. The dynamic text field is in a movieclip. When I tested it using this code:

var oneComments:String=xmlTestOne.firstChild.childNode s[num].childNodes[1];
oneClip.txtComment.text=oneComments;
...it sort of worked but I get the element tags along with the paragraph text.

[code].....

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Floating MovieClip That Stay Roughly At Same Spot

Aug 5, 2009

I'd like to make a movie clip float about, but stay in roughly the same spot? I'd imagine a simple bit of AS inside an onClipEvent (enterFrame) would work.

View 0 Replies

ActionScript 2.0 :: Created The Main System Which Works Roughly As Follows?

Apr 29, 2002

i'm creating a flash news scroller that accesses an external file to read news headlines.I've created the main system which works roughly as follows.The main movie clip reads the external headlines & related article texts from a file (using loadvariables) and puts them into an array.I loop over the array creating several new instances of a movie clip (lets call it "news_piece"), placing one above the other. "News_piece" contains 2 text fields called "Headline" and "Article", so i change the contents of these for each instance of the movie, retrieving the contents from the array.The outer movie then scrolls the lot.It works pretty well.

Now comes the difficult bit...stay with me... sometimes the headlines can be 1, 2 or 3 lines in length. So, if I want the article text to start directly below the headline, I guess I'll have to move the lower Text field ("Article") a bit higher in that particular instance of the "News_piece" movie.So, to summarize, I wanna move the co-ordinates of a text field in an instance of a movie clip.

View 1 Replies

ActionScript 3.0 :: Shapes Drawn Dynamically Treated Differently

Sep 15, 2009

I was just conducting a little experiment, basically trying to come up with a stage resizing handler that would position everything on the stage with its x and y proportionate to its original position. That's when I discovered a very interesting thing.

Shapes that you draw using flash's drawing tools are treated completely differently than dynamically drawn shapes. Basically shapes you draw on the stage in the authoring tool would seem to have no x and y of their own, and also no matter how many different shapes you draw, to the compiler it's all one "child" object because it's all just one big shape.

To illustrate this difference, I created two separate files, but they both (seemingly) do essentially the same thing. In the first file, I drew a red circle shape dynamically with code, and set its x and y with code:

ActionScript Code:
var circle:Shape = new Shape();
var g:Graphics = circle.graphics;
g.beginFill(0xFF0000);

[code]...

In a second file, I manually drew a similar red circle shape, made it 100 pixels wide and tall, and positioned it at 100, 100 using the properties panel. This time, I took away the code that creates the circle dynamically and just kept the for loop:

ActionScript Code:
for(var i:int = 0; i < this.numChildren; i++) {
var item:DisplayObject = this.getChildAt(i) as DisplayObject;
trace(item);   //[object Shape]
trace(item.x); //0
trace(item.y); //0
}

In this second example, no matter how many and what kinds of shapes you draw, there will only ever be one display child and the x and y is always 0,0.

I for one kind of wish there were more of a one-to-one correspondence between the Flash IDE and the code window. Like, if we can create Shapes and name them dynamically, why can't we create Shapes and name them at authoring time? Or why isn't this now the role of the good ol' Graphics symbol? It's kind of like Flash and Actionscript have outgrown the authoring environment.

This would seem to have the effect of further widening the gap between design and development. Just thought I'd throw all this out there and see what kind of comments I get.

View 2 Replies

ActionScript 2.0 :: Input Text To Be Treated As Number NOT String?

Sep 22, 2009

I have an application that is trying to sort of scores. The problem is that when it tries to sort it errors as it is checking if one string is less than another string when it should be doing one number less than another number.

I have played with parseInt but I haven't managed to get it to work?

Code:
this.onEnterFrame = function() {
if (parseInt(yourtime_txt.text)<parseInt(pos1time_txt.text)) {
pos1time_txt.text = parseInt(yourtime_txt.text);

[Code].....

View 7 Replies

ActionScript 3.0 :: Creating Two (can Be More Or Less) Rows Of Layered MC Treated As Buttons?

Nov 11, 2009

Basically I'm creating two (can be more or less) rows of layered MC treaten as Buttons.In each MC there is a small thumbnail hidden behind a coloured layer. When roll_over the coloured layer, this alpha goes to 0(zero) and entire MC resize +10% over x and y.On roll_out the opposite occurs, everything should get to the original alpha and size.The Problem: when moving the mouse really fast over the MC's and stop suddenly over one of them it starts 'blinking'

Code:

for(var i:uint =0; i<16; i++){
var miniPnt:MovieClip=new LittlePantone();
miniPnt.x=_xc;
miniPnt.y=_yc;

[code]....

View 2 Replies

ActionScript 3.0 :: XML Still Consider To Be At A NOOb Level

Feb 4, 2010

I have a two questions regarding XML and AS3. Even though I've been using flash for a few years now I would still consider myself to be at a nOOb level... Question One: Basically I have a website (all in flash) and there's a passworded section for clients to access their own information. Previously I've done this by adding the username and password info into the flash movie itself each and every time I have a new client - which works but is very time consuming (considering the number of clients I'm getting now). Is there a way that I can put all the names and passwords into an xml file, and flash checks it?

Question Two: Up until now, once a client has entered their username and password it takes them to a new .swf that has their info in it. And once again, I've been creating separate swfs for each clients (and again, time consuming). What I would love is after they've entered their username and password it takes them to a different scene or frame (still in the original swf) that has dynamic text fields that load the info from an xml file. I assume that these questions have relatively simple solutions, but I'm not sure how to do it.

View 9 Replies

Professional :: Noob Regarding SWC Files?

Jun 26, 2010

I am relatively new to flash. I have made a DJ application that streams it's audio live across the internet.The audio format is OGG. I noticed that Adobe have released an Alchemised version of vorbis here [URL].. I am not expecting anyone to tell me exactly how to get a player working but could someone give me some pointers??

View 1 Replies

ActionScript 3.0 :: Button Problems From A Noob?

May 27, 2009

I'm trying to make an escape the room game.  I've set up four different views of the room, each separated by ten frames in the timeline.  I'm working on writing the Actionscripts to make the navigation buttons.  I've gotten the first one to work, but when I use the same actionscript for the second button and test the movie, the movie just keeps running from one view of the room to another, despite the fact that I have stop scripts set up for each frame.  I'm sure it's really obvious what the problem is, I just can't figure it out. 

[Code]...

View 5 Replies

ActionScript 3.0 :: Total Noob Having Difficulty Accessing Clip?

May 8, 2009

I am working on my first AS3 project, working on an upload routine for images. Simply, I upload an image and place it on the stage. Piece of cake. Now, what I can't figure out, is how to apply a filter to it. For some reason, I have a big ol brain fart about accessing my clip. I've positioned a clip on the timeline and can apply my filter to it, so it is definitely a reference issue.

Code:
/*
displayImage imports the uploaded image onto the stage,

[code]....

View 1 Replies

ActionScript 3.0 :: Random Color With Certain Range Noob Style?

May 25, 2009

I am trying to exclude dark(er) colors, not sure this is the right way, but its the best with my level of knowledge

Code:
var color:uint = (Math.floor(Math.random() * 0xFFFFFF));
function randomColor(color:uint):uint {

[code].....

View 2 Replies

ActionScript 3.0 :: Definition In Namespace Internal- Noob In Distress?

Oct 25, 2009

I am fairly new to programming and i have gone through a few flash cs4 as3 tutorials and recently i have started to try and alter them. The one i need help with is a number guessing game where you guess a number between 1 and 10, and i am trying to change it to a color guessing game, where you guess either "red" or "blue".

I keep getting an error in line 5 "var red = true;". The error is 1151: A conflict exists with the definition red in namespace internal. There is also a "Warning:3596: Duplicate variable definition" for the same line. Here is the code:

[Code]...

View 3 Replies

Actionscript 3.0 :: Total .noob() - Play A Movie Via An XML Generated List

Jul 19, 2009

you may quickly determine I am totally new to flash and actionscript. Tried learning it a while back but got distracted and just started over. Trying something that I thought would be real simple only to discover that nothing about AS is simple... So I wanted and play a movie via an XML generated list. Followed one of the tutorials here and tried to adapt it for video. The list works and the path for the video traces properly but for some reason the video never appears on the stage. I can take out the variable "vid" and put the path in manually without changing the structure and it works fine. Can someone point out my error. And if I am totally doing this wrong I am open to criticism as long as its constructive.

[Code]...

View 4 Replies

ActionScript 2.0 :: XML And Flash Parsing?

Apr 13, 2009

I have a couple of questions that I hope someone can answer. I have this ActionScript that reads the XML file into the flash movie. The poblem is this: The XML is in this format:

<listitem name="TEST" url="rtmp://000.000.000.000/">
<stream len="-1" name="Test" start="0"/>
<group name="Testing"/>
</listitem>

[code]....

View 1 Replies

ActionScript 3.0 :: Parsing XML To Flash?

Sep 26, 2008

This is my first day to try and use XML to display dynamic text in Flash. My skillset is weak with AS3 and Flash, but I found some tutorials online and I have managed to successfully display the first record in mytest.swf. However I also seem to have all records displaying in each dynamic text box as well. My loop isn't stopping after each record. It's reading everything. And dumping the results into each text field.

I need to only display each record individually. Once I accomplish that, I will need to include some form of navigation. Lets say buttons that perform a NEXT, PREVIOUS, LAST, FIRST type function. Then lastly, I'll need to include some type of search navigation option by item number. I assume that I'd have to have a second screen that links to my primary results screen with an input form for the item number.

[Code]...

View 3 Replies

Data Integration :: PHP And Flash Parsing ?

Jul 14, 2006

I have a flash application which contains a "dynamic text"with a var name "myVar" and an instance name "dt_txt".I have a button to which I attached the code:
____________________________________
on (release) {
var lv = new LoadVars();
lv.load ("[code].............

View 2 Replies

Xml :: Flash - Parsing With Nodes Containing Underscores?

May 5, 2010

How do I parse an XML document that contains nodes where underscores exist?

<some_xml>
<child_node>
<child width_info="" height_info="" />

[code]....

View 2 Replies

Flash :: Parsing A MovieClip For Children?

Nov 9, 2010

How can I reliably iterate through a MovieClip for every child?

I'm working on a game and a great way to lay out my levels is inside a MovieClip, with each frame being a new level. The problem is that when I move on to frame 2 or 3 and try to iterate through the MovieClip's children, I'm getting a different number (less) than is actually on that frame.

I think it's because the instances from the previous frame are being carried over to the new frame.

A simple solution is to create a new MovieClip for every level instead of a new frame inside each MovieClip, but this isn't the most scalable solution (say I want to remove a level or add a level between other levels, etc).

View 3 Replies

Actionscript 3 :: Flash Cs5 - Parsing A Path?

Nov 19, 2010

I'm using a URLLoader to load a photo and I want to be able to display the filename of the photo based on the URLLoader's loaderInfo.url property.Given a loader named photoLoader, what the string called fileName be?

View 3 Replies

Flash - How To Calculate XML Parsing Time

Feb 19, 2011

I want to calculate the parsing time....
package {
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.events.Event;
import flash.net.URLRequest;
public class Graph extends MovieClip {
[Code] .....

View 1 Replies

Php :: Parsing Flash Cookies (.SOL Files)?

Sep 1, 2011

Is there a PHP library/class which provides parsing capabilities for Flash cookie files (.SOL) by any chance? I'm trying to avoid writing one myself :)

View 2 Replies

ActionScript 3.0 :: Parsing Inline CSS In Flash CS3?

Nov 2, 2009

I have a php/mysql backend which allows user to enter descriptions in a form. The editor is the Innova editor and automatically turns <strong> and <b> tags into <span style="font-weight: bold;">. When I retrieve the xml in flash cs3 and output it in a textfield the text paragraphs and all spacing is preserved however, bold and italics etc. don't render at all.

Is there any actionscript code or 3rd party libraries I can use with my fla to get this to render?

View 5 Replies

ActionScript 2.0 :: Parsing XML Into Flash On Buttons

Nov 13, 2004

just here and been trying to do this tut here on kirupa thats supposed to be introductory level, although I am finding it very difficult. Here is the link to the tut section I am particularly having issues with: [URL] Now, I have been at this thiing for about 8 hours today and for whatever reason, the xml nodes are not parsed though to Flash and placed on the Buttons dynamic text field for button titles as they should be. You will notice the tuts sample to see what I am trying to achieve here. I attached a zip of my files that I have been working with to get a grasp on this whole xml and Flash bizness.

Any of you dynamic guru's out there that can take a peek at my .FLA file to see where I am wrong in my code? I followed the tut word-for-word and nothing code-wise is jumping out at me or "red-flaged" as the reason for the buttons titles not appearing once the movie is published.

View 1 Replies

ActionScript 3.0 :: Flash XML Parsing Failed?

Jan 25, 2011

PHP Code:
var xml:XML<manifest xmlns="http://www.imsglobal.org/xsd/imscp_v1p1 xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSc

[code]....

View 10 Replies

ActionScript 2.0 :: Parsing XML Into Flash On Buttons?

Nov 13, 2004

the xml nodes are not parsed though to Flash and placed on the Buttons dynamic text field for button titles as they should be. You will notice the tuts sample to see what I am trying to achieve here. I attached a zip of my files that I have been working with to get a grasp on this whole xml and Flash bizness.

Any of you dynamic guru's out there that can take a peek at my .FLA file to see where I am wrong in my code? I followed the tut word-for-word and nothing code-wise is jumping out at me or "red-flaged" as the reason for the buttons titles not appearing once the movie is published.

View 1 Replies

ActionScript 3.0 :: Flash List Box - Parsing XML Data

Dec 2, 2010

I want to display a list box in a different way. I have uploaded the image as well i.e., what exactly am looking for and how the list box has to look. I am parsing the xml data and it's coming fine in list box. but my requirement is the look n feel of list box.

Flash code :
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("news1.xml"));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseNews(xmlData);
[Code] .....

View 2 Replies

AS2 :: Flash Parsing XML Without Loading An External File?

Nov 8, 2009

In my flash, the socket server returns some xml data that I need to parse, but it seems that the only way to start the XML object is with the XML.Load() which loads an external file, but my XML file is already loaded into a variable

trace("raw: "+msg);
msgArea.htmlText += "update remote player loc";
var playerLocXMLOb = new XML(msg);

[Code]....

View 4 Replies

Flash :: Parsing X-amf Mime Type Data?

Nov 27, 2009

I have intercepted x-amf data being posted to a website from my computer by a flash application. I have the collected POST data in hex form. While some of it has translated directly to text, the rest is showing wierd symbols which probably means they're flash objects. How do I parse this data to get meaningful output outta it?

Basically, I need a script/program/anything that will take in amf data in the hex form, and output text and flash objects...

View 1 Replies

Flash :: Using A Variable In Xml Parsing And It Doesn't Work?

Feb 4, 2011

My problem is that I am using a variable to identify an element section of the many galleries I have under the tag "galleryType" and nothing is returning for me to display. Am I searching for my galleryType the right way in my code or do I need to loop through my galleryTypes on my XML.

here is my xml code:

<My_gallery>
<galleryType Name="GalleryName001">
<images>

[Code]....

View 2 Replies

ActionScript 1/2 :: Parsing Data Form Website Using Flash?

Jan 12, 2011

Can anyone tell me how to create ActionScript to parsing data from website?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved