Multilang. Strings From String Table Result In TWO Newlines Where There Is Just One
Hi,The subject basically says it. In the string table I can enter multiline strings, no problem. Also, in the development environment they show up as entered. Text like this in the string tableThis is the demo text, first line.Now I start a new line.Shows up exactly like this. However, during runtime it is displayed like this:This is the demo text, first line.Now I start a new line.Notice the extra newline! What's happening here? How can I prevent that from happening? Yeah, I could avoid starting a new line, but are there any solutions rather than workarounds... I'd really like to start a new line occasionally :-)
Adobe > ActionScript 1 and 2
Posted on: 09/11/2007 06:55:45 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Result=String(mc1._currentFrame-1) - Does Anyone Recognise This
hi all
does anyone out there recognise this scripting
result=String(mc1._currentFrame-1) add String(mc2._currentFrame-1) add String(mc3._currentFrame-1) add String(mc4._currentFrame-1);
this actionscript is placed on a submit button
that brings up different screens depending on teh initial button clicks
if anyone recognises this can you let me know
and it shall be further explained
help
Convert A String To A Calculated Result
Hello, i would be grateful if someone would be able to help me with this:
I have a text box, witch is called txt_aff and a button"=" witch is used to calculate what is in the text box.
I want to be able to write(with a button"1" and a button "+", the equation 1+1 in my text box and get the result :2
writing the equation 1+1 is not the problem, the problem is getting the aswer calculated. I tried this:
contenu=txt_aff
on (release){
contenu=number(contenu);
}
but the result is Nan because 1+1 is a string and not a number. Is there a way to convert it and execute it?
thanks
Convert A String With A Math Expression In Number Result
Hi All,
I've this XML:
Code:
<myXml>
<item>{0}+{1}-{2}</item>
</myXml>
I use bracket because with StringUtil class I can change values with some variables define by user.
So I must take the numeric result of my expression in XML, this is a simple example but I'll have tang, sin and cos in XML nodevalue also...
I tried with casting or parseInt but nothig... any other idea?
[F8] Dividing Single String Into Multiple Strings
Hi there,
I have an input box which I would like to insert a long list such as
item 1
item 2
item 3
item 4
.....
Which will result in one long single string. However I would like to manipulate each item individually so that the output would be
some text item 1 some text
some text item 2 some text
some text item 3 some text
some text item 4 some text
.....
The operation needed on each item is exactly the same. The only way I can think of acheiving this is to divide the single string of items into an array and manipulate each one individually in a loop.
Am I on the right track? and any advice on how to code this?
Cheers,
Mike.
NO RETURNS OR NEWLINES
I've got an e-mail submission form consisting of 3
input text fields, but returns and newlines won't
carry over. Thus, instead of recieving the following
body at Outlook Express:
__________________________________________________ __
NAME: name
E-MAIL: e-mail
COMMENTS:
mailer's comments
__________________________________________________ __
I'm getting the following body instead:
__________________________________________________ __
NAME: nameE-MAIL: e-mailCOMMENTS: mailer's comments
__________________________________________________ __
The sending code is as follows:
__________________________________________________ __________________________________________________ __________________________________________________ ____________
on (press) {
getURL (mailto add "&body=" add NAME: " add name add newline add "E-MAIL: " add emailadd add newline add newline add "COMMENTS: " add Newline add comments);
}
on (release) {
gotoAndPlay ("scenesend");
}
__________________________________________________ __________________________________________________ __________________________________________________ ____________
Can anyone help, or suggest an alternative way to
send the text field data to e-mail programmes?
::bluemoth::
LoadVars And Newlines
Hi,
Is there any way to have an external variable loaded with LoadVars span over multiple lines ? Or are there other ways to load text files into a standard textfield ?
Regards
Strip Newlines
I have this code for getting data from xml to flash:
PHP Code:
xmlRoot["body"+k] = grunden.childNodes[i].childNodes[3].childNodes[0];
How do I strip newlines from the string? I have tried several things and all I get is undefined...
Newlines Format
hi folks,
when a user writes something down in a inputTextfield (in a compleet flash page) and presses enter (make a newline)
how are the newlines then formated ?
with
"
" , "
" or "
" ?
is it crossbrowser ?
the reason i ask is that i save the data in a Mysql database and when the data return to flash i see "
" in the debugger so, i think flash uses the "
" newline format, but before i add the data into the database i want to parse the data with php
thanks
Newlines Format
hi folks,
when a user writes something down in a inputTextfield (in a compleet flash page) and presses enter (make a newline)
how are the newlines then formated ?
with
"
" , "
" or "
" ?
is it crossbrowser ?
the reason i ask is that i save the data in a Mysql database and when the data return to flash i see "
" in the debugger so, i think flash uses the "
" newline format, but before i add the data into the database i want to parse the data with php
thanks
Multiline Textfield With Newlines
Hi all,
I am currently working on some little things in Flash in connection with PHP like sending e-mail etc.
My problem is the multiline textfield. When I have carriage/returns in my text and send this text to the PHP file I get the text without the carriage/returns... I tried nl2br($text) in PHP but it stays the same.
Does anybody know how to solve this?
Thanks,
Stefan
Double Newlines In Textfiles?
I'm making a movie that reads stuff from a text file, but whenever I want a variable to contain a newline character, it ends up having two newlines in my movie. It's a big problem because I can't have a single newline show up in my variables. So for example, my text file looks like:
-----------------
stuff=Hello world
How are you
&eof=1
-----------------
and when I read this text file into my movie, the variable "stuff" is:
Hello world
How are you
so that when I put "stuff" into a text box it reads:
-----------
Hello world
How are you
-----------
How can I get it so that Flash reads only one newline for every newline in my text file (instead of 2)?
High Score Table (empty Table) HELP
Hey guys,
[Flash8]
Basically I’m making a high score table and the problem I am having is that for some reason I can't see any of the information from my database table. I believe my php file is correct, I think the prob is somewhere in my action script but I just can't see it.
I have attached the flash file and the php file. My database table was on wamp and have attached a screen shot of the table.
Flash file:
http://rapidshare.com/files/10804329...score.zip.html
Image of database table:
http://img225.imageshack.us/img225/2702/databasetm2.jpg
Action script:
stop()
lv.onLoad = function(){
numRows = lv.nRows;
for(var n=0; n!=numRows; n++){
obj = {};
obj.Name = lv['name'+n];
obj.N0 = lv['number_of_minimum_attempts'+n];
obj.N1 = lv['number_of_attempts'+n];
obj.N2 = lv['number_of_wrong_attempts'+n];
obj.D = lv['date_time'+n];
arr[n] = obj;
}
makeFields(numRows); // show all results
};
function makeFields(num){
for(var n=0;n!=num;n++){
_root["name"+n].text = arr[n].Name; name2.text, name3.text, name4.text, name5.text, name6.text, name7.text, name8.text, name9.text, name10.text
_root["minimum"+n].text = arr[n].N0; minimum2.text, minimum3.text, minimum4.text, minimum5.text, minimum6.text, minimum7.text, minimum8.text, minimum9.text, minimum10.text
_root["attempts"+n].text = arr[n].N1; attempts2.text, attempts3.text, attempts4.text, attempts5.text, attempts6.text, attempts7.text, attempts8.text, attempts9.text, attempts10.text
_root["wrong"+n].text = arr[n].N2; wrong2.text, wrong3.text, wrong4.text, wrong5.text, wrong6.text, wrong7.text, wrong8.text, wrong9.text, wrong10.text
_root["date"+n].text = arr[n].D; date2.text, date3.text, date4.text, date5.text, date6.text, date7.text, date8.text, date9.text, date10.text
}
}
Thanks guys
Put Variables On Newlines When Sending To Email
Hi I have 2 input text fields (line1 and line2) on clicking a button I want to send the text entered to the body of an email with each field on a separate line(the client is Outlook 2000).
the following works but will not put the variables on separate lines:
on (release, keyPress "<Enter>") {
recipient = "joe.bloggs@xyz.com";
body = line1+ newline +line2;
subject = "test email";
cc = "some cc";
getURL ("mailto:"+recipient+"?cc="+cc+"&subject="+subject +"&body="+body);
trace (body);
}
has anyone else encountered this problem (the output window correctly puts them on separate lines, but in the email the text fields are on the same line)
thanks if you can help
Robin
Newlines In Dynamic Text Boxes
Hi,
I have a multiline Dynamic text box, and I want to be able to put the text on a new line when I want to (e.g. like /n or <br> in other languages). Is this possible? If so, how?
cheers,
Darkwhiteorange
Prob With Comparing Utf-8 Enc Loaded Strings With Other Strings
I load a bunch of strings from a MySQL database. Those strings have been utf-8 encoded before being put there. When I load one of the strings and compare with a string defined inside flash it works great as long as the string doesnt have more than one word. Two words or more doesnt work.
So loaded string "Oil and vinegar" isn't equal to the internally set string "Oil in vinegar" according to flash, although it is utf-8 encoded in the database...
blablabla load string "Oil and vinegar" from db into var words
if (words == "Oil and vinegar") { blablabla }
but this condition never evaluates as true....
What am I doing wrong?
Cs3 As2 - How To Detect Newlines In Dinamically Loaded Wrapped Multiline Textfield
Hi everybody, this is my first thread on Kirupa forums so please excuse my awkwardness.
I have the following composition from my designer:
So, I have to load these two HTML paragraphs from an XML file and put them in two actionscript created text fields. The text fields are multiline, wrapped and html and they are displayed just fine. Then I have to hilight one of the textfields just like in the image above so I must define a function that takes this textfield as an argument and creates a movieclip behind it. All I have to do further is draw some lines in this movieclip.
The problem is I just can't detect the newline characters in the text field so I can draw the hilights from the start of each line to the end of it.
Here is my function:
function hilight(sapou_txt){var hilight_mc = sapou_txt._parent.createEmptyMovieClip("hilight_mc",-1);
hilight_mc._x = -5;
hilight_mc._y = sapou_txt._y;
}
There would be .indexOf("") method of strings but if I use it after sapou_txt.text this has no result because, apparently, all I have there is a string without any special newline characters, just as I loaded it from the XML file, minus HTML tags.
If I use sapou_txt.htmlText apparently I get the original text including the HTML tags but, again, no special newline characters and, as you probably realised from my description above, I need both newlines from HTML (wich are not so hard to detect) and newlines caused by wrapping text in the textfield. Anyway, if I succeed in detcting newlines in the text field then I won't need the newlines in my original HTML.
Anyone had the same problem or know how to solve this, or know other way to draw those hilights behind every line in my text?
Flash .swf Within Table Cell Controlling Other Items In Table Cell...
This is a bit complicated to explain, I hope I put it across ok, lol. It will help if you download the .zip file to see what I'm going on about.
Basically, I have a table with cells. At the top in the middle cell is a .swf file which is red and to either side are 2 blue JPEG images in separate cells.
I would like to know how to refer to those 2 blue JPEG images from within the .swf file.
In the past I have managed (coded within .swf files) to refer to new windows, _parent and even frames. Now all I need to do is crack referring to image ID's.
The 2 blue JPEG image ID's are : 'HeaderLeft' and 'HeaderRight'
The HTML page holding the Tables is : TableExample4.html
The red .swf file is : Menu1.swf
HERE IS THE CRUX OF THE ISSUE - this is the code on the Hit Zone of a button within the Flash .swf file which is meant to refer to the blue image's ID.
on (release) {
getURL("SampleLines.jpg", "HeaderLeft");
getURL("SampleLines.jpg", "HeaderRight");
}
SampleLines.jpg is what I want to be the replacement image. HeaderLeft and HeaderRight are the image ID tags.
At present it is not working. It should surely ! I have no idea why.
If I wanted the image to replace the parent, it's simply :
on (release) {
getURL("SampleLines.jpg", "_parent");
getURL("SampleLines.jpg", "_parent");
}
If I wanted the image to appear in a new window, it's simply :
on (release) {
getURL("SampleLines.jpg", "newWindow");
getURL("SampleLines.jpg", "newWindow");
}
If I wanted the image to appear in a frame, it's simply :
on (release) {
getURL("SampleLines.jpg", "Frame1");
getURL("SampleLines.jpg", "Frame1");
}
...So does anyone know what to do if I want the image to replace another image on the HTML page ?
I hope this makes sense !
Thanks.
Error 2101: The String Passed To UrlVariables.decode() Must Be Url-encoded Query String
I am trying to make a flash contact form which will submit the firstname, lastname, email and comments to an asp.net page.
I am have having the following error:
Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
I am using the following action script code as pasted below. This action script is communicating with an asp.net file to send the email out. In the end it responds back with response=passed or failed.
I have already spent around 3 hours figuring it out.. and looking through the internet for resolution but no luck. Any help will be appreciated.
stop();
submit_btn.addEventListener(MouseEvent.CLICK, submit);
function submit(e:MouseEvent):void
{
var variables:URLVariables = new URLVariables();
variables.firstname = firstname_txt.text;
variables.lastname = lastname_txt.text;
variables.email = email_txt.text;
variables.comments2 = comments_txt.text;
var req:URLRequest = new URLRequest(”emailacount.aspx”);
req.method = URLRequestMethod.POST;
req.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, sent);
loader.addEventListener(IOErrorEvent.IO_ERROR, error);
loader.load(req);
status_txt.text = “Sending…”;
}
function sent(e:Event):void
{
status_txt.text = “Your email has been sent.”;
firstname_txt.text = “”;
lastname_txt.text = “”;
email_txt.text = “”;
comments_txt.text = “”;
}
function error(e:IOErrorEvent):void
{
status_txt.text = “There was an error. Please try again later.”;
}
and the following asp.net code:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Net.Mail" %>
<script language="VB" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Try
Dim fromEmailAddress = "paul@lancierinc.com"
Dim toEmailAddress = "rizwandar@gmail.com"
Dim firstName = Request.QueryString("firstname_txt")
Dim lastName = Request.QueryString("lastname_txt")
Dim comments = Request.QueryString("comments_txt")
Dim userEmail = Request.QueryString("email_txt")
'create the mail message
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress(fromEmailAddress)
mail.To.Add(toEmailAddress)
'set the content
mail.Subject = "Email from" & firstName & " " & lastName
mail.IsBodyHtml = True
Dim strBody As String = "<b>Email from</b>" & " " & firstName & " " & lastName & "<br><b>Email Address:</b> " & userEmail & "<br><b>Comments:</b> " & comments
mail.Body = strBody
'send the message
Dim smtp As New SmtpClient("mail.lancierinc.com")
smtp.Send(mail)
Dim urltoencodestring2 = "response=passed&err=0"
'Response.Write(urltoencodestring2)
Catch smtpEx As SmtpException
'A problem occurred when sending the email message
'ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a problem in sending the email: {0}');", smtpEx.Message.Replace("'", "'")), True)
Response.Write(smtpEx.Message)
Dim urltoencodestring = "response=failed&err=1"
'Response.Write(urltoencodestring)
Catch generalEx As Exception
'Some other problem occurred
'ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a general problem: {0}');", generalEx.Message.Replace("'", "'")), True)
Dim urltoencodestring3 = "response=failed&err=1"
'Response.Write(urltoencodestring3)
End Try
End Sub
</script>
String Passed To URLVariables.decode() Must Be A URL-encoded Query String...
I really don't understand why this won't work? I've made a test which sends some POST data to a script on my page which works fine. But why does not this work?
Code:
var mapsize = _cmap.fieldx.toString(16) + _cmap.fieldy.toString(16);
var names = "Zomis_AI6";
var description = "descr";
var result = "gameresult";
var upldata: String = "mapsize="+mapsize+"&names="+names+"&description="+description+"&result="+result;
trace(upldata);
var variables:URLVariables = new URLVariables(upldata);
var request2:URLRequest = new URLRequest();
request2.url = "http://www.zomis.net/record.php";
request2.method = URLRequestMethod.POST;
request2.data = variables;
var loader2:URLLoader = new URLLoader();
loader2.dataFormat = URLLoaderDataFormat.VARIABLES;
loader2.addEventListener(Event.COMPLETE, uploadcomplete);
try {
loader2.load(request2);
trace("Loaded");
}
catch (error:Error) {
trace("Unable to load URL");
}
Tracing gets:
Code:
mapsize=1010&names=Zomis_AI6&description=descr&result=gameresult
Loaded
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables$iinit()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
LOT OF THX For Your Help - Here Is The RESULT
lot of thanx for your help.
with your help i learned a few things that made the stuff in the ZIPfile possible.
it's a paint thingy with save and clear functions.
thx and regards
final version of the vectordonator is available on www.elektrobong.com
Different Result On Different PC
Hi, I've designed a website for our company and some weird thing happend to my boss's computer. Everything runs pretty smoothly till today, the website start acting weird. so I checked up his Flash player and see if it's the problem, he was using player 6, so I upgraded to 8 for him, then I ask him to restart the compter and re-launch our website...
I clicked the mouse right button after he open the browser, and the players still shows me "Flash player 6", why is that? I'm 100% sure I upgraded to player 8 in macromedia's website......can anyone please tell me~why~why~tell me why~
Randomize String And Create Textfields With String Txts
Hi,
is there some easy method to randomize elements of an array (to randomize index numbers) and create textfields with name of these elements ?
I had no problem making a photo gallery with strings but now I have to do a menu , with spacing (there should be same space between all the words of an array generated textfields)...How can this be accomplished ?Thanx in advance, Meerah
Convert Multiline String To A One Line String With RegExp
better get my own thread for that
How can I convert a multiline String to a one line String?
EX:
PHP Code:
Testing is always full of man made bugs.
<a href="http://www.betterthannothing.com" title="betterthannothing" target="_blank">
<font color="#22229C">Believe</font>
</a>
me when times comes that you have to
<a href="http://www.vreate.com" target="_blank">create</a>
useless stuff to test some other useless stuff to have
<a href="http://www.vreate.com">some</a>
real results.. its a pain.
<img src="http://www.markval.com/deerPack.jpg" height="484" width="352"/>
<em>Got to try that stuff to eventually love it one day.</em>
and should result in
Code:
Testing is always full of man made bugs.<a href="http://www.betterthannothing.com" title="betterthannothing" target="_blank"> <font color="#22229C">Believe</font></a>me when times comes that you have to<a href="http://www.vreate.com" target="_blank">create</a>useless stuff to test some other useless stuff to have<a href="http://www.vreate.com">some</a>real results.. its a pain.<img src="http://www.markval.com/deerPack.jpg" height="484" width="352"/><em>Got to try that stuff to eventually love it one day.</em>
I think it have to play with the ^ (caret) and m (multiline) ... just need to put the puzzle together.
Strange Result
Hi everybody,
I'm trying something simple but it's not understandable by me.
Let's say I have on the first frame (in the main timeline) a function like this:
function move (){
_parent._parent._x += 3;
}
HyperLink In Result Set Using Asp
Hi,
I am writing a search functionality using FLASH MX and asp. Using LoadVariablesNum in FLASH to load asp page and displaying the results in the next frame using dynamic text.
For returned resultset - I want to be able to hyperlink each ids, which on clicking, opens another window and displays entire record information.
Any help would be helpful!
Thanks.
Round Off The Result
Little problem here,
I have a few numbers and I want to multiply them and then I want the result to be round off at 1 number after the comma.
How do I do this?
What Actionscript Would Get Me This Result?
Really simple i'm sure, but I have an image converted into a button then a movie clip, and it drags, but how would I make it so when i click it to drag it, it goes in front of everything else in the layer?
How To Obtain This Result?
Sorry, wasn't sure where to post this...
I'm looking to develop a menu, and not sure where to start, I'm no flash guru.
The effect I'm looking for can be found here
http://www.dieselmarketing.com/main.htm
under English/Canada... then move mouse over to right side, menu on top right. See how it grows on mouse over, then goes back on mouse out...
Any ideas?
Always True Result?
code: onClipEvent (enterFrame) {
if (spin == true && (winningnumber != 0 || winningnumber != 1)) {
this._visible = false;
}
}
No matter what the result (as long as spin is true) the code above is always true. What am I doing wrong?
LoadMovie Result
hi im using loadMovie to load some jpgs into my flash. if some jpgs should be missing, is there a way for flash to return some result of the load action, that i could use?
sort of loadMovie() = boolean?
thanks
How Can I Improve This Result?
Hi all. First time posting here, I could really use some help. I'm working on a portfolio website, but I'm using 3D renders that I'm bringing into Flash. They are raster images, not vectored. So the problem is with playback once I upload the files to a server. I have tried two different ways to bring the animation in. One using an .flv, and the other way of importing an image sequence. The image sequece seems to have the slower playback. Here is a link to the version with the .flv. Any help with the proper way to set up a Flash page like this would be GREATLY APPRECIATED!!! Here is the link! Thanks in advance!
Test of Portfolio website
Jay
XML Result Error
Hi!
This...
Quote:
private var result:XML;
private function onResult(e:ResultEvent):void {
trace("Result is: " + e.result);
...
...gives me
Quote:
Result is: [object Object]
The XML structure is coming from a PHP script an looks basically like this:
Code:
<fields>
<field>
<fieldname>CONTENT<fieldname>
<field>
<fields>
So trace() should return something like:
Quote:
station_id
station_name
etc
So What am I doing wrong here?
Trace Only One Result
Hi
I have this code
Code:
for(var i = 0; i<myArray.length; i++) {
trace(myArray[i]);
}
However it traces all results
how can I trace only the first?
thanks
Size The Result
Hi!!
Maybe this is too easy for you! ehehe but I would appreciate the help.
I wish that result of my work in flash covers the 100% of the screen monitor. what I should do? which is the best way?
Thanks a lot
Using The XML Result In Another Class
Hi, the new tools for XML are great in AS3 and I can easily get data from a function that reads a php script that query a MySql DB returning the result in XML format.
I would like to enclose all the XML things in a separate class and access the XML data from other class, even from other function, but I can't find the way. The final XML object remains isolated in the function that creates it.
ActionScript Code:
private function getXML():void
{
var $url:String = "http://myscript.php";
var loader:URLLoader = new URLLoader();
loader.dataFormat = "TEXT";
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.load(new URLRequest ($url));
}
private function handleComplete(event:Event):void
{
var myData:XML = new XML (event.target.data); // How can I access myData from outside this function?
}
}
It is too soon for me to structure the application in a manner that data and view are absolutely separated (as the paterns that I have read about), but I try to do my best while learning.
Regards: Jeremy T.
Get Properties From E4X Result
I am trying to query xml using E4X and get node properties
My XML
ActionScript Code:
<root>
<type attrib="Round">
<product id="1">
<name>Asia</name>
<size>850 x 850 x 65 x 175</size>
</product>
<product id="2">
<name>Compact</name>
<size>300 x 850 x 65 x 175</size>
</product>
</type>
<type attrib="Square">
<product id="3">
<name>Tore</name>
<size>850 x 350 x 65 x 125</size>
</product>
<product id="4">
<name>Made</name>
<size>400 x 700 x 65 x 105</size>
</product>
</type>
</root>
ActionScript Code:
//_xml - loaded xml file and converted to xml
var xmlList:XMLList = _xml.type.product.(@id == 3);
var xml:XML = xmlList[0];
// xml value looks ok
//<product id="3">
//<name>Azja</name>
//<size>850 x 850 x 65 x 175</size>
//</product>
//I do not know ho to get name & size
//This do not work
for each(var property:XML in xml.product)
{
//do not even go here
}
Remoting Result
Hello,
Iam almost there, I am using the super simple remoting classes package found on osflash.org
I have a cfc component to retreive data from the database. The cfc returns a query result to my flash movie.
In old days we used to have
trace(re.result[0].dbFieldName)
now I have
trace(re.result) and returns me an [object object] trace.
The other way trace(re.result[0].dbFieldName) returns
TypeError: Error #1010: A term is undefined and has no properties.
Any ideas how to get the data from the object?
Cheers,
Giorgos
XML Result Error
Hi!
This...
ActionScript Code:
private var result:XML;
private function onResult(e:ResultEvent):void {
trace("Result is: " + e.result);
...
...gives me
Quote:
Result is: [object Object]
The XML structure is coming from a PHP script an looks basically like this:
Code:
<fields>
<field>
<fieldname>CONTENT<fieldname>
<field>
<fields>
So trace() should return something like:
Quote:
station_id
station_name
etc
So What am I doing wrong here?
How Do I Acces The Result?
Hello
I have encountered a problem with amfphp.
I acces the service, it's working good on a tutorial but in this tutorial the result from the connection it's bounded directly to a text field.
how can i acces that result from action script?
Different Result In Different Browsers
Hi,
I'm kind of new withs Flash. But I've made some banners some days ago. And one of them is published. I got rather confused when I visited the site. In IE6 the text isn't shown, but in FireFox and some other browsers it's shown correct. I thought if it works in one browswer with Flash it work all others who supports Flash. And the result is allways the same no matter what browser you're using. Or have I missed something?
Help On Query Result
i am connecting on a database via flash remoting, and i'd like to get the result of my query.
on the clientside, my code is:
trace(result.items[0].F1_1)
this will return first item on the query with column name of F1_1
however, i have a lot of columns returned and column names are named like F1_1, F1_2 ... F12_1, F12_12.... and so on and i'd like to get/trace the value of each column. My alternate solution to cut/save coding space is to do a loop:
for(ctr1=1;ctr1<13;ctr1++){
for(ctr2=1;ctr2<13;ctr2++){
trace(this["result.items[0].F"+ctr1+"_"+ctr2])
}
}
however the loop code returns undefined.
any suggestion on how i am going to loop and return the value of the column names?
Math.cos Result WAY Off
I have a function that takes an angle in degrees and converts it to radians. From there it takes the cosine of that angle and multiplies it by another number. The problem is the result of the Math.cos is way off.
The first line of code is this:
var theAngle = Math.abs(myAngle)*Math.PI/180;
myAngle is = -90. the result is that theAngle becomes 1.5707963267949.
From there I have this line of code:
var objAcc = grav * Math.cos(theAngle);
note that grav is set to .45. I've double checked in the debugger and theAngle is still equal to the above listed number. So, the result SHOULD be that objAcc should be equal to -1.5711675124992e-15. HOWEVER, it is actually being set to -1.72286501471525e-1. Is there something I don't know about working with Math.cos? If I run the function and put in the number itself instead of a variable it works out fine. It's just that when I have the variable in there it screws it up.
XML Result Error
Hi!
This AS code...
private var result:XML;
private function onResult(e:ResultEvent):void {
trace("Result is: " + e.result);
...
...gives me
Result is: [object Object]
The XML structure is coming from a PHP script an looks basically like this:
<fields>
<field>
<fieldname>CONTENT<fieldname>
<field>
<fields>
So trace() should return something like:
station_id
station_name
etc
So What am I doing wrong here?
Edited: 07/23/2008 at 09:16:27 AM by Kenwio
UNDEFINED AS RESULT
HI THERE ALL...
Is there a way to "personalize" the "undefined" message?
Im asking this because when I retrieve data from Filemaker Into Text-Fields inside Flash, sometimes I receive the "undefined" message (this is when the user didn't enter the data in a proper way in Filemaker) so I would like to display a "blank" Field instead the "undefined" message!
IS THIS POSSIBLE?
Thanks
Calculating The Result..
Hi,
I am doing this bit of drop target in flash mx2004.
The problem is my 'all wrong' field is working where as 'all correct' is not working.
and can any one please tell me how to write the code for calculating the results like total correct,total wrong and the percentage of correct out of total.
Any linkl to such type of tutorial will be of great help.
Check my flash file to read the code so far:
Print - Very Bad Result
I'm trying to print a mc from flash. The mc has dimensions 1000x1400 pixels which doesn't allow it to print on one page. So I'm forced to scale it a little bit. Unfortunatelly the final result is very bad. In fact the result when I try to print it without scale (just the part of the mc that can be printed) is much worse that when I print the content of that mc (an image) independantly.
Bottom line: when I print the content of an MC from flash the result is much worse then when I print the content itself, without flash
So I was wondering is there other way to make my mc fit to a printable A4 page or any other advise you can give me?
P.S. the quality publish settings are not an issue, because the image is loaded as an external file to the flash
Thanks
This is the code I'm using
Code:
printButton.onRelease = function()
{
var pageCount:Number = 0;
var my_pj:PrintJob = new PrintJob();
if (my_pj.start())
{
var x:Number = myMC._xscale;
var y:Number = myMC._yscale;
myMC._xscale = 60;
myMC._yscale = 60;
if (my_pj.addPage("myMC",
{xMin:0,xMax:1000,yMin:0,yMax:1400},null, 3)){
pageCount++;
}
myMC._xscale = x;
myMC._yscale = y;
}
if (pageCount > 0){
my_pj.send();
}
delete my_pj;
}
Add To Url Result From XmlConnector
using components for the first time (thought it looked quicker than a.s. for everything)
i'm using xmlConnector, getting all text info ok (displaying it in textareas).
also need to display an image (in a Loader component) but the url in the xml file is truncated - doesn't contain full path. (e.g. need http://www.blahdomain.com/imagefolder/image.jpg... xml only contains /imagefolder/image.jpg )
how/where do i add the http://www.blahdomain.com bit so flash goes to the full url?? there must be a box somewhere?!? or can i add it in a.s.?
|