ActionScript 3.0 :: Php Versus Textfile Dynamic Text?
Sep 27, 2011
i am at the last part of my project. it worked all well and reads all text fields from a text file as seen on :[URL]now i am trying to get the same thing working from MYSQL.Notice that the text file i used for index2.html is called [URL]and it was a direct copy/paste from the php page that gave the results from the MYSQL query. [URL] The problem is i am getting an error in [URL] which uses the php to get the text for the dynamic fields.
I get the following error:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at final_fla::MainTimeline/onDataLoad()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
my flash movie has 113 buttons called button_1 --> button_113 and 113 dynamic text fields tcname_1-->tcname_113
my AC3 code is the following:
// button links: to all buttons to open in iframe 'tdes'
// link corrosponds to button number
// i have 113 buttons.
i'm trying to display text from a textfile in a dynamic textfield, i have a text file called "quotes.txt" wich has variables set like this:q0=text&q1=text2&q3=text3 etc.so how can i pick these q's at random and place it in my textbox?i've tried this:
loadText = new loadVars(); loadText.load("quotes.txt"); quotes="q"+Math.round(random(10))
does anyone know if you can load text from an external textfile into two columns, going to the second when the first is filled?? I only found this (okay, three columns, but I mean the text here is not externally loaded)
When I use a Mouse Event listener with the trace function trace (e.target.name), why don't I get the instance name I assigned in the property panel? Instead I get something like "instance 12". How can I target Mouse Events using the names I assgn?
Anyone ever notice that Flash renders the same font totally differently depending on whether its a static or a dynamic textfield? It's really frustrating when you're trying to make everything look consistent, and it looks like you are using two different weights of the same font.
Does anyone know if there is a serious performance increase if I were to instantiate say, 4000 objects from the library instead of creating them purely in a class?Also I know very little about garbage collection and testing performance
I have tried to do a script which makes a texteffect. It is one of those regulars in which you use dynamic text, at multiline, with substring and an onEnterFrame.
So the textfield starts at noll characters and goes up.
But the main problem which I dont know how to handle really is when it comes to make the .text property to a .htmlText property.
It seems to be really difficult to port the code for .text to allow .htmlText.
Since when using substring on a html-formatted string will take all html-markup into consideration.
i have a problem with the line space flash creates when a dynamic text is loaded in a dynamic text field on the stage i put a dynamic textFild with istance name "profile_text". then im loadin in it a text. my text is written in the Notepad like this
[Code]...
i already set a Textformat to my dynamic text with i tryied to play with the "Leading".. but i think it something dealing with paragraph. how i can decrease spacing between paragraphs??
All I want to do is add text from my string to dynamic text field when I click dynamic buttons. What should the as code be for this? Here is my code. Right now I just have the click returning another shape.
Simple URLLoader to get a textfile into a textfield.[code]Works fine locally, not on the server. I tried replacing it to the full http: URL to no avail.
I just make a simple system login that the username & password loaded from textfile then I store in array..but the problem is when I doing tracing nothing was trace..?this is the code I'm using for the flash
Okay so I am new to using txt files, and not too great with arrays, but I think I should have this right. But when I try to trace the array, I get undefined!I found this on another thread, and changed it accordingly.
Code: _root.textArray = new Array(); _root.text_lv = new LoadVars();
I have a variable which takes a particular form of array (used with the component DataSet). It looks like this:
Code: var recData = [{svenska:"Hej", spanska:"Hola"}, {svenska:"nej", spanska:"no"}, {svenska:"ocks�", spanska:"tambi�n"}];
I want to extract this variable from a textfile instead of writing it directly into the code-area of the flash-file, so I used the following code:
Code: // 1) Loads the textfile, recieves the array, and puts it into a variable called txt_Data var txt_DataSet = new LoadVars();
[Code]....
Unfortunately it seems the array gets converted to an ordinary string in the process, so I cant use it properly. Is there a way I could extract the array from this string again, and if so, how?
What I'm wanting to do is set the scale of a textfile (putted in an mc) at 200% and scale with a prototype on release of a button to 100 precent (its height).
I just load data from textfile into my flash file..so my problem is..how is it in flash I have to code so that I can edit the loaded data from textfile and then when I submit it'll update the data in textfile...of course I'm using php for writing in textfile...Currently I load the data into listbox from my textfile...is it possbile to edit the data from flash...
In have an application that uses buttons t0 load different text files. The problem is when I load the second text file I still get variables from the first one showing. To clarify things, suppose I load a file that displays variables 1 through 5 randomly when I click one button, then I click a second button in order to load a file that displays 6 through 10. The problem is that I still get some variables from 1-5 when I want to get only 6-10. Is the first file kept in memory or something? How do I unload or clear the temp/memory where the content of the first file is held.
using txt files, and not too great with arrays, but I think I should have this right. But when I try to trace the array, I get undefined!I found this on another thread, and changed it accordingly.
Code: _root.textArray = new Array(); _root.text_lv = new LoadVars();
I'm trying to load data from an external textfile, called "config_flash.txt". It works perfectly if applying the fetched data is done within the same function where the loading is done. However, I would like to use the fetched variables in other parts of the script.
Here's what works:
Actionscript Code: var varLoader:URLLoader = new URLLoader(new URLRequest("config_flash.txt"));varLoader.addEventListener(Event.COMPLETE,
[code]...
So, basically I want the variables/values defined inside the function to be available anywhere in the script. The error that the second code snippet causes is as follows: "1120: Access of undefined property text1/text2".
I am creating a CBT course using Flash CS4 As3. I need to capture progress information from the user as they complete each unit in the course so that the next time they access the course they can pick up where they left off.
To do this I need to know how to write and retrieve this information to and from a text file or a cookie so that it can be retrieved re-enters the course.
I'm trying to load variables from an external .txt file into Flash MX and this is the code I'm using: links = new LoadVars(); links.load("assignLinks.txt"); links.onLoad = function(success){ if(success) { diovan = links.diovan; diovanhct = links.diovanhct; }} trace(diovan); trace(diovanhct);
(The text file has the following content: diovan=whatever&diovanhct=whateveragain&) The trace outputs "undefined" for both variables. I also tried loadVariables instead of loadVars... same result. If this is a problem specific to Macs, whats the work around?
I want to load the same external textfile in two different textfields. No problem. My freaky question is: Can I adapt the text a little in one of the two fields, more specifically: leave out the last three symbols/letters? For instance: Elvis would have been dead if he was still alive >>> and: Elvis would have been dead if he was still alive The only trick I can think of is embedding the font, but not embedding the > sign. Is that possible? I am using Verdana here.
I am trying to pass a variable from a text file into a variable in flash and trace it to screen. This is what I have done so far, but its not working. I have created a text file in the same folder as my flash. In the text file I have this:
loadedtext=hello flash code: function myFunction(){ trace("Data is loaded"); } var container:LoadVars = new LoadVars(); container.onLoad= myFunction; container.load("demo1.txt"); trace(container.loadedtext);
just a quick shoot here...okay I try to refresh updated textfile data every 2 seconds and it's works ok if I'm using normal delimiters and proper data arrangement in textfile such as
I have a text file that set's some color values I would like to use in my flash movie. basically its a configure file for movieclips rollovers(set's the colors)[code]...
I'm making something like a dynamic Picture Viewer, wich should display Pictures named by photo1, photo2, etc. dynamically from an url I give the viewer as a parameter. Thats not my problem by now, my problem is that I try to give the viewer few "parameters" through a text-file
NumberOfPictuers=12
I load this file like this
loadNumber = new loadVars(); loadNumer.onLoad = function() {
I have a text file that set's some color values I would like to use in my flash movie.bascially its a config file for movieclips rollovers(set's the colors)my textfile reads as follow
Code: textOut=0x3F6075&baseOut=0xFFFFFF&outLineOut=0xE19C14 My Flash is as follows: