ActionScript 2.0 :: Button To Put Data Into An External Swf?
Aug 31, 2009
How can I set up a button, when clicked puts a string into a newly created swf file which is then saved.
I actually want to attachMovie's to this newly created swf but thought I would start off simple.
View 0 Replies
Similar Posts:
Jan 10, 2005
I'm loading text from an external file (a notepad). Now all I want is to be able to change the text by loading text from another external file when a certain button is pressed. Basically, I got this as my default text which loads automatically at the start:
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
title.text = this.title;
info.text = this.info;
body.text = this.body;
};
But now I want to load text from a different file (data2.txt) by the press of a button. I also have a transition animation so work with me. It would be...
b3.onRelease = function() {
if (_root.section != "photos.swf") {
//I also got this pic (swf) that changes on the button release//
_root.section = "photos.swf";
_root.transition.gotoAndPlay("closing");
So what exactly do I add to be able to change the text source?
View 1 Replies
Jan 10, 2005
just one last actionscript stub. I'm loading text from an external file (a notepad). Now all I want is to be able to change the text by loading text from another external file when a certain button is pressed. Basically, I got this as my default text which loads automatically at the start:
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
[code].....
View 1 Replies
Mar 14, 2011
I'm trying to read some data in from a sql source, some of which contains double quotes embedded in the text. I know I can strip the doublequotes, but don't want to go that route if I can avoid it. I've tried replacing to double quotes with hex codes before passing the text via parameter to my flash file, but the text string always cuts off at the hex code, the same as if the double quote were present in the string. For example:This is a "text" stringreplace double quotes with hex: This is a x22textx22 stringesults when read into flash: This is a <remainder is dropped>Yet if I type the same text string in a variable in flash, the string displays the double quotes properly:
View 1 Replies
Apr 9, 2007
I will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file. I understand I need some sort of script to do that, but is this something I can run just on my machine? (I'll probably make the data into xml format).
View 1 Replies
Nov 9, 2006
I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?
In my nav fla (what i want to load from XML):
Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];
// SUB MENU ARRAY
[Code]...
View 9 Replies
Dec 11, 2006
im trying to read data from a text file here [URL]what i cant figure out is how to call each value to its own dynamic text field.
YYYY MM DD hh mm H0 SwH SwP WWH WWP SwD WWD STEEPNESS AVP MWD
2006 12 10 00 00 0.3 0.3 6.2 0.1 3.2 ESE SE N/A 6.1 110
2006 12 09 23 00 0.3 0.3 9.1 0.1 3.6 SE SE N/A 6.2 134
2006 12 09 22 00 0.3 0.3 9.1 0.1 3.6 SE ESE N/A 6.2 125
2006 12 09 21 00 0.3 0.3 7.1 0.1 3.4 ESE ESE N/A 5.9 119
View 3 Replies
Aug 7, 2011
Is there a solution to export the swf that contains external data (images and xml data) to new swf that would have that data embedded?
View 9 Replies
Aug 15, 2011
[URL]I have: main.swf (a menu) and I have module.swf (content)If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent. So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.below is the code I used to load the file but I cant, for the life of me, find a way to unload it.
var bigboreLoader:Loader = new Loader();btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf"); bigboreLoader.load(bigboreRequest); stage.addChild(bigboreLoader);
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
Main FLA:
function removeF() {
removeChild(bigboreLoader);
}
[code]....
View 10 Replies
Nov 2, 2010
I used to do this fine with AS2 and now i'm struggling to get it to work in AS3.my code is as follows:
PW1.addEventListener( MouseEvent.CLICK,loader1 );
//==================== PS function =============================================
var ldr:Loader = new Loader();
[code].....
View 3 Replies
Apr 22, 2007
I am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:
metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
[code].....
View 2 Replies
Jan 13, 2009
Basically I have a swf portfolio site. I have to load anexternal swf that's the same size as the main swf site, which meansthat the close button (for the external swf) needs to be on theexternal swf. I have the load and unload code on the main swf, butI'm getting a 1120 error - it's not recognizing the instance of theexternal button....and I don't see how it would recognize it,unless there was some other way of linking the filesbtw - I'm fairly new to AS3 & AS2, but they're at leastmore fun than the Pascal & TSR-80 basic I remember fromelementary & middle school...:0)
View 2 Replies
Jul 5, 2010
I have an OOP PHP site structured with a MVC pattern. A page on the site has an embedded SWF that needs to pull information from a database. In the past, I would have just had a procedural php file for the swf to load the data from the database from. However, that method doesn't seem like it would fit with a more objected oriented site.
What would be the "proper" way for the swf to load external data? Should I create a class and a MVC pattern in the normal structure of the site that can pull the data (e.g. mysite.com/flash/data) and just pass this path to the swf as a FlashVar?
View 2 Replies
Feb 18, 2009
I have been pulling my hair out over the past hour into why my code will not work and i really don't see why not but it clearly isn't so i require help on two things:
#1 Flash trace call will not show data i ask for.
My Script
Code:
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
[code]....
#2 How do i add this data (once it works!) to a dynamic text box called tTOTD?
View 10 Replies
May 2, 2010
I have the following XML and I need to extract just two values in the <yweather:condition> tag
code=" "
temp=" "
(current values are code="34", temp="73", shown in bold below):
[code].....
View 1 Replies
Sep 27, 2010
I'm loading an exteranl .swf and passing strings to it from the parent this works fine if I put the code on the timeline but i need to load the .swf and pass strings from a document class but i always get errors about the function not being a function or unable to load display objects....How do I load a swf and pass variables from the document class?
View 1 Replies
Jul 21, 2006
Is there a way to load an XML file if it's on a differen server/domain than the html/swf file? I already set allowScriptAccess="all" but it didn't seem to help.
View 1 Replies
Jul 25, 2006
I'm using flash 8 and im wondering if it is possible to externally load lables into a ceck box from xml.
View 1 Replies
Jul 14, 2009
I wonder which way is the best solution to load an external text file, that contains text with italic/bold/color content (edited by client..)
View 4 Replies
Jan 15, 2009
Having done loads of it in the first few years of this century, I've not done much Flash in the past few years, been focused on PHP/MySQL Development. Anyway, I now need to use the data from a MySQL database offline in a Flash executable so I'm jumping back in with AS3. There are several tables involved and I can write a script to export the data to whatever format is best.
XML or CSV? Should I get it all into one file with all the data or is it possible to do the quivalent of joined queries once the data is in Flash? I don't need a full explanation at this stage,
View 8 Replies
Sep 10, 2009
if I'm loading external data I'd just use an XML file and load it once. In this situation, the external data will be updated very periodically, and I'd like for the Flash app to grab the most recent data either on the update of the external data, or if that's not possible, every second or so.
View 4 Replies
Feb 4, 2010
I want to create an array and fill it with a bunch of stuff, but its getting too crowded in my document class..can I just create a class of 'data', ie variable declarations and arrays, and then reference that from the document class?
View 4 Replies
Jul 20, 2010
how to embed a value into a dynamically created MovieClip within an external file (.as) that I can access in my .fla file when the MovieClip is clicked.
I have created an external file (.as) that draws a series of adjacent boxes with a number in sequence on top of them. That much works OK, but I want to load it into a Flash file that will do math calculations based on the number of the box.
Here's my .as file.
Code:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.text.TextField;
[Code]....
How, for example, can I get the "slide_number.text" box to say something like "The square of this number is ..." and the square of the figure?
View 1 Replies
Mar 19, 2011
what would be the best way to do the following :
Allow me to briefly sketch the situation i'm in; On my stage i've got a collection of movieclips, each has an unique name. These MC's represent regions of a country on a map.
The most basic task i'd like to achieve is when the user mouse-overs one of these regions, it displays some relative info on the region (Name, size, population etc)
I was thinking about storing this info externally from the fla/swf itself. When the swf lauches it would retrieve the corresponding info for each region.
Having this data outside the swf would make editing and upkeeping it more easy.
I'm leaning towards looking into an XML-file to do this ? (SQL sounds neat but i have no expirience with it)
The Swf would be hosted on a site, but i see it evolve as an AIR-app in the future.
View 2 Replies
Jul 16, 2011
I'm messing around with trying to load variables from a text file and it's just not working as I'd expect. First, my text file is formatted like this
[Code]...
For example, if I do something like create a simple Dynamic Text Box on the same frame as the above code, to show the value from _level0.Test.variable1, it displays "undefined" even though the debugger indicates this variable has the value "value1" as I wish it to. (using "trace(_level0.Test.variable1)" yields no better results)
I have attemped using onLoad and onData alongside the above code, and neither one has made the situation better. I have also attempted trying to reference the variable in a few different ways, and it's just returning the same thing every time. When I was experimenting last night, I managed to get the variables to show up properly on a "trace()" but not when referenced by other things in the flash file. Regrettably, I cannot remember how I did this. Either way it didn't quite work still. Do I need to do something else to be able to reference loaded data in my project, or is there some fundamental mistake I am making? I'm usng Flash CS3 Pro, if that makes any difference. Flash Player is up to date, etc.
View 0 Replies
Apr 19, 2010
I built a simple application to load XML data using a external XML file. However, the link I am using will have a different Presentation ID each time a user creates a presentation. So some how the presentation ID needs to be know before I actually load the XML file at least in my mind it does. Is there a way to load the URL dynamically or set my url loader up so it loads whatever ID there is?
[Code]...
View 1 Replies
Jan 13, 2006
I have an external text file that will have two variables and look like this:&months=January,February,...&days=Sunday,Monday,.. .I am using loadVars to load the textfile in. When it is done loading, I want to load each of the of the 2 variables into an array so I have an array for months and array for days
View 7 Replies
Jun 7, 2006
Ok, lets see if i can explain this right. I have been trying to make a movie that loads different information from an external file each day. I name the external files according the the date that i want it to be imported (example: 200667, for today)Ive been able to make the .getYear(), .getMonth(), .getDate() work to make the date in the above formatxmlData.load(" ");<-- now when i write in the url to load the external file is there a way that i can write it so that it will update itself to the correct date so that i dont have to update it manually myself?
View 2 Replies
Mar 16, 2009
I have a pretty CMS that generates an XML and I want to make part of the site loading that data (menu items, thumbs, info, and big pics) is there an way to make all that using for?here is my XML code
Code:
<albums>
<gallery id="1" name="design" path="gallery/1/">
[code]......
View 1 Replies
May 2, 2010
I have the following XML and I need to extract just two values in the <yweather:condition> tag
code=" "
temp=" "
(current values are code="34", temp="73", shown in bold below):
[code].....
View 2 Replies