ActionScript 2.0 :: Html In XML ... CDATA Not Working
Jan 2, 2009
I'm trying to do a player roster for a sports team. I found on here as a template. However, I'm having a bit of an issue. I want to be able to format the xml using html in the xml file itself...for example I'd like to be able to insert pictures, make text bold, etc. using html tags in my dynamic text field. I enabled the "render as html" button thing. When I put
[Code]...
View 1 Replies
Similar Posts:
Nov 18, 2010
trying to work with "simple" XML for the first time. I'm building a small CMS for a Flash based site and the content is held in an XML file. My problem is that many of the copy fields are XML CDATA fields. on the one hand, with:
$xml = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOCDATA);
I can pull the data out of that node and the CDATA tags are stripped. My issues come with trying to save the data with:
file_put_contents($file, $xml->asXML());
Problems are: a) tags are interpreted with their HTML entity equivalents. I don't want this to happen.I gather this is coming from the asXML method because even if I do anhtml_entity _decode on the $_POST data it's still being converted.
b) because of the above, there's no way to add the CDATA tags because they also have their charachters converted.
View 2 Replies
Jun 29, 2006
I have this XML File
<?xml version="1.0" encoding="ISO-8859-1" ?>[code]....
now, the problem ... I cant extract the [CDATA[57.14]],[CDATA[14.29]] & ![CDATA[28.57]] to use it ... I tried several things with firstChild,ChildNodes, but no luck ... any one has a simple solution to put all this in an Array so i can get the stuff out to use it ..
View 2 Replies
Dec 2, 2009
The CDATA is working for me, but it will not show certain HTML tags, such as
<ul><ul><li>
and
<up>
<ul><li> is fine, but if I do another level, second levels are on the first level.
View 1 Replies
Jul 5, 2009
I have read through most of the numerous posts relating to this topic (and there are quite a few) but I am still unable to solve my problem. I have a simple AS2 script:
[Code]...
</example>Unfortunately (unless I am missing the concept of CDATA in xml) my text is rendered in flash as:see google <a href="http:google.com>here</a>My ultimate goal is to generate text in flash that is generated from xml and that have a link to external urls. I do not have much experience with xml in flash, i have been looking online but can't seem to figure out what to do. Any ideas?
View 4 Replies
Nov 7, 2007
there my load of xml goes okay but all html styles as... strong.. colorand image dont work what am I doing wrong
AS:
var mydata:XML = new XML("data.xml")
mydata.ignoreWhite = true;
[code]......
View 5 Replies
May 14, 2007
I am trying to avoid having to unescape URL encoded XML nodes by using a CData node element. It is a hassle to URL encode the html to put into the XML which is then read into Flash.This is what I have so far:
Code:
//Create XML with HTML 1.0 tags
myXML = new XML('<![CDATA[<p>This is a paragraph<br><a href='http://www.amazon.com'><b><u>Link to Amazon</u></b></a></p>]]>');
//
//Create dynamic html textfield
[code]....
I know that Flash does not fully support CData, but I'm sure there has to be some workaround.I did try sending the XML toString() but that didn't change anything.
htmlXML=myXML.toString();//create var for conversion from xml to string
I want the textfield to render the HTML--not just display the tags.
View 8 Replies
Dec 13, 2006
trying to convert data into XML and than be readble by flash, why can't macromedia be 'normal' and have some connector that can directly connect to a SQL database
Anyway enough about my rant...
I have a WYSIWYG html editor on my website that generates flash readable HTML code and we use PHP to store the information that is generated as a .xml file to be readable by our flash file. The data is passed via XML but trying to get the HTML tags through without the XML parser thinking its XML and interfering, and I've managed to research find the CDATA tag to pass information in (i dont know much XML, just basics to get it to work) but it doesn;t work!!
When I try to HTML code that is wrapped in the CDATA than it just shows as "null" on my flash file, but if i remove the CDATA tag and put in simple text it seems to work ok! even if i put in
Code:
<b>you better work, damn you!</b> this part is not bold, but doesnt show anyway
than the part in bold shows as bold but anything after that has disappeared
how I can effeciently put HTML into flash and get flash to successfully render it as HTML?!? note I've already used a .txt file unsucessfully and it seems to have LOTS of issues with special characters
View 1 Replies
Feb 19, 2010
In my xml file I use CDATA to insert html code. I have put <object >.. .some flash movie file. .. . </object>. But in front end , I did not get any video played. Why <object> html element does not support + what would be next solution to show my you tube vidoe file.
View 1 Replies
Nov 19, 2009
Simple XML import with text and an html link and an image. For some reason the html tags are rendering as text, not html in the dynamic text field. I have looked at countless posts and tuts From all I've read I am doing things right, but obviously I am not. I must be missing something.ake a look at the attached code and explain where I am going wrong.XML File
Code:
<?xml version="1.0" ?>
<item>
[code].....
View 1 Replies
Jan 18, 2010
Does anyone know an XML editor with buttons to add HTML tags via CDATA?
<?xml version="1.0" encoding="UTF-8"?>
<content1>
<text1>
[Code]....
View 1 Replies
Nov 19, 2009
Simple XML import with text and an html link and an image. For some reason the html tags are rendering as text, not html in the dynamic text field. I have looked at countless posts and tuts but found nothing that helps. From all I've read I am doing things right, but obviously I am not. I must be missing something..[code]...
View 3 Replies
Aug 24, 2007
I need some very urgent help for a project that is on a tight deadline. I have a CDATA node that i'm loading into Flash that has some html in it. Let's just say this is it:
You are <font color='#FFFFFF'>very pretty</font>.<br><br>
When I trace out the xml after it is loaded into flash, it comes out as this:
You are <font color='#FFFFFF'>very pretty</font>.<br><br>
I need it to come through with the tags in tact. How do I go about this?
View 5 Replies
Oct 14, 2008
I am trying to get a link to work in the body text of a text block. I am using CDATA but can not get this to translate to html in the flash. I have checked that the 'Render text as html' box is checked.
Below is my AS and below that is my XML
========================
xml menu stripped down
======================
function CreateMenu(menu_xml) {
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i = 0; i < items.length; i++)
[Code].....
View 2 Replies
Aug 25, 2008
I'm trying to include some JavaScript (JSON 2, to be precise)in with some ActionScript 3 classes. I'm using the inline XML method (E4X) of declaring the data. It looks like this:
public static var JSON_2:XML = <data><![CDATA[
if (!this.JSON) {
JSON = function () {[code]....
Actually, this is only about a quarter of what I need to include but this is where it breaks down. Right after the second slash in the last line, Flash reports: TypeError: Error #1091: XML parser failure: Unterminated CDATA section.
In fact, as you can see this is a perfectly valid CDATA section and isn't being terminated anywhere (there is no instance of "]]>" anywhere in the data). Unfortunately, Flash doesn't think so and seems to think that the backslash is an XML node directive. how to effectively deal with this? The JSON source code has *many* backslashes so not having to convert them would be *very* useful.
View 1 Replies
Oct 11, 2005
my subject is pretty much my problem, i am using MX2004's XPathApi 'selectSingleNode' which is working nicely, i have done a wee bit of fiddling;
Code:
_root.selectedText = "About Us "
centreMe.textContent.htmlText = mx.xpath.XPathAPI.selectSingleNode(this.firstChild,
[code].....
View 2 Replies
Nov 24, 2010
I have an application that was written with Flash Professional 8/AS2 and it parses XML for rendering dynamic media content. The XML pulls text with HTML markup out of CDATA sections and places them into an html enabled text field. Everything has worked wonderfully until Flash Player 10.
Now, if we use html escape characters for greater than or less than symbols, they are being decoded by the xml parser.
Here's my example CDATA section:
Here <u>we</u> go: This <node> <works>
when I grab its value using nodeValue or toString, the results are different from Flash Player 9 to 10. Here's what I'm getting:
[Code]....
In Flash 10, if I escape the ampersand, it will work, but this doesn't work in 9. for example, the following works in 10:
<![CDATA[Here <u>we</u> go: This <node> <works>]]>
This all happens before I assign it to a text field. How do I keep the parser from destroying my escaped characters in Flash 10? Do I just need to drop support for Flash Player 9 and go for what works in 10, or is there a solution for both?
View 2 Replies
Aug 26, 2007
Trying to get a text field in my Flash MX movie to pull from and XML file with CDATA tags to show as HTML. I've checked the box to render as HTML for the text data field... but I'm having problems with the Actionscripting.
The field from this line is what I need to recognize as HTML reading CDATA tags:
this.ref["textField"+i].text = subnodes[3].firstChild.toString()
I know I need to do more than just change it to ".html" instead of ".text" and have tried a couple things, but nothing seems to work.
Code:
//Create the XML Object
myXML = new XML ();
myXML.load(newXml);
[Code].....
View 1 Replies
Jan 31, 2011
I've made a basic RSS news feed widget with a preloader. When I test the preloader in Flash it works fine, counting to 100% and bringing in the widget proper at the end. This happens both if I test the movie outright or simulate the download.
But now I've embedded the preloader in an HTML file using swfobject 2.2, and the browser will only display the first frame of the preloader and go no further, ie it 'freezes' at 0%. When I open the actual preloader .swf file, it's the same - it just stops at 0% even though it worked fine previously when
I exported it from its .fla file.Weird thing is, if I bypass the preloader and embed the widget file in my HTML, it works fine. This is for an assignment however, and I need to build a preloader as part of the criteria.All files (ie the widget .fla and .swf, the html and the preloader .fla and .swf) are in the same folder. Someone advised me when I made a bitmap in the preloader into a movie clip to uncheck the "export in frame 1" box, so I did this. It didn't work. Then someone else advised me to make sure the textbox containing the percentage count was a classic textbox with dynamic text. I did, and it's still not working.
[Code]...
View 4 Replies
Aug 6, 2011
Okay so i`ve created a website on flash mx , converted it into html .. uploaded on domain on member.webs.com.. here is the link of file nawazbaig.webs.com/website2.html .. it shows up the blank page . ? it is running perfectly fine on my computer.. but on domain it is not working.. here is the code of html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>[code].....
View 5 Replies
Feb 29, 2012
I have this bit of code for a simple button:
import flash.events.MouseEvent;
import flash.ui.Mouse;
movieClip_1.buttonMode = true;
movieClip_1.useHandCursor = true;
I can see the cursor in flashPlayer, but once I put this in an html doc, I don't see the hand cursor any more.
Do I need to be adding something to the html as well, or is more code needed? For some reason, I thought this used to work... maybe that's just the old school AS2 buttons?
View 3 Replies
Nov 10, 2010
I have created a "scrolling image" made by adding extreem limets to a basic panorama file.The idea is that when the user moves the mose to the left or the right, the image then scrolls that way.Everything works as it is supposed to when previewed in flashplayer and projector. However when i try to add the swf to a HTML or genarate the HTML straight from flash the scrolling function does not work. the buttons and other items work but the scrolling does not. i have tried multiple browsers with the same result.here is a copy of the code (nav1 is the instance name of the movieclip i am scrolling):
Code:
stop();
//stage.displayState = "fullScreen";[code].......
View 0 Replies
Jan 20, 2010
i place 3 dynamic text fields on the stage with embed fonts for regular, bold and Italic side from the font symbols you see I reference in my code.
Code: Select allvar arnoReg:Font = new ArnoReg();
var arnoBold:Font = new ArnoBold();
var arnoItalic:Font = new ArnoItalic();
[Code].....
View 1 Replies
Oct 30, 2009
My HTML tags are not working in a dynamic text box. Im guessing it is cause of the scrolling and maybe it dosn't see <br> so it dosn't allow them. This is the code i am using below.
TextField.prototype.maxviewable = function(){
if(this.maxscroll>1) return this.bottomScroll;
var b = (this.html) ? this.bottomScroll-1 : this.bottomScroll;
if (!this.length) this.text = ">>";
[Code].....
View 1 Replies
Mar 18, 2009
I created a clock with an hour, minutes and seconds hand. The clock movieclip has two frames to it and on the first frame, the following code:
seconds = _global.clockTime*6;
minutes = (_global.clockTime/60)*6;
hours = ((_global.clockTime*30)/3600) + 120;
[Code]...
View 1 Replies
Aug 28, 2010
I am building a website through flash. For the past couple of weeks all of the links have been working fine up until now. I have no idea what I could have possibly done to make this happen. In HTML none of the links work. They are all linked up fine, I even re-linked some of them. Nothing happens. The buttons do nothing.
View 7 Replies
May 17, 2009
Normally i would publish using Flash CS4, however SEO requirements dictate that i need to use SWFObject. now, i have all the same publishing settings as i would have using AC_FL_RunContent.however, it doesnt 'center':
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>[code].......
however when i use SWFObject, i doesnt not extend the dimensions, it does not scale to natual size, and it does not center in the browser. it just sits on the top left of the screen.either there is something very wrong with the javascript or i have made a mistake with the parameters.
View 1 Replies
Apr 13, 2011
the following code works on everything except Chrome:
<a target="_blank" href="/FooodJournal">
<object width="265" height="135">
<param name="movie" value="2991BCTTor/xx.swf">
[Code]....
Flash is being used to create an animated button, and the anchor tag makes it so you can click on that to go to another page. On most browsers, you can click anywhere on the Flash object and the link works...but in Chrome, the link displays in the status bar when you hover over the flash element, but does nothing when you click it. However, there is a small area (about 19px) below the flash element where the link works.
How can I get this to behave the same way in Chrome as it is in other browsers?
View 2 Replies
Mar 9, 2012
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='165' height='37' id='niftyPlayer1' name='niftyPlayer1'>
<param name='movie' value='audio/niftyplayer.swf?file=/audio/tarantella.mp3&as=0'>
[code].....
View 1 Replies
Feb 11, 2009
I have a html file which has flash in it. The flash has few buttons on it. WHen i just click on the html page, the flash works. However, when i get into the html file from other pages, which i use action script getURL to link it. The html file show the flash but the buttons in it is not working.
View 1 Replies