ActionScript 2.0 :: Changing Text Files For Flash To Use
May 9, 2004
Im doing a flash site, and trying to do it with 2 languages. They are contained in 2 separate text files. Now the language selector is placed just after the preloader, containing 2 buttons, each with a portion of code Button 1:
Im doing a flash site, and trying to do it with 2 languages. They are contained in 2 separate text files. Now the language selector is placed just after the preloader, containing 2 buttons, each with a portion of code Button 1:
[Code]...
Now flash just for hells dogs doesnt want to load a txt file. Wheres the error then?
I am new to flash and decided to start out using templates to gain a beter understanding. I grabbed a template - that when I went to save it said it was an MX version - once I began to make changes in it re-save and publish it I noticed that some of the elements were missing. I thought it was something I did so I copied the entire directory and just opened the .fla and saved it without making a change and then published it and the items were gone again. I saved it in the same directory only changing the output .swf file and used all of the same html files
Inside I have: myText1=This is test 1. &myText2=This is test 2.
I tested it out with my dynamic text. If I made the variable myText1, it loaded the first line. If I made it myText2, it loaded the second line. All seemed to be fine.
I have a dynamic textbox, variable named names. I want to be able to change the variable in order to get it to load whichever line of text I want.
But that's not working. I've tried playing around with it in various ways, like names = eval(myText1);
and such, but nothing is effectively getting it to change. I've been trying to look it up and tried all the different ways people told other people to use, but it's not working for me.
Once I get this work I everything should fall into place easily.
I am looking for a simple solution to my problem. I have 3 flv videos I would like to display after each other. That is fine, however, My problem is that I want to change the flv files (thus changing the video too). My problem is that since the videos are different, the time between one another may vary. I would like to know how to instruct Flash to skip to the next video once the previous one has stopped.
I am studying Flash and want to make a video player with where you can change video and the corresponding subtitles with a click on either "forward" or "back" button.
So far I have created 2 arrays of video files ("[videos]") and text strings ("[captions]"). By clicking on one of the buttons, the video in the FLVPlayback component changes as well as the the subtitles-text in the TextArea.
However I have a problem with text formatting.
I use the following functions for button click:
function playNextVideo():void { if (currentVideo < videos.length-1)
[Code]....
My problem is that the format changes only when I click the button, but it is not applied for the first subtitle.
So, for the first video I get a plain text, with black color, not italic and not with size "18". However, if I click on "forward" button (and thus execute the playCurrentVideo() again), the format will change. If I then will try to go back to the first video, the text will now be formatted.
So my question is - what causes this condition and how to handle it?
Hi, I'm trying to change the text within a movie clip and I can't work it out. My plan is to load the navigation from variables that will be passed from a php file.
This link is to a zip file containing the fla file, [URL]
I have a TextField that is formatted with bold and blue. However, when I change TextField.text, the formatting of the textfield resets and I have to setTextFormat again. This is the code I use to set my TextField. myText is the variable for my TextField. (This is just part of my code; it is part of a function for my EventListener.)
I'm converting an old Captivate 4, Actionscript 2 GoToSlide widget to Captivate 5 and Actionscript 3.The FLA file of the old widget when opened in Flash has Actionscript 2 code including the following extract sitting at top level of the file timeline. The third last line of the following evidently controls the colour of the text on rollover:
I have a xml menu bar with the menu titles in black. This titles are loaded from an xml file into a dynamic text field inside a movieclip. Well, i would like to set the color of the menu items to red when clicked and back to black when any other menu item is clicked. I know there is a way with actionscript (i have been going on circles around the color class the hole afternoon ) but i cant find it (i admit, im quite a dummy with AS).
I want to make some buttons and use the buttons.fla library. The button is inserted and given an instance name. A second button is inserted (same kind) and given a new instance name. But when I am trying to change the label text in one of my buttons the text is changing on the other button as well. I believed they where separate instances?
I have a code that creates 10 dynamic text fields, along the "y" axis, based on a loop.
What I want to happen is, for each text field that is created, i want the numbers to constantly change based on a timer (they'll all change at the same time, but to random numbers).
Right now, the code below changes the numbers, but keeps stacking the new numbers on top of the old...
Code:
Code: var timer:Timer = new Timer(100,0);//called every Xms, repeated infinately (0); timer.addEventListener (TimerEvent.TIMER, doNumber); timer.start ();
I'm trying to get the letters in a word (each letter is an individual text object) to cycle through three different colors when clicked. Right now, all they do is change from their original color, blue, to black when clicked. No further "cycling" occurs. I'm appending the code. The part of interest is (probably?) in what is presently (and inaccurately) the "traceTextEvent()" function/method. It starts around line 90 of the code.
I need to make it so that my client can edit some text files that are displayed in a frilly little font with shades and all that "mainflashpage.swf" accesses to display it. I heard you can do a lot of things like this with php. I know NOTHING about php. So is there any way that I can use flash to edit a text file? I remember about using void at the end of declaring a function if your not returning data.
I am fairly new to Flash 5, I have been using Swish for about 1.5 years. I want to advance to a new level though. I have asked this question at others boards, and haven't yet got a detailed enough answer for me to understand it and work it. Either that, or I am making just a tiny error. If anyone could explain in detail how to show a .txt file inside a flash OR give me a link to a detailed tutorial then that would be great.
Is it possible to change the text property of a text field that is contained within a sprite? I've been trying but can't come up with the right syntax. Here is what I'm doing:
I've created a sprite named "lessonSprite" and added a text field to it in one function. Now, in another function, I'd like to change the text in the field.
I have a Dynamic Text box in my Library. I drag it to my main stage and give it a name..it is now a movieclip. The name is 'mcAdmin' I added an event listener for MOUSE_OVER I want the text to change color, but for now I'm just trying to change the text; however, it's not displaying the change in text I want. I do a trace, and the change is in there on the output window, but it is not displayed as such.How can I :1) use AS3 to change the font color of the text2) use AS3 to change the text and have it display?
function onMouseOver_txtAdmin(e:MouseEvent):void{ Mouse.cursor="button"; //Current mcAdmin text is 'Administration' //I want to change the color of Administartion on Mouse_Over
I have a textfield that is dynamicly created which contains some text and has a textformat applied to it, which works fine, and I have my happy little text field.
the problem comes when I try to change the text and textformat after an event. I am doing it as so:
I just started playing with scripting and here is a question i got. I got 1 button.A movie with containts 3 graphics , graph1 , graph2 , graph3 Each graphic contains a Dynamic Text field. The var of that field within graph1 = text1, graph2 = text2 etc. On release should put the text "test" in each of the textfields and should play the whole movie wich contains the graphics with textfields. this is the code i made
Code: on (release) { set ("_root.movie.graph1.text1", test);
I'm working in AS3 using Flash CS3 in the Mac OSX Leopard environment and would like to save data, to be later retrieved, in text files (probably xml). The data will be the result of the user interaction with the swf and the ideal location will be the directory (local or website) in which the swf file is located.
I know I could achieve the same effect using a database backend but want to make the swf file more portable, and don't really want to dedicate a database to this function. I've read a bundle of website comments on this but none seem to tidily do what I want, and I am not a whole lot wiser on the subject. The data will be user details and variables (e.g. scores) to carryover to when the user next accesses the game. What are my options (FileReference.save, SharedObjects, URLLoader, other )
I am having trouble trying to use actionscript to load different files when different values are changed. I am currently using a tilelist and they have different values so the code is something like this: (the title is just there, non-related)
if (startTileList.selectedItem.value == 1) { //textFile1 load here[code].........
So I want different text files to be loaded when different value is selected but I cannot seem to get it working.
We need to generate around 8,000 nearly identical SWF files with slightly different text. I know about flashvars, but unfortunately, we don't have control over the publishing of these files and can't have flashvars passed in. Ideally what I'm looking for is that we have a flash designer come up with a nice looking template for us with a placeholder text or element in the file. We can then call a command line utility many times to generate 8,000 copies of this with slightly modified text. I've searched for an entire day now and haven't found anything to help us out. Granted, I'm not a flash developer, but it seems like this would be pretty straight-forward.
I am currently developing a form that saves all text fields, and creates a text file for each field. Some fields require a lot of information, so I figured (I think its called) URL Encoding wouldn't be useful. I can save one text field, to one text file good. The issue I'm running into, is how to save multiple text fields on the same frame, to multiple text files.Currently this is the code I have now:
I'm trying to put a text in a dynamic text box. The text element, however, is placed dynamically:
var topText:myDynamicText = new myDynamicText(); topText.name = "NameTextTop"; topText.text = String("Text 1"); addChild(topText); topText.text = String("Text 2");
Placing the text element isn't the problem, but I cannot seem to change the text in the element. As you can see, I tried placing the text before and after putting the text element on the stage. Both didn't work. The text element is creating from scratch by adding text with the Text Tool. It's single line dynamic text, Arial regular and the text characters have been embedded. Can anyone tell me what might be the problem, because I'm completely stuck.