ActionScript 2.0 :: Linebreaks And External Txt File?

Mar 4, 2005

how does one get <br> to work in flash when the <br> is located in an external file?Ive tried <br>,/n, </p> and a bunch of others. Nothing renders properly in flash. it just displays whatever linebreak code im trying to use.here is the flash code. the variable it's grabing is just a string or items pulled from a DB.

Code:
text1.html = true;
unicodeData = new LoadVars();

[code].....

View 4 Replies


Similar Posts:


PHP :: Flash - How To Capture Textarea With Linebreaks

May 14, 2011

I'm trying to experiment with taking text from a textarea in a flex project and open it up in a php page. But the php isn't line breaking where it should be. An Example of the text i'd like to bring over to php would be:

You: Hi there
Them: Hello
You: This is a great example
Them: I know right?

Here's my php:
<?php
$text= $_GET['text'];
echo $text;
?>

Right now I came up with something like this in the actionscript...
var chatBox:String=chat_box.text;
navigateToURL(new URLRequest("savelog.php?text="+chatBox), '_blank');

I also tried something like:
var chatBox:String=chat_box.text.valueOf().replace("
","<br/>");
and
var chatBox:String=chat_box.text.toString().valueOf().replace("
","<br/>");

But apparently the isn't translating over no matter how I get the chatBox var so its not even making a <br/>. But, even if i did get that to work it wouldnt be ideal. Because eventually in the end I want to be able to just incorporate the pastebin API to paste this GET data and post it on there. And I don't think it would look too pretty with having <br/> after every line...Is it possible to bring this text over to php and recognize the line breaks in a way that would work well with what im eventually trying to accomplish?

View 1 Replies

ActionScript 3.0 :: TextField Can Contain Different Kinds Of Linebreaks?

Nov 20, 2011

Can a TextField can contain different kinds of linebreaks?

I save and load text from an input field into an XML. I save it as CDATA tags including linebreaks.

This is what happens:

I type a text with linebreaks into the textfield I save the text to the XML I empty the textfield I load the xml into the textfield - everything looks as expected, linebreaks are present I save the exact same textfield again (the only difference this time the content was loaded and not handtyped)This time the XML does not contain any linebreaks when I load it again, the text doesn't have linebreaks

How can this be?

//here is an example that demonstrates the issue:

var xml1 = <xml>
<elm/>
</xml>;

[Code]....

View 1 Replies

ActionScript 3.0 :: Linebreaks In A Multiline Text?

Jan 15, 2009

When you want to have linebreaks in a multiline text in AS you should write this, right?

Code:
var mytext:String="This is
what
I want";

so you have a 3-line text. ok, so i have a textfield, and its content will be loaded from a xml file. in my xml i have something like this:

[Code]...

View 6 Replies

ActionScript 2.0 :: Read XML Huge Linebreaks?

Apr 14, 2009

Well I was loading a xml file (using CDATA) into my flash app. I'm still using AS2 and everyting works perfectly with linebreaks and everything. The only thing I can't understand is why a linebreak is so huge? When I load the XML-file into PHP to edit, it looks good. But when I save it and load it again into flash one linebreak is like two linebreaks.

[Code]...

View 2 Replies

Actionscript 3 :: How To Strip Trailing Linebreaks From A String

Feb 21, 2011

I need to remove some redundant ' 's from the end of a csv I'm importing before it divides the lines up into an array (otherwise I get extra empty rows).

[Code]...

View 2 Replies

ActionScript 3.0 :: SelectionBeginIndex Not Taking Into Account Linebreaks?

Aug 4, 2009

I've got a TextArea with some text in it. Sometimes there are linebreaks.

I'm using SelectionBeginIndex and SelectionEndIndex, along with substring() to get the current selection.

The only problem I'm running into is that if that selection includes any line breaks, it doesn't understand.

For example, if the text was:

Code:
This is my first line of text.

ABCDEF
Let's say I selected from the first letter all the way to, and including, B.

The output of the substring() with the begin and end selection, because of the linebreaks, would be:

Code:
This is my first line of text.ABCD

Here's the AS Code I used to illustrate the problem.

ActionScript Code:
checkButton.addEventListener(MouseEvent.CLICK, checkSelection);
myText.alwaysShowSelection = true;
myText.textField.alwaysShowSelection = true;

[Code].....

How can I capture those linebreaks? htmltext isn't an option, because there's no selectionBeginIndex and selectionEndIndex for htmltext...

View 1 Replies

ActionScript 1/2 :: Finding The Linebreaks And Passing Text In The String

Aug 23, 2008

I have a dynamic text field in flash that is populated by an input box. The dynamic text field has a maxmium width it can be. So i have it as multiline WITH wodrwap on. My problem is that I have to send this data to server and for the php to be able to text the text and output the text as it is displayed in flash. There seems to be no way of finding the linebreaks and passing them in the string as far as I can see?

View 16 Replies

ActionScript 3.0 :: Remove / Unload External Swf File(s) From The Main Flash File And Load A New Swf File And Garbage Collection From Memory?

Sep 12, 2009

I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?

View 15 Replies

ActionScript 2.0 :: Replace Text Loaded From An External File With Text From Another External File?

Nov 9, 2005

How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something? In the example below I'm calling an external text file, could this also work with an .xml file with cycling through the children?

[Code]...

View 2 Replies

ActionScript 3.0 :: External Interface Call Doesn't Work With Function That Is On External JS File

Apr 17, 2012

I am using in AS3 "External Interface ". When I call the JS function that is on the same page as swf everything works fine.

I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.

I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.

how to call a JS function that is on an external file from AS3?

View 6 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 Replies

ActionScript 3.0 :: Link To External PDF In External As File?

Oct 20, 2009

I've re done a couple of pages on my website and as a result of the new design have had to change some of the coding from being on the timeline to being in an external as document linked to my fla. This is significant only because I can link to external pdf.zips no problem on the timeline but I can't seem to translate the code to the external file. Can anyone out there help me out with this (hopefully) simply problem?I'm playing with different variations of this below but I'm constantly getting the 1180: Call to a possibly undefined method navigateToURL.

function onEnglishClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("http://www.bigredcreativeconcepts.com/UB_Flyer_English.pdf.zip");

[code].....

View 1 Replies

ActionScript 2.0 :: Load Images & Test From External File " Text File?

Jul 27, 2011

i have banner with 5 images fad in fade out effecti need to load images & test from external file " text file or xml file " with keeping fade effects on imagesall ways i know can't keep fading effect on images so

View 4 Replies

ActionScript 2.0 :: Pass URL String From External File To AS Variable (dynamic File Names)

Nov 17, 2004

I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn't load. I suspect that there is something i'm doing wrong with the quotes. What am i doing wrong?

[Code]...

View 5 Replies

Media Server :: Advantage Of Writing A SSAS File Over An External AS3 File?

Jul 23, 2011

I do understand the differance between ssas and as3. Not all, but all most everything I see written in SSAS can be writen into a external AS3 file. This leads me to quite a few questions I'm hoping you kind people can shed some light on for me.
 
1)  What is the advantage of writing a SSAS file over an external AS3 file?
 
2) Can I write an .asc file in AS3 or do I have to use AS1? Please understand I'm using tuts from fmsguru.com and the books "Learning Flash Media Server" (pdf) and "Programming Flash Communication Server". I'm not a javascript programmer so nothing I do in AS1 seems to make any sence while everything I do in AS3 does. It may not seem like it to you people that are programmers, but to those of us that aren't, AS1 and AS3 are miles apart.
 
3) kind of off topic, but a security question. I'm not a "hacker" and don't like the jerks that are. My question is on external AS / SSAS files and swf files. When my fla is compiled into a swf does my external AS files remain external? I assume they do, but then what is the threat of the swf being decompiled? In most projects I would do I could care less if somebody had access to my fla as long as they don't have my actionscript files.
 
I don't know. Maybe on questions one and two I'm getting confused becasue I'm using out dated material. Again I assume that even though fms was built off of the javascript engine it should be able to read and execute my AS3 file. Other wise what was the point of the evolution of actionscript into a fully functional programming language?

View 1 Replies

ActionScript 2.0 :: Flash File Reading An External Text File For The Content?

May 16, 2005

I turn to you for help, dear sweet Kirupa Forumites. First, let me explain the problem: I have a flash file reading an external text file for the content. Everything works perfectly for nearly everyone - you click a menu button, and the content text comes up fine. However, a couple of people have found that the text shows up as "undefined". I have checked the player versions of the people where it doesn't work, and it is the same as for those where it does work, so that ain't the problem.

I don't understand why it works perfectly for nearly everyone, but a small number of people have this "undefined" text problem. It seems to be a problem with loading the external text file, but I don't know why. I have a main flash movie, and load the text in the first frame, using the following:

var my_content = new LoadVars();
my_content.load("content.txt");
my_content.onLoad = function(success){
if (success){

[Code]...

I then have a couple of dynamic text boxes in the main movie - one called ErrorText (for displaying an error message to the user) and one called ContentText (for displaying the content). I use an external menu swf which jumps to a specific frame in the main movie, depending on which button is clicked. Actionscript on the main movie frame for the first button does the following, with the other frames similarly configured:

ContentText.htmlText = my_content.content1;
stop();

My external text file is properly configured (content1=blah blah&content2=other blah blah) etc.

Does anyone have any advice on how I can solve this particular weird problem??

View 3 Replies

ActionScript 1/2 :: Load An External .swf File Into A Precise Location On The Stage Of Existing Flash File

Nov 20, 2009

All I'm trying to do is load an external .swf file into a precise location on the stage of my existing Flash file. I've spent an hour and a half on this site search and found nothing. What do I add to my loadMovie command to place the file at specific x,y coordinates?

View 3 Replies

ActionScript 3.0 :: Load The External Swf File And Unload The Parent Swf File?

Aug 17, 2011

i have a question. let say i have file1.swf , file2.swf, and file3.swf, how can i link this 3 files together,let say suppose file1.swf is the main content file, but as i load file2.swf, i want the file1.swf get replaced by file2.swf. How could i unload file1.swf at that time, so that my file2.swf will become the main content file?and again, when my current position at file2.swf, and i want it get replaced by file3.swf by clink on a button. so that the i can unload the file2.swf and let the file3.swf become the main content file.

View 13 Replies

ActionScript 2.0 :: Including External Swf File With Preloader In Main Swf File

Apr 21, 2008

I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file

loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){

[Code]....

the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?

View 1 Replies

ActionScript 3.0 :: Switch Actions Panel To Being In A File Which Would Be External To The FLA File

Oct 5, 2009

I have a bunch of code inside my actions panel but I want to switch it to being in an AS file which would be external to the FLA file. I am looking for a tutorial or data on this. What terms do I search under?

View 6 Replies

ActionScript 3.0 :: Playing Flv File And After That Load External Swf File

Apr 7, 2009

i have a button that when it is pressed plays and loads an external flv file. this part works fine but directly after the flv video is finnished i want to load in an swf file. does some one have an idea how to do this? first show flv and then load swf?
this is the code as it looks now..

[Code]...

View 16 Replies

ActionScript 1/2 :: Importing A SWF Within Flash File From An External File

Nov 16, 2009

basically i imported a SWF within my flash file from an external file and only the randomize button works on the file none of the rest from the imported flash can anyone let me know why, if you need me to let me know and i will upload files

View 1 Replies

Actionscript 1.0 :: Load External Swf File To Parent Swf File?

Mar 27, 2011

i'm building a website using flash. i have a external swf file that i want to import into my website. i thought this would be an easy task but for some reason when i load the movie, it flickers. my website (parent swf) was build using 1.0. The external form swf was build using 3.0. My approach:

1.create an empty movie clip called mcForm

2.go to the mc clip page i want to pull the external movie into

3. within my actions layer, I call the following function loadMovie("main.swf", mcForm);

If i write:

LoadMovieNum("main.swf",0);

then the my main.swf opens correctly but closes the parent swf file. I wan the main.swf file to be embeded within the parent file.

View 1 Replies

ActionScript 3.0 :: Detect End Of External File (swf) From Main File

Mar 11, 2010

I have a video in .flv format that I have converted into .swf. And this .swf file, I have added it in into my main flash file by using Loader. And now, I want to detect when this video will finish playing so that I can go to the next frame which is not looping the video again and again.

View 3 Replies

Share Swf File That Loads Another External File?

Jun 8, 2011

So I wanted to give a demo of my project to someone, but I encounter a problem, Im loading an external swf file, and even if I give him both files, it doesn't work.Share swf file that loads another external file?

View 1 Replies

ActionScript 2.0 :: Does "_root" Reference The Root Of The External Swf Or The Swf That Contains The External File

Mar 3, 2007

If you load an external swf into a movie and this external file references "_root", does "_root" reference the root of the external swf or the swf that contains the external file?

View 3 Replies

ActionScript 3.0 :: Text Is Loaded From External Text Files And Styled With An External Css File?

Jun 7, 2009

I've managed to piece together a flash website with my limited as3 knowledge. The text is loaded from external text files and styled with an external css file.

It's working perfectly in Firefox and Explorer but it only works SOME of the time in Safari (on my mac).It's hit and miss. Sometimes it styles the text sometimes it doesn't.

[Code]...

View 1 Replies

ActionScript 2.0 :: Loading A External Text File To Flash And According To The Number Present In The Text File

Apr 25, 2009

I'm loading a external text file to flash and according to the number present in the text file i'm trying to do a IF - ELSE command. It's not working coz the value I load from the external file is string. How can i get this as intiger.

View 2 Replies

Html :: Styling HTML Links Within A Flash File Without Using An External CSS File?

Mar 6, 2011

I am having a nightmare using CSS to style HTML within a dynamic textfield in my flash doc. From what i now understand after much trial and error and reading online, CSS doesn't even work properly in flash even for the tags that it does understand (which are few and far between anyway). For some reason my layout is getting completely screwed up in certain scenarios (predominantly when there are images present too) when i hover over links (which are styled in an external CSS file). If i remove the external CSS styling (which only contains the following simple code):

a:link {text-decoration: none;}
a:active {text-decoration: none;}
a:visited {text-decoration: none;}[code]....

Then everything works fine (but no links are underlined as standard or on hover). Does anyone know of any way to style the links without using an external CSS file (all i want to do is have no underline as standard and then underline them on hover). As this is from user input into a text editor I cannot place these links manually on the page in flash as they could be anywhere, I need a way of parsing the HTML and then displaying it accordingly.

View 1 Replies







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