ActionScript 2.0 :: Pulling Swf File Name Into Variable?
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
Similar Posts:
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
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
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
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
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
Mar 5, 2010
I am trying to do is declare a variable in PHP and pass that variable to my flash file. Right now i am simply trying to do 1 easy variable, more will happen in the future but i need to figure this out first.I have used other forums and they say try this and that, but nothing i do seems to work. here is my code.
PHP Code:[code].....
View 8 Replies
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
Jul 22, 2011
I have a problem with SharedObject. I created SharedObject using AS2.0 it's working fine.... my question is can it possible to store the variable values in an .txt file where the flash file is saved... basically the SharedObject will store the vallues in localdrive with file extention. not only using SharedObject if any other way to store the vaules in .txt file will be helpfull for me... my requirement is to store the the position of the swf file and when the time it reopen, it should start from previous position.
View 2 Replies
Jan 14, 2004
i want to load variable from text file to my main movie (swf file).what should i put in the second parameter of the function loadVariables ("target" parameter) - should i insert _this? _parent? _global? (nothing works.
View 3 Replies
Sep 19, 2010
I have trouble passing a variable from HTML to Flash.I use swf-object2.2.how to code the variable in the html-file and how to receive it in the as-file?Its a simple shopId = 110
View 3 Replies
Aug 9, 2011
I have a task to upgrade a web site. I have a map of ND with some cities on it. I needed to add a new city to the SWF which did not seem to be hard (asuming I did it correct). The action on all the buttons for each city look like this except the name after the # is the city selected.
on (release){ getURL("locations_info.html#minot", "location_content");}
In HTML code snip that controls this looked like this :
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
[Code]....
View 1 Replies
Aug 17, 2009
I have a list of items in a database as well as images in a directory folder. I am looking for a flash app that can pull from the database to display the info and also the images and scroll this info vertically with associated links. I need to change this for each client by adding their unique "ID" in the code so their information pulls in correctly.
View 1 Replies
Feb 9, 2009
I have an HTML page called "mypage.html" with a form on it. The form contains a text field called "FName" and when submitted, it loads "mypage2.html" with a Flash file embedded within it.Using actionscript is it possible to pull the passed value "FName" to an actionscript variable. Previous threads mentioned the GetURL parameter but CS4 kicks it back saying it is no longer supported.I'm also a bit confused on whether actionscript can pull variables directly from the browser URL. I found a reference to the variables being placed in the HTML code that embeds the SWF file:<param name="movie" value="mySWFmovie.swf?myvar=heyyou" />'Why would this be the location to configure the passed parameters and not directly from the browser URL?
View 0 Replies
May 25, 2010
Is it possible to pull FLV's from a playlist in youtube?, and play them in custom build FLV player (not in youtubes api)?
View 0 Replies
Aug 12, 2009
Having real problems accessing data when I test my swf's online, i'm accessing data from the a bbc weather xml file online that's usually used for RSS feeds, on my computer flash can access the nodes and returns the data the way I want when I publish the files on my web server NaN or undefined appear in my text fields. Is there any security codes etc... I need to perform
[Code]....
View 1 Replies
Sep 21, 2006
I created a file that pulls data from the worldofwarcraft.com serverstatus xml page.The data populates a dropdown list and you can choose the server and it tells you if its up or down. The mini app works great on my desktop, when I upload it to my server it no longer retrieves the data.
Is Bliz blocking my server address from recieving the data? Anyone know how to navigate around this. [URL]..If you want to test it grab the swf out of your cache and load it from your desktop, it will work.
View 6 Replies
Jan 29, 2010
I want to build a sort of pulled down projection screen thing using ActionScript.Basically the MC will come down with a picture on it.I have this starting code which doesn't work terribly well because it just moves the screen from top to bottom instantly.
Code:
on (release) {
do {_root.mcScreen._y+=1;
} while (_root.mcScreen._y<200);
}
Essentially I want the screen to smoothly scroll down into place over about half a second.
View 6 Replies
Nov 19, 2008
I would like to have a screen with multiple buttons and when the button is clicked different MC's will be imprted into the .fla file. For instance button 1 will import 1_MC, button 2, 2_MC, button 3, 3_MC etc. point me to a tutorial or give me a down and dirty example using AS3?
View 11 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
Aug 28, 2010
I have been failing to do a thing with Flash actionscript2.0; Here is the problem-
My xml file name is: sea.xml On my fla file, there is a button named: do; and a movieClip named: loader;
What I am trying to do is- load xml only when the button is pressed. So I tried this-
myXML:XML = new XML;
do.onRelease = function(){
myXML.load("sea.xml");
}
[Code].....
View 1 Replies
Sep 10, 2009
I was running a test today and couldn't get flash to properly load data from php.Here's my textInput.php file:
Code:
<?php
$testVar = 'This is a sentence.';[code]....
why it's grabbing the entire php code, rather than just the echo?
View 3 Replies
Sep 8, 2010
I am trying to pull a text from within xml tags and place them in a text box when certain mc's are clicked. I am using the e.target to find the name of the mc clicked and grab info from tags with the same name as the target mc. The XML link is good as i can get data when doing tests with out using mentioned technique.
ActionScript Code:
package {
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
[Code] .....
And the xml file
Code:
<statsIcons>
<pollutionIcon_mc> some text </pollutionIcon_mc>
</statsIcons>
View 1 Replies
Sep 10, 2011
asically I have a Player class with methods (i.e. Moving the player) that I want to listen for and implement in the main class. To put it simply, I'm creating the player methods in the player class and then calling them in the Main class. But for some reason I'm having some trouble, I'm still trying to get used to all this OOP design.Here is the (Main) code, it's not alot:
ActionScript Code:
package
{
[code].....
View 9 Replies
Feb 23, 2010
I am building a userinterface for some industrial instruments which output some data to a XML spreadsheet. This is the only way I can retreave these data's from the instruments.
Now, I need to make a flash that can pull out these data's from ex. "A1" and "A2" in this spreadsheet...
Here's a screenshot of the XML as it appears in EXCEL:
...and the XML as it appear if opened in Dreamweaver:
Code: Select all<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
[Code].....
View 8 Replies
May 25, 2005
pulling specific data from XML? This is what I mean...Supposed I have an XML file like this:
HTML Code:
<data>
<article>
<ID>1a</ID>
<related items>
[code]....
Now, in Flash I want to load all items that have "5f" listed as one of their related item. So only display articles where item = 5f
View 7 Replies
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
Apr 30, 2007
Basically, I am having trouble pulling in more than one line of XML data. Here is the line of code I am trying to manipulate to give me more than one line. I have tried duplicating it and changing the values... but it just updates which line it is displaying instead of the first and second one...
_root.setlist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
Inside of my XML document it is layed out like this....
<shows>
<show>
<setlist>
<song>Song 1</song>
</song>Song 2</song>
[Code]...
View 12 Replies