ActionScript 2.0 :: Pulling Multiple Info From Text File
Jan 28, 2009
I am currently trying to modify a hangman game I found on here (URL...). I'm not very good at actionscript and hopefully this will be a good exercise to learn more - I really want to learn how to make games. I have seen hangman games that include clues for words, but the only games I can find that I can read the source in don't have a clue field, and pull the words from an external .txt file. Is there a way of also pulling phrases to be as clues from these files? I could just create another .txt file and make it a new variable, but of course I would have the problem of it not matching the word. I hope i made sense.
View 6 Replies
Similar Posts:
Apr 11, 2007
im developing a game at the moment in flash that relies on flash remoting.I'm not great with flash remoting so ive managed to combine my flash game with a flash remoting tutorial. The tutorial pulls info off of my MySQL and works by putting it into a DataGrid. Im now just looking for a way to pull each piece of info out and into a variable. Heres some of the code:[code]I tried putting the info into and array but obviusly its returning an error due to the fact that r.result is a object.Im just looking for a way of pulling info out of the grid and into seperate variables.
View 1 Replies
Nov 27, 2004
so i got the info all in the database and then i have a php page that goes and retrieves the id that the e-mail sent through. here is my code on the load.php page so far:
[Code]...
View 6 Replies
Nov 27, 2004
i got the info all in the database and then i have a php page that goes and retrieves the id that the e-mail sent through. here is my code on the load.php page so far:
PHP Code:
<?php
//database connect
require_once("connect.php");[code]...
now i've got all the records of value $card (lets say 8 for this instance) pulled into this php page, how would i go about loading them into flash with loadVars()? for the record names, i used this line to originally insert them:
PHP Code:
$result = mysql_query("INSERT into ecard (fname, femail, tname, temail, message) values ('$fromName', '$fromEmail', '$toName', '$toEmail', '$message')");
View 6 Replies
Feb 27, 2010
I'm not sure how to explain this, but why isn't this code pulling the correct image and icon file? It continues to pull the wrong info at the line 35, which makes all other data one node behind. Even when I delete the three locations below, it still gets the xml wrong. Why would it be doing this? I verified the xml data and made sure all the files were in the correct folder. For example, this is a result from a trace:
[Code]...
View 1 Replies
Aug 10, 2009
I'm going to be creating a kind of fake RSS feed scrolling on the bottom of my webpage, and I want to be able to have it read data from a .txt file, so I don't constantly have to go into the flash file on a daily basis and make new swfs :P
View 3 Replies
Nov 22, 2010
I'm using an old open-source mp3 player (musicplayer.sourceforge.net) on my site because the visual design does not clash with existing colors, etc.The author provides two versions of the player. (ea also has the fla file in case I want to modify it for a different swf) One allows the user to pick from several songs stored in a simple text playlist, and the appropriate album cover is displayed during playback. The other is a "slim" version that is just for playing one song at a time. In the first player,the artist's name (pulled from the playlist) is displayed and then the song title scrolls across while in play. Some additional basic text is stored in an accompanying actionscript 2 file. I have no trouble with this version. The slim version is supposed to do the same thing. However, it continues to marquee text of the player author's name regardless of what I change. I replaced text strings in both the actionscript file and the playlist but the player doesn't seem to extract them.
View 1 Replies
Sep 9, 2009
I have created a site for my relative's garden. They have already registered there location and info with google maps and I have already installed the api in the site. I also, already have the map located on their location with an pin over it, but I was trying to figure out how to make the map pull the information that pops up when you click that pin. Do I need to create that myself or is there a way I can pull that from google? Here is a link to the site: [URL]
View 1 Replies
Jan 30, 2009
I'm making a yearbook for my school and I have A LOT of information to be shown on it (in case you were wondering, its a digital year book lol). Theres a certain page that has all the headshots of all the students, and when the picture is clicked, a new scene opens with the information on the student (along with fancy opening animations). Firstly, is that the easiest way to do it, or can i have an overlapping MC that appears over the pictures, fading out or blurring the background, then click an X to shrink and fade out and unblur the background...Secondly, is there a way to create a template thingo for this MC or scene so that it can automatically read data from an xml or text file and place it in the appropriate position for that name. For example-the text would look like this
"bob_bio"
pic:"C:~~obphoto.jpeg"
Info-
[code].....
View 1 Replies
Mar 10, 2008
I have a dynamic text instance in Flash named dynamic_txt and I want it to display information from a php file. What command allows me to do this? Here is the code:
PHP
<?php print "dynamo_txt=DYNAMIC"; ?>
ActionScript (2.0)
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
//Here is Where I want the command that will allow Dynamo_TXT to display the String // From the PHP File
};
my_lv.load("cars.php");
View 2 Replies
Nov 6, 2009
Basically, my whole website's going to be in Flash, but I want to be able to update one page (sort of a news/blog page) without having to edit the Flash file every time. I'm assuming the easiest way to do this would be to set up either a scroll pane or a text box and pull the text in from a .txt file. That way I could continue to add on to the .txt file, and Flash would always pull in the current version. So, my issues are:
1. I have no idea where to start with the code for something like that. Is it a LoadVar? Do I physically put a scroll pane or a text area in the frame and put the action on that, or do I put the action on the frame and have it call up a text area component?
2. Will the text scroll automatically, or is that something else I would have to add in? I plan on adding to this text file for awhile, so it could end up being a lot of text over time.
3. Would I be able to format the text in the .txt at all? For instance, if I hit enter to put in a paragraph break, would that register once it's pulled into Flash, or would I have to put in an html paragraph break or something? That may be a dumb question, but as I said, I'm not exactly fluent in ActionScript (or any other programming language for that matter).
View 3 Replies
Jul 16, 2009
I have a rotaing menu that loads in images from an xml file, I would also like it to load in text info from the same xml file to the left side of the images that load in. In my main .fla have created a movieclip and called it 'textInfo' and inside that I have two dynamic text fields called 'headerText' and 'bodyText' where I want to load the text in. this is what I am using to loading in the text in my actionscript, is this correct?
[Code]...
View 22 Replies
Oct 6, 2006
Is there a method to pull the value of the current swf file's name? For instance, if I have a movie called 1.swf open is there something I can do like myMovie.name and have the return value be 1.swf?
Problem: I have 24 flash movies. Each movie has different text that needs to be displayed, so what I did was created an HTML file with vars on it like &1=Hello &2=World. Now in my flash movies I load that HTML file, and have a dynamic text box that pulls in the values. This all works, but as it stands I have to change the var the text boxes pull in, and recompile, so instead I was wanting to set the variable to pull in based on the .swf file name, like 1.swf, pulls in the var &1 and 2.swf pulls in the var &2, this way I don't have to keep recompiling, I could just copy the movie 24 times and rename the movies accordingly.
View 4 Replies
Jan 25, 2011
I am mostly a front end developer and my code guy at work is not Flash savvy. I have been working with Flash for years, but my coding is limited. Wondering if you might have a tutorial on the following, or some knowledge:
Need to play an FLV video or swf that has que points that grab someone's name from a database and puts that in a dynamic text field and at the end of video sends out a code back that tells the server that the video has been complete. My code guy knows PHP MySQL and Javascript if that will help.
View 1 Replies
Sep 15, 2009
I know how to create a scrolling pane that pulls in text. I test my methods by creating a text box with text, the convert to movie and make sure the Export to Actionscript is check and then on the Scrollingpane just make sure the target has the correct movie name. If I do this in a blank document everything works but in my Flash project it does not pull the text from the text box and I have no idea why. Has anyone experience this before. I just cannot find out why it works in a blank document and not in my flash project. I tried attaching my flash document but it does not fit.
View 1 Replies
Sep 11, 2009
I'm trying to pull an URL from a txt file, but apparently the URL itself contains several "&" signs which are used to separate variables, so now when I click on the link I'll only get the first segment of the link. Is there a way to go around it?
View 1 Replies
Apr 11, 2007
I am using the tutorial on: [URL] and I am wondering if it is possible to put a dynamic text box on that page, and when you initally load the page, it will give the hex value, and when you rollover the "new color" that dynamic text box will change real time.
View 1 Replies
Feb 18, 2009
I'm having trouble pulling & updating information based on an XML file.Each node contains a couple text items and a date. When the date arrives and gets to 00:00:00:00, the next XML node should be called.What would be the best way to store each node so that based on a timer reset (or something to that effect), it would pull the next node until that specified date and then pull the next set of info until the end of the nodes?
View 2 Replies
Apr 29, 2010
Here's my problem. I currently have a Flash banner on my website that displays artwork I have made. However, it currently just shows jpegs that are embedded into the Flash file. Is there a way that I can set up a directory in my domain and just have the flash file pull these external images, at random to display? Also, it should be noted that it shouldn't pull the same image twice. That would look silly I would make the files all the correct resolution and size, so resizing is not an issue. I know you can do this sort of thing with javascript, but I want more control and a more stylish appearance.
View 1 Replies
Apr 12, 2007
I made web banners with the intent that the shell being the initial swf, could pull an external swf file from a remote site. View here: [URL]. The main .swf file has to be under 30k, which it is. now the other .swf files load when you rollover the buttons. this method fulfills the 30k requirement on the advertisers side - also allows the creative to have higher res images/swf files hosted on our site/side. In testing it locally, it all works great. But when I moved the .swf file to [URL] to test it - the files hang up when you mouse over the buttons - is there a chance you could check out my source? Here: [URL]. I checked out the security settings.
security.allowDomain,
not sure if I'm using it correctly?
View 13 Replies
Oct 25, 2011
I'm pulling in an xml/rss feed into a Flash ad. I wont post all the code. I'll just post an example bit where the problem is. What I was hoping to do is once I have my feed pulled in from the source I need to force the text I'm pulling in to be in all caps. So if I wasn't importing the xml from a feed I would use something like this I think:ActionScript Code:<span typographicCase='uppercase'>the</span>Can someone show me how I can do this with my feed? Which would be to force capitalization on any text being pulled into my text field.ActionScript Code:textBox1_txt.text = rover_feature.items.item.title[0];
View 3 Replies
Dec 2, 2010
Created an mp3 player that works fine, but i need the track name, artist name, track timer, to be shown aswell?and i dont have a clue how do go about doing this.
View 2 Replies
Mar 19, 2010
Got a client that says that Flash ( a panel that is pulling information from a database and simply displaying it in text field.) is not working in IE7. I told them that this is impossible as Flash is completely crossbrowser compatible. Am I missing something?? Is it a possibility?
View 2 Replies
Feb 11, 2012
Case1: When a client makes a remoteObject request ie to save some Info... A call is made to Java SAVE_INFO method. If request failed ie came back to FaultHandler ( we save the info in an arrayCollection).Later we call SAVE_INFO again for each item in arrayCollection ie( if arrayCollection has 10 items.. We call 10 times the same method.. I know that's kind of stupid but we have no control over java to write a overloading method). Some times we see there are multiple records of same info in DB. I am not sure if this happens when looping over arraycollection and making calls or during normal one time call. We could not find a pattern to reproduce. Java LOG level is at Error level in production. can't set to INFO in production to monitor all calls. We dont know if this multiple times saved record is, the one in arrayCollection or normal one.
Flex3 RemoteObject --> WAS 6.1 , lCDS 3.0, Java1.5 --> Webservice -- > Java (hibernate) --> Oracle 10gCase2: When application is left open and user leaves for the day and submits info the following morning, we see duplicate records in DB of that info.(No arrayCollection here. Simple straight one call)Flex3 RemoteObject --> OC4J Blazeds Java1.5 (JDBC) --> Oracle 10g.Recently one of our Testers testing case 2 application found this pattern and I am starting to think that may be in the case 1 also.. users might be leaving for lunch/break and resubmitted the arrayCollection after coming back. During lunch java might have killed the sessions for the client and after resubmitting 10 at same time.
View 1 Replies
Jul 17, 2009
I wanted to add a second news box under the first one and have it pull the first two news items in the xml file and have it displayed on the movie. Currently it is putting the first news item in both news boxes.ction script so that the second box is actually the second "<news> tag". From the tutorial I removed the <info> <author> and <comment> tags.
View 0 Replies
Dec 29, 2010
When I open a text document containing 1 string of a Base64 Encoded Image, it works fine:
ActionScript Code:
import flash.display.Loader;
import flash.utils.ByteArray;
[code]...
The image displays and that's great, but I need to display multiple images; therefore, I used the standard format: var1=value1&var2=value2&... (In reality, the values are the huge base64 strings.) Then I just needed to add "my_loader.dataFormat = URLLoaderDataFormat.VARIABLES;" since the format of my source changed. The thing that bugs me is that I'm tracing the imgB64Str after I set it and it traces fine (just like the other version).
ActionScript Code:
import flash.display.Loader;
import flash.utils.ByteArray;
[code]...
It runs with no errors, but the image no longer displays.
View 9 Replies
Mar 8, 2011
Writing a couple of vars to a txt file is relatively easy.I store them as .sql (sort of) layout, so that i can import them into mysql later.But obvious this is not necessary..
The thing i am struggling is how do i read these vars back into flash[code]...
View 1 Replies
Jun 24, 2010
I have some scrolling content (info). I've also made my own scroll bar.I want the scrollBar dragger to be positioned in relation to the info._y as the user scrolls info.I have created two vars: one that worsk out where info._y is as a percentage and the other that works out where the scroll._y dragger should be as a percentage...
Actionscript Code:
var scrollBarPercent = Math.round(scrollBar.dragger._y / [code]........
also onMouseWheel working too.I need a small bit of code that takes the % of info._y and moves the scrollBar dragger to the same % but in relation to the Stage.height...so if projectGalleryPercent = 50%, make dragger._y 50% of Stage.height using scrollBarPercent.
View 1 Replies
Aug 25, 2010
I've been trying to work on a web portal for updating a website I am creating. I originally duplicated a write-to-.txt php script and duplicated it for each of my pages, but for some reason it isn't working out very well as I assume they are fighting with each other. I am looking into creating what I assume is called an array, so that I can store 5 separate data pieces in one text file but I can't seem to find a tutorial that is close to this. the closest I can find is a guestbook tutorial but it is very out of date. I would like to be able to store multi-line text (so that paragraphs and breaks are preserved) from 5 different input boxes and then retrieve that data upon loading of the input boxes and in a different page which would be the actual content of the website.
View 2 Replies
Feb 11, 2012
I would like to see a line of a text file on the frame that I want (and view it in a dynamic text). This is my text file:
Foo
Candy
Bar
Dog
This is my code in the first frame:
var myTextLoader:URLLoader = new URLLoader();
firstLine.wordWrap=true;
firstLine.autoSize=TextFieldAutoSize.LEFT;
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
[Code] .....
With this I can see "Foo" in the first frame. How could I see "Candy"? a second frame. Is it repeated all this code again? Is there any way to just invoke the Lines array:
Array = e.target.data.split (/ n /)
And obtain the desired Item?
View 1 Replies