Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Retaining Markup Tags In HtmlText Fields



Is it possible to wrap an XML object so that it's element tags are preserved (not parsed) if it populates a text field as htmlText? I'm trying to use XML in an htmlText field where other (non-XML) text is styled using CSS. I get the results I'm looking for (except for the CSS) when I populate the text field as plain text (not htmlText).

I tried wrapping the XML in a <![CDATA[]]> tag, but that too was parsed when used as htmlText.

Any ideas?



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 02-05-2008, 03:21 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Can Image Alt Tags In HtmlText Fields Display?
I've been working on a project that up until now, has not been requested as accessible. I use the Flash accessibility in all my projects anyway so it's not that big a deal, but I am wondering if there are those out there with more knowledge on this topic?

I know that the ALT attribute in the IMG tag is supported when placed inside an htmlText field (all dynamically for my project). But how does Flash use it, or does it use it at all? I have a user that is expecting to see the ALT text when they roll over the image, but it's placed via html, not inside a movieclip, so I don't know if it's even possible.

Any information would be most helpful.

Retaining Line Breaks In Input Fields
I made a flash-php mail form. The message comes to the client in one string. I want the message to appear as it was typed. Tried render as html, but it's returns a string of html tags. Same when using nl2br() in php. My mail client reads html email.

Any help would be awesome.

Start_txt.htmlText = "<TAB>" How To Have Tags Written I HtmlText?
Hi!
start_txt.htmlText = "<TAB>";

How do I write so that the text <TAB> is written.
I have tried with in front of the tags, but nothing works.

Can't Cut HtmlText Tags
I got a xml that has tag:





<a href='http://www.google.com'><b>Bold link to google<b></a>

and this is loaded to htmlText text field. All works fine and dandy except that everything written after that is also a link to google. Also if I tag some text to different colour, everything after that continues to be that colour?

huh

HtmlText Working EXCEPT For <IMG Tags
What's wrong with this code?

headline_txt.html = true;
headline_txt.wordWrap = true;
headline_txt.multiline = true;
headline_txt.htmlText = "<img src='box.jpeg'><br>Wheres<br>the image?</br>";

The text and <BR> tags display but not the image. The image is in the same directory and is local and is non progressive.

Flash 8 Basic, Actionscript 2.0


Any ideas.

Help HTMLtext - Stylesheet HTML Tags
Got this tutorial off the net. My stylesheets and HTML dont seem to be loading. Did the stylesheets tutorial off Kirupa. That worked fine. But in my code below, the only thing that worx is the <b></b> tags.

My stylesheet should be fine as well. Dont see what the problem is?!

Please help. Desperate

posting the code (ignore the AMFPHP stuff)
====================================

function getStyle() {
// load stylesheet first, then get content (separate function)
var flash_css = new TextField.StyleSheet();
var path="sitestyles.css";
flash_css.load(path);
flash_css.onLoad = function(success:Boolean) {
if (success) {
categoryTitle.StyleSheet = flash_css;
pageContent.StyleSheet = flash_css;
} else {
pageContent.htmlText = "Style sheet appears to be rodgered";
}
};

};



import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;
import mx.utils.Delegate;

NetDebug.initialize();
// ----------------------------
// create the responder object
// In this object we will define
// all the result function for
// the data received from server
// ----------------------------
mainResponder = new Object();
// echoString receiver
mainResponder.echoString_Result = function( data_pass ){
trace("echoString result");
trace("received: " + data_pass );
trace("----");
}
// echoPageTitle receiver
mainResponder.getCategoryTitle_Result = function( data_pass ){
categoryTitle.html = true;
categoryTitle.htmlText += "<p class='three'><b>";
categoryTitle.htmlText += data_pass;
categoryTitle.htmlText += "</b></p>";

}
// echoPageContent receiver
mainResponder.getPageContent_Result = function( data_pass ){
pageContent.html = true;
pageContent.wordWrap = true;
trace("in GetPageContent");
//data_pass type object
// pull out data loop build string
var data_pass_string="";

data_pass_ln=data_pass.getLength();
for (var i:Number = 0; i < data_pass_ln; i++) {
// for each person node:
trace(data_pass.getItemAt(i).Item_title);

data_pass_string+="<b>" + data_pass.getItemAt(i).Item_title +"</b>" + " R" + data_pass.getItemAt(i).Item_cost + i + " <BR> ";

}

pageContent.type="dynamic";
pageContent.htmlText += "<p class='two'>";
pageContent.htmlText += data_pass_string;
pageContent.htmlText += "</p>";


}
// generic onStauts responder, it will be invoked
// when an error is received from the server
mainResponder.onStatus = function ( data_pass ) {
trace("an error occurred")
trace("in line: " + data_pass.line)
trace("error level: " + data_pass.level)
trace("description: " + data_pass.description)
}
// define the path of our gateway.php
NetServices.setDefaultGatewayUrl( 'http://localhost/flashservices/gateway.php' );
// initialize a variable for the connection
conn = NetServices.createGatewayConnection();
// initialize the service for our class ModxTut
// an tell which is the responder object
// for all the calls to the server
serv = conn.getService("FontanasMenu", mainResponder);
serv.getCategoryTitle(1);
serv.getPageContent(1);

// flash stuff again
_root.createTextField("categoryTitle", getNextHighestDepth(), 2, 2, 300, 40);

_root.createTextField("pageContent", getNextHighestDepth(), 20, 40, 300, 200);

// scrollbar
this.createClassObject(mx.controls.UIScrollBar, "my_sb", 20);
// Set the target text field.
my_sb.setScrollTarget(pageContent);
// Size it to match the text field.
my_sb.setSize(16, pageContent._height);
// Move it next to the text field.
my_sb.move(pageContent._x + pageContent._width, pageContent._y);

getStyle();

====================================

Omitted Spaces Around Tags In HtmlText
I fear this is something noob'ish but I copied some content from a feed and pasted it into a separate XML file. Now the spaces around my tags are missing when its published.

<p>my text that is, let's say, <b>bold</b> or something.</p>

comes out "my text that is, let's say,boldor something."

!prettyPrinting // didn't effect issue
condenseWhite // also didn't effect issue

b {dispay:inline;} // because it goes block

Any thoughts? -- still a lot of quirks dealing with htmlText

A Problem With HtmlText And Certain HTML Tags
Hello, I was hoping you could help with this probem I've been having.

I am loading HTML from an external .txt file into my movie. The text shows up just fine, but certain HTML tags like the <h1> and <table> tags don't seem to be working. Is this a feature or am I doing something wrong?

Obviously, I am a flash newbie and I greatly appreciate any help.

Spaces Appearing Before <p> Tags In .htmlText
I'm using the .htmlText function in ActionScript to format some text from an xml file however I seem to be having some trubles with 2 spaces being put before the start of each <p> tag. I've googled it but so far haven't come up with anything, I've used html in this manor before and never seen this.

I end up with paragraphs looking like this

So every line is starts indented.

Cheers

David

Disabling HTML Tags In Htmltext To Be Rendered
Hi Buddies,

Am loading some dynamic text from an xml which has html tags inside dat text. I jus loading dat specified texts into a dynamic text fields where html is enabled and assisgned as a htmlText instead of normal text.

It works fine, but the thing is, i want to disable certain html tags to be rendered but it shud display as it is as a normal texts.
Is there any way to do dat

HtmlText: Whitespace Between Anchor Tags Disappears
Why does this happen? Make a textbox and assign it some text:


Code:
article.htmlText = "<P>this is a word <a href='www.google.co.uk'>link1</a> <a href='www.yahoo.co.uk'>link2</a></P>"
trace(article.htmlText)
Notice the space between the two anchor tags. Well, if you run this, the space disappears and the trac shows that flash has removed it:


Code:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="24" COLOR="#000000">this is a word <A HREF="www.google.co.uk" TARGET="">link1</A><A HREF="www.yahoo.co.uk" TARGET="">link2</A></FONT></P></TEXTFORMAT>

HtmlText: <img> Tags Invalidate Click Events
Here's the situation:

- I've got an XML file. It's got a CData area with text content, like so:


Code:
<textcontent><![CDATA[<b><u><a href="event:openPopUp and this is cool">This text
should open a popup</a></u></b> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
<img align="right" src="images/test.jpg" width="75" height="75">Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
]]></textcontent>
I read that in and place it in a TextField object. That's all fine. Now, if the content is exactly as it is above, that will work fine. I can click my link and call my popup class just fine.

BUT

If I simply add another image into my content, it kills all of my links (even regular links to URLs). They are no longer clickable, you don't even get the finger pointer when you roll over them. The images and text all display fine, but the links die.

Any thoughts? This is a weird one.

How To Edit HtmlText TEXT Without Bugging TAGS
I have a "title" field that is a TextField that contains htmlText and is formatted with a stylesheet. Sometimes we want the full title to appear, and other times we want to truncate it with an ellipsis. (...) eg "Raiders of the Lost Corona" or sometimes just "Raiders of the..."

I need to find a way to trim down the number of TEXT characters that are in the htmlText, without affecting the HTML tags.

I tried
fld.text=fld.text.substr(0, n) ... but of course this removes the HTML.
fld.htmlText=fld.htmlText.substr(0, n) ... breaks the XML
fld.replaceText() throws an error because I'm using a stylesheet.
I'm told this might be possible with a RegExp... basically delete one char from the end of the htmlText, while skipping over the tags... But I have no clue how... any Reg Exp gurus out there?

Trouble With Html Tags In HtmlText = Statement
Guys, I've got a puzzler. A friend is building a blog, with entries placed in a database, pulled out with php, and then passed to flash. It all goes well except for one thing...problems with html. She's using a tutorial from webmonkey and here's all the actionscript, as it originally was created:

ActionScript Code:
//function to load external data using the loadVars() object//l=name of loadVars object//n=name of text field //t=trigger to decide whether to show all entries or just one.//e= entry number to display (number)//f=file to load from (string)function lv(l, n, t, e, f) {    sb.setSize(null, 200);    sb2.setSize(null, 50);    //create a new loadVars object if one doesn't already exist    //if it does, use it    if (l == undefined) {        l = new LoadVars();        l.onLoad = function() {            var i;            //clear out any text that might already be there            n.htmlText = "";            //to show a single entry at a time we use the            //following code            if (t == undefined) {                n.htmlText += "<b>"+this["title"+e]+"  -  "+this["date"+e]+"</b><br><br>";                n.htmlText += this["entry"+e];            } else {                //cycle through and show all entries                for (i=0; i<this.n; i++) {                    n.htmlText += "<u><a href='asfunction:_root.loadArc,"+this["id"+i]+"'>"+this["title"+i]+"  -  "+this["date"+i]+"</a></u><br>";                }            }            sb.update();            sb2.update();        };    }    l.load(f);}function loadArc(passed) {    arcNum = passed-1;    lv(blog_lv, entries_txt, undefined, arcNum, "blog.php");}//for the large entry textfield lv(blog_lv, entries_txt, undefined, 0, "blog.php"); //for the archives text field lv(archive_lv, archive_txt, "cycle", null, "blog.php");


the result: everything loaded in the .swf except the title of her entry over the entry itself. There is a bold html tag around that part, she removed it and voila! The title appeared. But now there's another html tag that starts off a line of code, and it's failing. Click on the entries, and nothing loads except the - between the date and title. Here is that section of code:

ActionScript Code:
for (i=0; i<this.n; i++) {                    n.htmlText += "<u><a href='asfunction:_root.loadArc,"+this["id"+i]+"'>"+this["title"+i]+"  -  "+this["date"+i]+"</a></u><br>";                }

She found that by hardcoding a variable defined by the loadArc function, which is pulled in as arcNum, the whole thing works...but of course, can only pull in one entry with the one id number she coded. She also has removed the <u> tags, but the <a href must obviously remain to make her entries clickable.

Any clues why having html at the front of this statement in the for loop is causing the entire line to fail, and no variable to pass? It's an interesting stumper. To see this in action, here is the page: http://www.lunesse.com/journal/journal.swf. In that directory you can also find the .fla file and the php results from the database. Tester.html is her second flash movie, also in that directory and completely barebones, and she received the exact same results.

Any pointers I could relay to her would be great. Thanks for your time.

Trouble With Html Tags In HtmlText = Statement
Guys, I've got a puzzler. A friend is building a blog, with entries placed in a database, pulled out with php, and then passed to flash. It all goes well except for one thing...problems with html. She's using a tutorial from webmonkey and here's all the actionscript, as it originally was created:

ActionScript Code:
//function to load external data using the loadVars() object//l=name of loadVars object//n=name of text field //t=trigger to decide whether to show all entries or just one.//e= entry number to display (number)//f=file to load from (string)function lv(l, n, t, e, f) {    sb.setSize(null, 200);    sb2.setSize(null, 50);    //create a new loadVars object if one doesn't already exist    //if it does, use it    if (l == undefined) {        l = new LoadVars();        l.onLoad = function() {            var i;            //clear out any text that might already be there            n.htmlText = "";            //to show a single entry at a time we use the            //following code            if (t == undefined) {                n.htmlText += "<b>"+this["title"+e]+"  -  "+this["date"+e]+"</b><br><br>";                n.htmlText += this["entry"+e];            } else {                //cycle through and show all entries                for (i=0; i<this.n; i++) {                    n.htmlText += "<u><a href='asfunction:_root.loadArc,"+this["id"+i]+"'>"+this["title"+i]+"  -  "+this["date"+i]+"</a></u><br>";                }            }            sb.update();            sb2.update();        };    }    l.load(f);}function loadArc(passed) {    arcNum = passed-1;    lv(blog_lv, entries_txt, undefined, arcNum, "blog.php");}//for the large entry textfield lv(blog_lv, entries_txt, undefined, 0, "blog.php"); //for the archives text field lv(archive_lv, archive_txt, "cycle", null, "blog.php");


the result: everything loaded in the .swf except the title of her entry over the entry itself. There is a bold html tag around that part, she removed it and voila! The title appeared. But now there's another html tag that starts off a line of code, and it's failing. Click on the entries, and nothing loads except the - between the date and title. Here is that section of code:

ActionScript Code:
for (i=0; i<this.n; i++) {                    n.htmlText += "<u><a href='asfunction:_root.loadArc,"+this["id"+i]+"'>"+this["title"+i]+"  -  "+this["date"+i]+"</a></u><br>";                }

She found that by hardcoding a variable defined by the loadArc function, which is pulled in as arcNum, the whole thing works...but of course, can only pull in one entry with the one id number she coded. She also has removed the <u> tags, but the <a href must obviously remain to make her entries clickable.

Any clues why having html at the front of this statement in the for loop is causing the entire line to fail, and no variable to pass? It's an interesting stumper. To see this in action, here is the page: http://www.lunesse.com/journal/journal.swf. In that directory you can also find the .fla file and the php results from the database. Tester.html is her second flash movie, also in that directory and completely barebones, and she received the exact same results.

Any pointers I could relay to her would be great. Thanks for your time.

HtmlText Issue-shows Html Tags On Render
Im experiencing problems with the following similar problem.

the textfield (adviceText) renders my html string with the html tags, so it isnt picking them up!
this is the code that doesnt work...
--------------------------------------
adviceText.html=true;
adviceText.autoSize = rue;
adviceText.htmlText =_parent["player"+pressed].theAdvice;
--------------------------------------

now the variable is correct and is a string i cant see a problem with. it comes from a hard coded (for now) xml file within a CDATA tag to allow the html tags to be ignored during the xml parse.

if i set the string in the flash document the text field will render correctly i.e.
---------------------------------------
adviceText.htmlText ="test<br>test";
---------------------------------------

im desperate for ideas, the above line of code if substitued works correctly so im assuming that means the text field is set up correct.

thanks

My_txt.htmltext = ExampleText; Is Not Decoding HTML Tags. Why Not
var myCSS = new TextField.StyleSheet();
//Load CSS file
myCSS.onLoad = function(success:Boolean) {
if (success) {
trace("CSS loaded");
} else {
trace("CSS not loaded!");
}
};
myCSS.load("example.css");
//define onLoad handler

this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.styleSheet = myCSS;
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.htmlText= true;

var exampleText = "<p class='headline'>Tutorial Takes Forever To Write</p>";
exampleText += "<p><span class='byline'>Bath, UK</span>";
exampleText += "--Flash developer NWebb seemed to take ";
exampleText += "forever to finish his CSS-Flash tutorial, ";
exampleText += "but it is finished now and you can find it ";
exampleText += "<a href='http://www.nwebb.co.uk'>here</a> ";
exampleText += "along with a few others.</p>";

my_txt.htmltext = exampleText;

Flash Dynamic HTMLText Some HTML Tags Not Working
var myText:String = "<b>Subscript of Term is 6</b> i.e., Term<sub>6</sub>"

The above <sub> tag is not working. The flash ignored the tag.

How I can use Super and Sub script.

Can anyone help me...?

Thanks in advance.

Regards
Razzak

[F8] Can Dynamic Text Fields Use Html Img Tags
i am trying to display images inside a text field which flash is reading from and xml file generated from queries ran on a mysql db. the images are showing up after the queries have ran and the paths to the files are correct.

when the xml is parsed by flash where the images are supposed to be i get null written. is it possible for this to be done?

Flash Input Fields Displaying Weird Html Tags
Hello everyone!

i am building a small flash form where i have 2 input fields to which i have assigned variable names.

for testing purposes at when i click the submit button i have flash to trace the values of these variables.

i was expecting to see in the output window only the text i have entered in the fields.

Instead what i see is this
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#00AFEF" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana_10pt_st" SIZE="10" COLOR="#00AFEF" LETTERSPACING="0" KERNING="0">test@test.com</FONT></P></TEXTFORMAT>

Anybody knows a way around this?

cheers,

HTML Tags Not Working In Dynamic Text Fields Using LoadVariables....grrrr
Ok, so I've heard that in Flash 4, getting a LoadVariablesNum to properly read HTML tags was a huge...well let's say limited at best. Am I the only one having the same problems with MX??? Please, someone tell me what I'm missing!

Dynamic Text Field, multiline, (selectable), (scrollable)Render Text as HTML, var=Text.

The LoadVariables works fine, but I SEE THE SILLY HTML TAGS along with the text. Flash is NOT reading them as tags.

I also tried to add "instName.html = true" before the LoadVariables....no dice.

The worst part is, that I've gotten this to work on other projects I've done...It seems to work when it wants to. (kinda like me)

HELF...I mean HELP

[MX04] HTML Tags Needs To Be Disabled In Dynamic Html Enabled Text Fields
Hi Buddies,

Am loading some dynamic text from an xml which has html tags inside dat text. I jus loading dat specified texts into a dynamic text fields where html is enabled and assisgned as a htmlText instead of normal text.

It works fine, but the thing is, i want to disable certain html tags to be rendered but it shud display as it is as a normal texts.
Is there any way to do dat

[F8] Dynamic Text, Text Fields And <a Href> Tags.
I have been trying to figure this out for a very long time. My company's web designer went MIA and left us with a Flash site that is very hard to update (and no original FLA's).I have resorted to decompiling his SWF's with pretty impressive success. Only thing I can't figure out how to do is get dynamic text displayed in a text field to accurately display funtional links. If I select the text field and click the "render text as HTML" button and export the SWF, no text appears at all. If I select use device fonts, the links work, but the text looks funny. I am using Flash 8, but saving as a flash MX 2004 document because I think that's what the designer used and... I guess I don't have a very good reason, it just seemed like the right thing to do... Also I'm exporting it as a Flash 6 movie because our web stats say that almost 10% of visitors have that installed. If it helps the code looks like this:

loadVariables("blahblahblah.txt", "_root.mcData");
stop ();

Any help would be hugely appreciated.

Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file

http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml

thanks in advance.
dale tan.

Markup Tool
Hi



I am developing an application called markup. This allows a user to markup on pages/content he is viewing….my markup application has one tool bar and one markup area ….



What I want is to have different makrup areas for different pages in a presentation.



How I m doing this…


in a master file /base file I load this markup swf and the presentation swf….my markup is works fine if there is only one page in the presentation…but if there are more than one my markup objects are visible in the second page also…but I want separate markup regions for separate pages..


please help me..



thanks

shan

Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file

http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml

thanks in advance.
dale tan.

Namespaces In Xml For Html Markup
hi, we have an xml file we will be loading into a project. The xml will be littered with AS3 friendly styling (inline) but we were hoping to avoid the ugly CDATA--ie:
Code:
<![CDATA[<p>This is text</p>]]>
The approach we are hoping to accomplish would be declaring a namespace in the xml:


Code:
<pages>
<page>
<content xmlns:h="http://www.w3.org/1999/xhtml">
<text targetid="1">
<h:font color='#ffffff'>This text</h:font>will go into the box with id of 1.
</text>
<text targetid="2">
This text will go into the box with id of 2.
</text>
</content>
</page>
</pages>
i know there is a Namespace class, but i am not sure how to tie the two together....can someone give me a lead? I have read this , but it does not lead me to the connection with how this MAY work with html...if at all.

Using Web Standard Markup In Flash
Hello,

Simple question: I have numerous transitional xhtml pages marked up and ready to go. The code is basic but uses a few tags that are not recognized in Flash via HTML import- <h1>, <div> etc. Is there a best practice method for using this code without having to "dummy" down the code for use in Flash? Is there any advantage to importing the xhtml pages as XML and going that route or will I have the same problem?

Thanks,
Bob

XML Text Displaying Markup
We are encountering an intermittent issue where the markup and tags that we are reading in from an xml file are being displayed. This problem occurs randomly for some and not at all for others. Has anyone experience this issue and have any insight?

Flash Markup Language
hey,
anyone out there know's anything about flash markup language? Just saw it at work at http://www.sukima****a.com. Thanks.

Flash Inventing Nonexistent Markup <li>
Hi There--

Have put together a site where textfields are imported using the loadVars command.

Here it is:

http://grasshpr.home.mindspring.com/...ernate1_3.html

Here's the entire folder, which includes the textfiles and the fla:
http://grasshpr.home.mindspring.com/shinnAlternate1

The problem is that on some of the textfiles, Flash is adding markup where there isn't any, in the form of list dots. The kind you get when you put <li> in front of a line. (It probably won't do it for you. Flash just wants to drive me crazy. (It's succeeding.))

This only occurred in the last iteration of the design.

It's occurring on both of the computers I have access to, so it's something in the file.

Since this is the first time I've imported text, I'm utterly clueless as to what could be making this happen.

Has this happened to anyone else? If so, how did you solve it?

Any insight will be vastly appreciated.

Thanks for reading this,

Lee

Unwanted HTML Markup In Text Box Value
I've inherited a Flash MX 2004 document that has some text entry points that verify you've entered the right text before continuing or provide you a warning message and urge you to try hard. They're set up like so:

Code:
on (keypress "<Enter>")
{
if (titleInputText == "hoped-for text entry")
{
gotoAndPlay("someNamedTarget");
}
else
{
comment = "Hey--enter hoped-for text entry to continue!";
}
}
Some of them just weren't behaving at all correctly. With some handy-dandy trace() statements, I found that a few of them were returning values that included HTML formating of the text. Instead of getting

Code:
something entered

I was getting

Code:
<FONT = "Arial">something entered</FONT>

which is causing me all sorts of problems. How on earth can I turn off the HTML tags? Where did it come from?

(Why, yes, I do know just enough to get myself in trouble. Why do you ask?)

Any help would be greatly appreciated on this.

My Flash Variables Contain Html Markup?
am using actionscript below to post variables to cgi script:

stop();
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
recipient ="user@domain_name.com";
subject="Enquiry from website";

bt_submit.onRelease = function() {
if (t_name.text == "") {
avertissement += " name";
}
if (t_email.text == "") {
avertissement += " email adress";
}
if (t_comments.text == "") {
avertissement += " comments";
}
if (avertissement !== "") {
t_status.text = "Please fill in these fields : "+avertissement;
avertissement = "";
} else {
loadVariablesNum("cgi-bin/nms_formmail.pl", 1, "POST");
t_status.text = "";
nextFrame();
}
};

bt_clear.onRelease = function() {
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
t_status.text = "";
};

The flash variables are sent to the script which generates an email message but the variables seem to come with html markup. Here is what comes in the email:

Below is the result of your feedback form. It was submitted by (<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test@test.com</FONT></P></TEXTFORMAT>) on Thursday, May 10, 2007 at 17:31:17
---------------------------------------------------------------------------


comments: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test message</FONT></P></TEXTFORMAT>

phone: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">000 555 3430343</FONT></P></TEXTFORMAT>

name: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test name</FONT></P></TEXTFORMAT>

---------------------------------------------------------------------------

The same script works fine with html, have been searching everywhere trying to find a solution but everything I try either doesn't work or still sends variables with markup??

Any ideas??

W3C Markup Validation Service Web Site Shows Lots Of Errors For .swf Object
Hello;

I'm using the method to insert a .swf file into an Html document as described in the "Frequently Asked 'Flash' Questions" tutorial in this forum:
http://www.sitepoint.com/forums/showthread.php?t=210919

The flash object works fine in my browser.

When I try to validate the Html using the W3C Markup validation service it says that there are no attributes for SRC, QUALITY, PLUGINSPAGE, TYPE, WIDTH, HEIGHT, and MENU. It also says that the element EMBED is undefined.

Since it shows so many errors it looks like the W3C Markup Validation Service might not configured to work to .swf objects.

You can copy and paste the code below and you can see what I'm talking about. Here's the link to the W3C Markup Validation Service page:
http://validator.w3.org/


PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Shockwave Flash Movie</title>
</head>
<body bgcolor="#AAAAAA">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="250">
  <param name="movie" value="300 x 250.swf" />
  <param name="quality" value="autohigh">
  <param name="menu" value="false" />
<embed src="300 x 250.swf" quality="autohigh" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" menu="false"></embed>
  </object>
</body>
</html>


I think that using the flash object will be ok but for my peace of mind can somebody tell me is it safe or wise to use the .swf object when the W3C web site shows so many errors?

Thanks.

Stylesheet Applying To A Tags, But Not B Tags In Dynamic Text Box
Hello, I have a dynamic text box that pulls HTML-formatted content from a PHP script and everything is working, including getting it formatted with a stylesheet, except the stylesheet seems to be ignored for <B> tags. This is the code I tried:

b,B { font-weight:bold; color:#6600FF; font-family:Baskerville; }
a:link { text-decoration:none; font-family:Baskerville; font-weight:bold; }
a:hover { text-decoration:underline; }
a:active { text-decoration:none; }

This is just for texting. I have a simple textbox with plain text, part of it in bold, part of it as a link, and the link gets the Baskerville font, but the bold tag doesn't. When I set a color for the link, the link gets a color but the bold tag doesn't. I'm stumped. Any ideas?

Retaining Variables . . .
I'm passing variables into FLash™ via XML, and on initial load everything works fines, but once I jump around to different movies, I lose my variables. . . My fix was to just change the visibility of movies as I jump around, without jumping frames on the timeline, and this worked fine. However, I'm guessing there's a better way to retain these variables. . . What's the solution? Is there one? . . . Thanks!

Retaining Value On Frame Change
OK, so I've got on not too badly the last couple of days, being the first couple of days I've embraced the deathkiss actionscript. With a little help from friends at FK I've got my scrolling dynamic textbox value updated from another input textbox. I've even got my first darling little MC returning the playhead to the previous frame to display the newly updated dynamic textbox...but guess what...no new addition to the value. It's all too weird! If I remove the MC that returns the playhead to the previous frame and step it back manually ( in the player ) with keyboard controls then the new user input value HAS been added to the dynamic textbox value!

Does this have something to do with the keyframe containing the dynamic textbox (frame1) being before the keyframe containing the user input textbox (frame2)?

Hell, Ah Jist Doh Noh!

PPLLEEAASSEE HHEELPP!!

Retaining Sound Quality?
How can I retain the quality of sound in a flash? I have tried making the file into a wav file (from a mp3, which i thought that maybe that was the reason why) but the sound quality is still far from good. Any help woudld be appreciated.

Retaining Value Of Radio Button
I use 3 radio buttons to determine the levels for a game.

A button button does a gotoandplay which ever level is shown for value in the radio button group with getValue()


My problem starts after the game portion is finished. To relaunch the game, the user has to reselect a level with the radio buttons - I would like the level to remain as originaly picked until the user wishes to change his level (within the same session).

How do I keep the radio button picked?

Denyse

Retaining Position While Zooming
i have scoured the forums on this. I have an mc on stage (large rectangle). i would like to click anywhere on that mc, and have the mc zoom , BUT, also retain position from where the mouse clicked. i guess the effect i am seeking is as if the registration point is where the mouse clicked, and thus, the mc will zoom in from that point. The zoom is the easy part (xscale=yscale+=10), but i am having trouble with the math that would have the mc reposition left/right/up/down as it zooms in (and then next, out). A hint would be great.

i'm guessing that on the click, i have to mark the _xmouse and _ymouse. Then what?

Retaining Image Transparency
I'm working with Photoshop and just getting into flash. I've got an image that requires anti-aliasing and in Photoshop it works fine. How do I retain this anti-aliasing property on my flash file when the colours behind it change? Thanks

[CS3] Retaining .text Variables
I have an input field where the user is supposed to put their name in. Later, they are supposed to choose a whole bunch of statastics and then have it outputted to a file. However for now .. I can't get that blasted input field to work! At one point, it's supposed to go into the database and check to see if there's a similar name or exact name, then tell the user if so. It won't prevent them from using that name, but just alert them. The problem is this - all of my code is on an Actions frame - admittedly I am using AS2, but..

systemData = new LoadVars();
systemData.namecheck = no;
systemData.actualname = checkname.text;

namelabel.text = systemData.actualname;

systemData.namecheck is collected in frame one, where the user types in their name and then clicks "Check" to go to the next frame.
It should technically display in "namelabel.text" on frame two, but it doesn't.
I thought that this would work, but I can't even see any indication that systemData.actualname even has anything in it. What am I doing wrong?

Images - Retaining Quality
Hi all, when i open my images in Photoshop they Look Amazing- I want to keep the quality even after importing into flash, how can i do this. Any other tips appreciated.

Retaining Alignment + TextFormat
Hi,

I have a movie where the user is able to type text into an input text field. The textfield itself is set to be left-aligned, but I provide the users with 2 buttons for alignment... left-align and center-align buttons. I have it so that if they click on one of the buttons, it sets a variable that stores the alignment with the one desired, and then calls a function that contains all of the textFormat code to display the text with this latest change. That works fine, to an extent....

When the movie is first started, the text is left aligned (as it shoudl be since the text field is set that way)... and then if I type in some text and then hit the 'center' button, it centers it like it should. Now here is where the problem is: If I go to add in more text before what is already there, or select some of the text and begin typing, it immediately left-aligns the text again. It would be annoying for the user to have to hit re-center the text again..and to make things worse, I have it so that when each button is pushed, it shows an 'on-state' ... so when it automatically left-aligns the text, the 'center' button is still active.

Any suggestions as to how I might solve this?

Thanks!
b.

Retaining Form Data During Navigation
I have a 4 page form. all pages are individual Mc on the main time line. All variable input text boxes are in the coresponding Mc's. While navigating from page to page it will not retain the input variables when you go back?

Any Ideas

Retaining Quality Of Video And Sound
Why is it that when I test a movie I'm working on in Flash MX the quality of the video and sound drop? Everything is fine when I view it in the work area (or whatever it's called) when I just press Enter and watch the timeline. Is there a way to fix this? As an alternative, I've recently been exporting my Flash files as videos so they will remain good quality. The problem with this is movie clip symbols don't animate. Is there any way to make all of it animate normally?

I'll really appreciate it if I can get some help here. I've been dealing with crappy Flash movie quality for a while, and it discourages me from working with Flash.

Can You Export Movie While Retaining Actionscript
Hi everyone,
Is it possible to export a flash file into a movie to be burned onto a DVD and still retain the use of movie clips. I have a client that needs a file initially created in flash and then converted to a DVD. I just want to make sure that I don't use any actionscript or movie clips if there is no technical way of translating it over into the DVD. Thanks for all your help.

[F8] Retaining Anchor Points From Illustrator?
Hi all,

Newbie here.
I know there has been a lot of "how do I import an Illustrator file into Flash" questions, but is there a way to import an Illustrator CS file into Flash 8 Professional and retain the original vector anchor points?
If I import an eps, swf, cut and paste or drag and drop an Illustrator object into Flash the drawing object is just one big vector 'blob' - you can change the fill color but cannot specify a stroke width and color.

I prefer to use Illustrator to draw the complex shapes because the pen tool is more flexible than in Flash.

Thanks in advance.

Loaded SWF Not Retaining It's Background Color
Hello,

I am working on a viewer that loads SWF's into a movieclip via an XML file and navigation. It's nothing fancy. But I have one particularly complex SWF that is giving me problems. This SWF has a light gray background color on the stage. When I load it, it completely ignores that background color and instead shows transparent. Can someone please help me understand why it would do this and how I go about fixing it?

This is all I'm doing to load the SWF:


Code:
// create a new loader for the slide
slideLoader = new Loader();
// load the next slide
slideLoader.load(new URLRequest(xmlSlideshow..slide[intCurrentSlide].@src));

currentContainer.addChild(slideLoader);
I'll spare all the the other setup code. currentContainer is a reference to my movieclip.

Thanks in advance.

Copyright © 2005-08 www.BigResource.com, All rights reserved