ActionScript 2.0 :: CDATA To Pass HTML Via XML Into Flash

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


Similar Posts:


Php :: SimpleXML, CDATA And HTML Entities - Tags Are Interpreted With Their HTML Entity Equivalents?

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

ActionScript 1/2 :: Flash Player 10 Removes HTML Encoding In CDATA When Parsing XML

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 &#60;node&#62; &lt;works&gt;]]>
 
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

ActionScript 2.0 :: XML - Cant Extract The [CDATA[57.14]],[CDATA[14.29]] & ![CDATA[28.57]] To Use It?

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

ActionScript 2.0 :: XML CDATA And HTML Formatting

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

ActionScript 2.0 :: CDATA Not Rendering HTML?

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

ActionScript 2.0 :: Xml CDATA Formating Html?

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

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

ActionScript 2.0 :: Dynamic TextField With HTML 1 XML CDATA?

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

ActionScript 2.0 :: CDATA Not Showing HTML In Text Field?

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

ActionScript 3.0 :: XML Editor With Buttons To Add HTML Tags Via CDATA

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

ActionScript 2.0 :: CDATA Not Showing HTML In Text Field

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

ActionScript 2.0 :: Don't Want CDATA Node To HTML Escape Characters?

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

ActionScript 2.0 :: Getting Html Text To Display From Xml File Using CDATA

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

ActionScript 3.0 :: Inline XML With CDATA Error #1091: XML Parser Failure: Unterminated CDATA Section?

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

ActionScript 2.0 :: MX2004: XPathAPI CDATA SelectSingleNode And HTML Formatting?

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

ActionScript 3.0 :: Way To Pass Vars In From HTML To Flash?

Jun 23, 2009

I've read a variety of pages that describe how to pass a variable into a flash movie (AS3, player = v9) from the html in which it is embedded. This page describes AS3 but neglects to mention what to do with the object and embed tags in the noscript section. Furthermore, I'm not sure the javascript I see generated in my page looks like the example there (the js in my page doesn't check AC_FL_RunContenta against zero)This page is quite long and appears to deal mostly with AS1 and AS2 approaches which I have used before and neglects entirely the newish javascript approach which appears to be used to embed flash these days (i.e., the javascript function AC_FL_RunContent).I was wondering if someone could spell out the proper way to pass in a variable from HTML so that flash can see it in such a way that works even if javascript is disabled, in all browsers, etc., etc.

View 2 Replies

ActionScript 3.0 :: Pass Vars From Html Into Flash?

Jun 23, 2009

I've read a variety of pages that describe how to pass a variable into a flash movie (AS3, player = v9) from the html in which it is embedded.  This page describes AS3 but neglects to mention what to do with the object and embed tags in the noscript section. Furthermore, I'm not sure the javascript I see generated in my page looks like the example there (the js in my page doesn't check AC_FL_RunContenta against zero).  This page is quite long and appears to deal mostly with AS1 and AS2 approaches which I have used before and neglects entirely the newish javascript approach which appears to be used to embed flash these days (i.e., the javascript function AC_FL_RunContent). I was wondering if someone could spell out the proper way to pass in a variable from HTML so that flash can see it in such a way that works even if javascript is disabled, in all browsers, etc., etc.

View 3 Replies

Pass Variables From The HTML The Flash Is Embeded To The SWF?

Oct 28, 2009

how to pass variables from the HTML the Flash is embeded to the SWF, but can I send text to a SWF from another HTML page?
 
Here's the setup:
 
On page one.html there is a SWF with a dynamic text box in it with the instance of "txtBox".
 
On page two.html, the only thing on the page (including code) is "hello".
 
I'd like the SWF on page one.html to say "hello" in the text box.

View 4 Replies

ActionScript 3.0 :: Pass Text From Flash To Html?

Dec 23, 2011

How to pass text from flash to html?

View 4 Replies

Php :: Flash - Pass UTF8 String Into HTML API?

May 13, 2010

so I have my php API (html Get api for Flash builder and C# apps). So if you want to submit data to it you use string like

[URL]

If there are english letters in it its ok. But what if I need to pass UTF-8 string like this &#1056;&#1091;&#1089;&#1089;&#1082;&#1086;&#1077; &#1048;&#1084;&#1103; to my api what shall I do?

View 1 Replies

ActionScript 3.0 :: Pass Vars From Html To Flash?

Jun 23, 2009

I've read a variety of pages that describe how to pass a variable into a flash movie (AS3, player = v9) from the html in which it is embedded. This page describes AS3 but neglects to mention what to do with the object and embed tags in the noscript section. Furthermore, I'm not sure the javascript I see generated in my page looks like the example there (the js in my page doesn't check AC_FL_RunContenta against zero). This page is quite long and appears to deal mostly with AS1 and AS2 approaches which I have used before and neglects entirely the newish javascript approach which appears to be used to embed flash these days (i.e., the javascript function AC_FL_RunContent).

I was wondering if someone could spell out the proper way to pass in a variable from HTML so that flash can see it in such a way that works even if javascript is disabled, in all browsers, etc., etc.

I've tried to attach the HTML generated by the Flash IDE to this topic but both HTML and zip format were rejected for some reason.

View 3 Replies

ActionScript 3.0 :: Pass Image Src From Js On HTML To Flash?

Nov 16, 2009

i'm trying to pass image src from js on my html to flashe from some reason it's not working...

var result:Object = call("progress");
function call(func:String):Object
{

[code]....

View 2 Replies

ActionScript 3.0 :: Pass Variables Between Flash And HTML?

Feb 9, 2010

I've read tutorials everywhere which use PHP scripts etc.etc. to send data between the web page and flash. I am planning to play music from a web-page which is shown inside the flash application. The user clicks a hyperlink, and the url is given to the flash application, and the song is automatically played.

View 3 Replies

ActionScript 3.0 :: Pass Value To HTML/javascript From Flash?

Sep 20, 2010

I have following code from AS2 and I need to convert it to AS3.

function ActivityComplete() {
if (try_count >3) {
getURL("javascript:setNextTxt('Click Next to continue.');setPageDone();");
}
}

View 4 Replies

ActionScript 2.0 :: Pass A Variable To Flash Through Html?

Dec 30, 2010

I have this website that has several sections(Abouts Us, Projects, Services ect.) in it and I want it to automatically go to one of them(Services) if people enter the website through a url I am sending through a email campaign about Services. I know I can just attach a variable to the url but it seems I have to specify the .swf so that the url just loads that .swf and not the webpage.

View 9 Replies

ActionScript 2.0 :: Pass XML File Path To Flash Via HTML URL

Oct 4, 2009

Our art gallery project has a list of several artists.Each artist links to a SWF gallery that will showcase their work.The SWF gallery opens in a popup window.We want to use XML files unique to each artist to call the content for the SWF.This will allow us to have one popup, calling the same SWF for all the artists.This means that the HTML link for each artist needs to pass the XML path for that artist to the SWF as a variable.We are using swobject to embed the SWF in the popup window.

View 9 Replies

Data Integration :: Get The Html To Pass The Url Variable It Receives On The Flash?

Oct 9, 2006

this liveDoc covers getting a url variable into flash:http:/[url]....you can pass data to a flash movie by doing the following:[url]....this will create a variable: _level0. variablename with the data: thisisthedata.so far so good.you can then embed this in the published html doc by including your data string in the object/embed tags.like so:

<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# version=8,0,0,0"[code].....

not to bad, so now your html is loading the swf with the url variable. the problem is this data is hard coded into the html.now for the question. how do i get the html to pass the url variable it receives onto the flash?

View 2 Replies

ActionScript 1/2 :: Pass Variable Into HTML To Play A Flash File?

Feb 17, 2010

I'm trying to create a simple SWF file that can receive the name of a FLV file in the HTML file and play it since I have many FLV files.  Basically using the technique of FlashVars.  I've set the contentPath/source in the components to be blank, and set my actions in the first frame to be player.source = filename, as was instructed to do so in a Flash book I am reading. I then set the "filename" variable to a file in the same path as the web page in the HTML file, however, all I get is a blank Flash player skin.  The FLV file will not load.  I also tried setting the "filename" variable to load the FLV from a public website in the same domain and on another domain, but it still doesn't work.

View 5 Replies

ActionScript 2.0 :: Pass HTML Form And Hidden Variables From It To Flash?

Jun 26, 2007

Passing a html code to flash code..[code]...

View 1 Replies







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