ActionScript 2.0 :: Load A Series Of Variables Into A Menu?
Jan 4, 2007
i need to load a series of variables into a menu. seems easy, i've done many times. the thing is, i have to get them from an asp who asks for a parameter.So i tried this:
I'm basically trying to extract a series of variables that are passed in URL from another flash movie. I have researched flash vars and the like and didnt really get far.[code]I was able to get the URL into Flash!So flash now has a variable called "section" that holds a string like this.url...My question is; how do i get the values held in each of these days, weeks, years, etc into a format that can be used with in the flash movie. Ideally into seperate variables where the values can be returned in a textbox.
I am trying to load a sereies of pictures moving accross the top from right to left.How do I load all of these photos in such a way that they seem to be stitched together like a piece of film strip at certain rate going accross?
I have a series of JPEG's labeled frame1.jpeg, frame2.jpeg, and so on... I want to play them sequentially as a movie. Earlier, I had success loading a single frame, but now I have trouble loading all the frames one by one.[code]...
I have 9 movie clips which I want to load in random order, so that viewers who come to the webpage don't always see the same thing. I have them set up as 9 frames within another mc. I need EXCEPT it always displays the first one first, and then the rest in random order. I tried making the first frame empty, but then there was a big lag before it showed anything, because of the timer. Here's the script I used:
myMc.stop(); time = getTimer(); wait = 500;//1000ms = 1 second _root.onEnterFrame = function(){
I'm importing a series of images from an xml file, but for some reason they all get overriden by the last one. Here's a bare bones version of the code. I've been staring at this for a few hours now, hope you can make sense of it.
I have 3 flash movies: a.swf, b.swf and c.swf. And I create a main.swf to load those 3 movies orderly (from a to c).In the main.swf:- At frame 1, I put the script: loadMovie("a.swf","_root")- At frame 2, I did the similar job as with frame 1 with b.swf.Now the Flash Player only load the b.swf movie. There is no sign of a.swf to be loaded. Tho' I did unloadMovie a.swf before load this new one.
i created an application and it has a menu bar at the top of the stage it also has a loader component below it. i need the loader to load an swf when an item is selected from the menu. Does anybody know how to code this. I am using the following code:
I have an empty SWF that's sole purpose is to call loadMovieNum and start the project. Each loaded movie has a few variables defined within them - unique to those loaded SWFs. Instead of declaring all the variables in each SWF can I declare all of them in one place, in the first frame of the empty loader it all starts from? I'm thinking I can then declare a variable which each loaded movie can increment as needed for me.
I'm writing code that takes data from mysql that's processed by a PHP script. It's actually a bit bizarre, at least to me. Anyway, here's some basic AS3 code that's moving toward what I want to do:
var loader:URLLoader = new URLLoader(); var urlRequest:URLRequest=new URLRequest("receive.php"); urlRequest.method=URLRequestMethod.GET;[code]....
For some reason, the statement "trace(evt.target.data);" produces a whole pile of garbled text before the actual stuff that it's supposed to show Because of problem #1, I've had to include a throwaway variable at the beginning, otherwise the first variable I try to pass into AS3 comes back as undefined. This causes errors when I run my flash movie in the IDE, but when I run it from the browser it doesn't seem to have any effect.But this is the strangest thing of all whenever I make any changes to the database (and subsequently try to load data from different variables), the new variables come back as undefined. For example, let's say that I add another entry to the database, and decide to load students 2, 3, and 4 instead of 1, 2, and 3. When I do that, any new data I've added comes back as undefined, even though when I view the PHP output in my browser, it looks just fine.
And now for the REALLY bizarre part: I'll copy that output, paste it into my PHP script as an echo statement, comment everything else out, and my flash movie runs fine. Even though the output from the PHP script is exactly the same, it gives me errors.
I am trying to load variables from a text file, and have them available from then onwards in the movie, globally so to speak.
While I can read the variable values in a loader function which executes when the text file is loaded, I don't seem to be able to keep those variables available afterwards.
I found what I am looking for when I list all variables. I want to cut out the rest of the menus that create a fan of pages.I removed the SWF's from showing up. But I am still having issues with changing the nMenus = "14" which is the number of menus to show. I want to change the "14" to "9" so there are no spacing in between my 3D Pages.
I have 2 files.. new_men_beta.fla and its class file, (the one below) which is called menu.as. In the new_men_beta.fla, are all of the necessary movieclips. What I am trying to do, load variables from flashvars, and depending on the 'rank' variable, a different menu will load up. for example, admin rank = 30. if the variable 30 is submitted via flashvars, then the menu items would have an extra 2 options, each with their own submenus. the guest rank (0 or unset) has only one menu options (with submenu), and each movie click is exported to flash. So far, the blow code, puts the background for the menu options, info_bk_mc, in the right place, when the cursor is placed over the button. However the removechild statement, after TimerEvent.TIMER_COMPLETE has come into action fails to work.
So basically, I have a navigation.swf file with a large menu. I've set up a product_viewer.swf so that once a couple variables are defined, the viewer displays the correct images/descriptions.
I want a button in the navigation to set 4 variables and pass them to the loaded product viewer
This is what I THOUGHT would work:
Code: //FROM THE NAVIGATION.SWF on (release) { _global.cat1:String = "hom";
[Code]....
So.. I was thinking I could set up each button so that they set these 4 global variables. If the variables are global, then shouldn't the product_viewer.swf read them? Do I need to add in any special code to the first frame of product_viewer?
I had a flash template with nav button menu and sub button menu, in flash player the menu and sub menu works for different pages, but sub menu do not work in web page, whatever page goes, it always load sub menu for home.
I am trying to make a menu that loads external swf's into my current movie. Here is the code that I have, which does what I want, except the buttons only work in order... you can't click the last one first, for example... They only work in the order in which the button variables are scripted...
import fl.controls.Button; var my_loader:Loader = new Loader();addChild(my_loader); var about_btn:Button = new Button();about_btn.label="ABOUT";about_btn.x=50;
[Code]....
I have been looking at so many snipets and such.. and whats with all the brackets at the end... I kept adding them until it wasn't expecting right bracket at end of program anymore. Like I said, it works but you have to click "about" first and so on down the list, once through, then what ever order after you have loaded them all once.
i'm using hga77's xml menu you can view here.ok, so i'm trying to load swfs from the menu, what i've got so far is:
Code: function executeAction() { loadMovie("NEWS.swf", _root.content); trace(NEWS.swf);
[code]....
but the menu stops working. is there anything i can stick in this bit "function executeAction()" that will make the loadmovie load a different swf each time, rather than creating loads of loadmovie functions.
I have a menu that is populated by XML, I'd like to know how I can clear that menu to load another one in it's place.
I can get the other menu to load but it's adding itself to the previously generated menu:
so let's say I have an XML document that has <menuItem> nodes that have nodes within them named [this is the default menu][code]...
how can i clear the XML or for loop that created the buttons so that the newly loaded menu from the newly loaded xml is the only menu that is displayed and not tacked on to the existing menu?
For some reason the menu doesn't load to the URL that I specify in my xml file. When I click on it, it showed up as text underneath the menu itself as Link clicked How can I make it so that the link will actually go to URL that I specify in my xml file?[code]
However after loading this into another movie it wouldn't move, I made some changes and now it scrolls only to the left. Can someone please tell me what I have over looked ?????
I am loading variables from a txt file. After loading in Flash, the format of the variables is weird.
My text file looks something like this:
var1=15&var2=10&var3=this is a test&var4=etc
It has been created in notepad.
When I load the variables with the command loadVariablesNum("variables.txt",0); there is a problem with var1 and var2. These are not considered as integers but as text and have the values "15" instead of 15 and "10" instead of 10.
i added a text field and change it property to dynamic and set variable as "x".and then a added a new text filed and change it's property as input text and set variable as "x".and i need to print this "i love you + variable (x) + i miss you" ?
I followed the PHP MYSQL Flash Tutorial and I got it to work with ASP, I wanted to know is there a way in Flash to loadVariables for the entire movie.Example: Instead of this On Every Movie Clip:
I'm trying to load in a variable value from an xml file.
i want to turn the visibility of a button clip on or off from within my loaded XML code. i know that my xml is loading and working correctly. in my XML file, i have visible="true" set up as an attribute to one of my nodes. what do i need to do to get[url]...
I have created this site with a expanding / collapsin menu. When a user selects a menu e.g. "hammers" then the menu is loaded and show the submenues. When the users closes the menu by moving the mouse away from the area the menu collapses. If the user expands the menu again the menu should have remember the last visit menu and show the menu.