ActionScript 2.0 :: [external Variables] Loading Textformats From .txt Files?
Jun 2, 2004
I want to make a small flash animation in which the user can specify what text and what font/color will be used throughout the animation, by typing in the text file.On with the code which is of interest:
Code:
//Mouse.hide();
since1_txt = "";
since2_txt = "";
thename = "";
[code]...
Of course, the movie clips contain this text and all works fine if I specify it this way.So I have this in my "actions" layer on the first frame and apart from the fact that it works if I specify the formatting within the actions, it's all good. But now comes the fact that I want to specify my textformat options within the text (.txt) file. So I'd specify two color sets (in RGB hexa sets, 0xFF0000 for example), the font (in this case, tahoma) and the three sizes, and have them assigned to myTextFormat's dynamically through loading, using, for example,
Code:
myTextFormat = new TextFormat();
myTextFormat.align = left;
myTextFormat.color = theColor1;
[code]...
Which doesn't work because i can't seem to get the myTextFormat.font = Tahoma; to work if i use myTextFormat.font = theFont; because it is, perhaps, searching for a font called "theFont" instead of taking the reference to the variable within the text file.
View 6 Replies
Similar Posts:
Jun 2, 2004
I have just recently joined and am enjoying the multiple forum q&a's and the tutorials around here. I want to make a small flash animation in which the user can specify what text and what font/color will be used throughout the animation, by typing in the text file.On with the code which is of interest:
Code:
//Mouse.hide();
since1_txt = "";
[code].....
View 6 Replies
Feb 23, 2011
I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:
[Code]....
View 1 Replies
Apr 14, 2011
I am loading an external child swf file into a MovieClip container in my main swf.I have a button in my child swf that when clicked, needs to be able to access a movieclip or variable that is in my main parent swf. How would I do this??
View 1 Replies
Apr 24, 2010
Lets say I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any limitation or setting preventing external swfs loading other content?
View 2 Replies
Dec 1, 2010
I am trying to display in 'Reciever.swf' the value a shared object updated in 'TextSO.swf'. The following is my code for the Reciever
Reciever.as-----------------
package {
import flash.events.SyncEvent; import flash.events.NetStatusEvent; import flash.events.MouseEvent; import flash.net.SharedObject; import
[Code]....
I am getting an error that says that 'text_so' is an undefined property and that I can't access it. Yes, I have not declared 'text_so' in 'Reciever.as'. However it is the shared object instance from the 'Text_SO.as' file. How do I reference it from the 'Reciever.as' so that I won't get this error anymore?
View 1 Replies
Dec 1, 2010
I am trying to display in 'Reciever.swf' the value a shared object updated in 'TextSO.swf' . The following is my code for the Reciever[code].,...
I am getting an error that says that 'text_so' is an undefined property and that I can't access it. Yes, I have not declared 'text_so' in 'Reciever.as'. However it is the shared object instance from the 'Text_SO.as' file. How do I reference it from the 'Reciever.as' so that I won't get this error anymore?
View 4 Replies
Jul 13, 2010
How can use stage variables and function from external loaded swf files.& Can Possible without using parent.parent fromat, can possible root.format if possible how .
View 1 Replies
Jul 13, 2010
How can use stage variables and function from external loaded swf files.& Can Possible without using parent.parent fromat, can possible root.format
View 1 Replies
Apr 24, 2010
I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any security limitation or setting preventing external swfs loading other content?
View 3 Replies
Aug 12, 2009
When loading an external SWF file, can you actually use some of the variables from the loaded SWF file in the parent SWF file?
View 1 Replies
Jan 26, 2004
I had a question about loading external variables. Is it possible to load external variables from a different server other than the one that the flash site is hosted on?And if so, what would that command look like?For instance, if you load a variable from the site's own server it might look like this;loadText.load("TEXT1.txt");Would loading it from a different server look something like this;
View 1 Replies
Mar 2, 2004
WHy o why in the world doesnt this work? I've done this quite a few times at home on my PC, but now I'm on-site with a client who has nothing but Macs. "Sure, no problem" I told my AD, "I can do that...".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){
[code].....
View 10 Replies
Aug 25, 2009
[URL] how can i enable the swf files to run randomly basis without click of button
View 2 Replies
Jan 20, 2010
I'm working on a simple example of loading external swf files with some ActionScript.I've placed an instance of List Component and gave it an instance name of loadList. Using Component Inspector, I assigned data for 4 external files as below:
Next, I've added a UILoader component (instance name - loadWindow). The code that is supposed to load the content into UILoader is this:
loadList.addEventListener(Event.CHANGE, selectItem);function selectItem[code]..........
View 4 Replies
Jan 21, 2011
I'm having trouble importing an external .swf into my .fla. file. The only AS that is working gor me is-
loadMovie("panoSceneNoMarkers.swf", _root);
However, once the swf shows, it replaces the background interface. I assume I have to add a _level into the code but how?
View 8 Replies
Jan 21, 2011
I'm having trouble importing an external .swf into my .fla. file. The only AS that is working gor me is-
loadMovie("panoSceneNoMarkers.swf", _root);
However, once the swf shows, it replaces the background interface. I assume I have to add a _level into the code but how?
View 1 Replies
Jul 3, 2009
I've been making a game using Adobe Flash CS3 and actionscript 2.0 on my desktop and it was working fine. I tried to transfer the folder containing the flash file and all of the .as files to my laptop via a jump drive and now, when I run the the swf, it doesn't appear to be loading any of my .as files. All of the files are still located in the same folder as my flash files and it still compiles and runs fine on my desktop.
View 1 Replies
Aug 12, 2009
When you load an SWF file, is there any way to pass data to and from the SWF file?
View 1 Replies
Sep 5, 2011
i need to load an external swf which is in as3...and need it to be played in my as2 swf layout. with a time slider ,play, pause ,next, previous for that swf movie clip. give ur mail id i can sent my original files. give ur mail id i can sent my original files. [URL]
View 8 Replies
Nov 3, 2011
It's been a while since I've posted here so I apologies if it's in the wrong place.
My ProblemI have a large (30mb) swf file created in InDesign. It's an interactive PDF. Now rather then allowing people to view it straight away and having to wait elements to load we'd like to pre-load it somehow.
I was wondering how I might go about building a preloader for this SWF file. I have limited knowledge of action script, and most of that was as2 rather then 3.
View 3 Replies
Dec 31, 2002
When I click on a button eg news, I use the loadmovie function to load news.swf. In news.swf, I have the following command (from Kirupa scrolling dynamically loaded text tut) to load a text file in:
stop();
loadText = new loadVars();
loadText.load("news.txt");
[code].....
View 14 Replies
Oct 10, 2003
I can't seem to figure out how to load an external .txt file into my movie. I can get it to work onPress, but not for a frame script. got a quick script to display an external .txt in a dynamic text box in flash?
View 1 Replies
Dec 16, 2003
i know how to load in external .as files so I can update easily. but why do you still have to re-publish the swf in order for the new .as file 2 take effect.is there any way that you can make a .as file be read in & so that it updates the .swf file, much like the way loading an xml or .txt file does?
View 6 Replies
Feb 12, 2006
I'm making an image catalogue for a client, and for reasons unknown to me my client insisted that the images be stored as binary data in a database. ( i know, i know....but they wouldnt' listen) Anywho, the format of these images is windows bitmap (.BMP). I've just found out that they want to be able to manipulate these images in flash. So i need to have actionscrip open these images.Since the images are stored in the db they have to be accessed via a php file like this: get_image.php?id=imageid.
This works fine for displaying the images in a browser as i just put the string inside an img tag so: <img src="get_image.php?id=someid"/>The thing is, I can't seem to get flash 8 to load these images via loadmovie. I've been able to load jpeg and gif files no problem, but can't seem to get these bmps to work. Adding to misery is that because there are going to be in the neighbourhood of 40,000 images, i dont' want to actually have the images saved locally.this is what i have, it works fine for jpegs and gifs:this.createEmptyMovieClip("pic", 1);pic.loadMovie("image1.gif");
View 3 Replies
Oct 13, 2009
I'm trying to import some external files to my main flash file with buttons. I click button 1 and content 1 is loaded, click button 2 and content 2 is loaded, and so on. So, I got two ways for doing it:[code]The problem with this first option is that the content to the box is not renew with each click but it stacks one over each other, so I can't use it =/
View 3 Replies
Dec 16, 2008
I made a flash movie with 4 buttons that I need to each load swf files into the original. I have 4 selections that each need to load a different slideshow. The second part of my problem is telling the loaded swf where its target area is to be displayed in.
View 1 Replies
Apr 15, 2010
I am trying to load an external SWF into my project, I am pretty sure that my code is fine but when I try to display the SWF all I get is an instance of my StartPage movie clip. The code for the loader does not mention or even any relation to this movieclip! I have the loader in a class file for a separate movieclip, but no matter where I put the code I get the same result. I cannot understand why this is happening!I tried loading the same external SWF into a different project, and it worked fine.Is this a common problem? I haven't managed to find anyone online with the same problem.
View 1 Replies
Nov 1, 2004
I am relatively new to actionscript and was wondering how i could resize a movie with an easing motion? Is this possible? I would like to load multiple external swf files into one "main" movie with this effect.
View 4 Replies
May 2, 2005
on Flash MX 2004 having problems with loading external jpegs and stuff. I got a tutorial from here and loading from a web address on it is okay, but I can't get my one to load from my hard drive because there is always an error with the path. Each of my buttons has this assigned
button6.onPress = function() {
my_mc.loadClip("file:///c:/flash pictures/picture6.jpg", "container");
};
and results in this error
Error opening URL "file:///c:/flash pictures/picture6.jpg"
What's the correct format for putting in a file path? This may be an immensely stupid question, but I'm new to this and totally confounded.
View 3 Replies