ActionScript 2.0 :: Loading Movies/variables?
Jul 7, 2002I subscribe for this forum becausethis r the actions i have in my level 1
on (rollOver) {
startDrag (this, false, 250, 270, 750, 520);
Mouse.hide();
[code].....
I subscribe for this forum becausethis r the actions i have in my level 1
on (rollOver) {
startDrag (this, false, 250, 270, 750, 520);
Mouse.hide();
[code].....
I have an intro.swf file that is basically a movie with sound that is exported for actionscript but not exported in the first frame. I just stuck it in a movie on my timeline and it works great and the preloader works because it doesn't load the sound before the preloader. I use :
musicSound = new Sound();
musicSound.attachSound("music");
musicSound.start();
to play the sound in intro.swf.
However, now this intro.swf gets loaded into an index.swf and everything works fine and the sound plays as long as I have the sound included in BOTH the intro.swf and the index.swf and the sound is exported on the first frame in the index.swf. I was hoping I could remove the sound entirely from my index.swf since it already loads into the intro but so far
I want to know how I can pass parameters between 2 swf files..
View 7 RepliesI'm trying to do a demo with a fastforward button and a rewind button that will go to the next scene and previous scene...however, due to the format that my predecessor created used...I'm stuck with alot of scenes. The navbar (ff and rewind buttons) is in a .swf file called main. The actual demo is in demo3.swf. I created a loader scene to redirect to the correct scene (when ff and rewind are hit), how to pass the variables needed from the main movie. What would be the correct syntax or steps?
View 11 RepliesI want to know how I can pass parameters between 2 swf files..
View 7 RepliesI have been receiving great help for the past few days on many different things, and now I have another issue. I am creating a form in an SWF that pops up in a window over my main site. Is there a way to pass the information that the user submits in that form to my main movie? Or will I have to embed the form movie into my main movie? Is there a tutorial dealing with this? Also, since I'm asking, is there a way to save information to a text file using ActionScript or Flash, or whatever? I was thinking the other thing I could do would be to save the information in a text file, then dynamically load it in a text box on the main site.
View 1 RepliesI am loading various movies into a "shell"movie as and when they are needed using loadMovie... However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path...
_root.holder_mc.loadVariablesNum("scorevars.php"," post");
But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact...
Basically I have a button which can be clicked to load an external movie, the external movie loads an ASP script.Dependent upon the button clicked I want to be able to execute different SQL statements.
View 4 RepliesI am loading various movies into a "shell"movie as and when they are needed using loadMovie.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path _root.holder_mc.loadVariablesNum("scorevars.php"," post");My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 RepliesI'm having a bit of a problem with this. I have a class- MiniMap which extends the MovieClip class.This class has a variable which is itself a movieClip, this movieClip is a small window which can be moved around on the map to select which portion of the miniMap will be shown in the bigger map.
How do I refer back a events on the class variables to effect the host class?
[Code]...
I have two movies: m1 and m2. In m1 I set a variable to variable="yes". Now, I want m2 to read the variable and do an action depended on the variable (see the example below).
This is the AS in m1:
on (release) {
docufield = "background.txt";
}
And this is the AS in m2:
this.loadVariables(docufield);
Scenario:I am loading various movies into a "shell"movie as and when they are needed using loadMovie... No problems there.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the completepath..._root.holder_mc.loadVariablesNum("scorevars.php"," post");But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 Repliesis it possible to pass variables between flash movies...
i.e. if you had 2 (or more) seperate flash movies in an HTML page, can you control one with the other?
I want to send variables between flash movies on different machines. How can I go about doing something like this?
View 4 RepliesI have a movie which is made up:
Level0= my interface layout with buttons
Level1= the different sections of the site, are loaded into this level (eg. home.swf, aboutus.swf etc.)
Because each of these sections has both an 'in' and 'out' transition, i want to use variables (on the buttons) to control these external movies that are loaded into the main movie (im even starting to confuse myself
basically in a nutshell... can you use buttons which control a movie ,which has been loaded at another layer, using variables....
Does anyone know of a good way to pass variables between flash movies on different html pages? Should I use a flash cookie? pass the variables in the URL of the html file and then try to get them back out on the next page?
View 3 RepliesI'm new on AS3, I'll try to explain what my project consists: Well, There is a main.fla and It loads external movies triggered by button items. The content animation sequence introduction starts with tweenLite and fills the stage with elements from Library (movieClips, buttons) and some sprites. I've built the intro animation through actionscript. Perhaps I'll need to explain how I did it the TweenLite structure, but the code lines are too long
The transitions / navigation:
Each button before load the external movie has a respective animation that removes the other buttons from the stage. It triggers an "outro" animation and then loads the External Swf.
First:
Each external Swfs contains a removeChild action in a MovieClip that CLOSES and removes the movie.. Like a "pop up" with a close action. After closed It should replay the intro animation and replace the buttons in the stage but it's not happening because I don't know how to communicate between different timelines / external movies.
I have always the argument with my colleagues which authoring strategy to use. I always attached to the idea of authoring several swf files, and have them all loaded to the main swf when needed. And than attach Preloader to each swf that I load.
Others think that it should be only one swf with one preloader. And have all the navigation to use scenes or goto actions.
So the advantage of using my strategy is that users will not wait too long for one movie when its being loaded. And its more convenient to work on several fla with each have its own layers, symbols, etc
I want to create a website having one main stage file(main.fla) with different swfs(movie1.swf, movie2.swf,movie3.swf) for various sections. Am not sure what I am doing wrong here but somehow when I click the button it does not load the respective flash file
View 6 RepliesI am creating a presentation which has a main flash and then 3 sub categories to it. Main.fla is nothing but a container to load the other movies into. I could get the the first movie (movie1.swf) to load onto main.swf by using the foll code:
this.createEmptyMovieClip("empty_mc",1);
empty_mc.loadMovie("movie1.swf");
empty_mc.x=0;
empty_mc.y=0;
Now the problem is in movie1.swf the menu is like on the 3rd level, i.e. main stage>menu_mc>menu (where the buttons are).
How can I add a code on level "menu" so that when I click button2 or button3 it loads movie2.swf and movie3.swf respectivley onto the main stage. Makes sense or am making it too confusing..
I want to try this breaking a big movie into smaller parts functionality so that I can understand flash more.
i have a photography website, the main 'index.swf' file has two scenes, one for the loader and one with the content.i have a navigation menu:item 1, item 2, item 3, and so on. i have 10 layers, my nav menu is on layer 10, at the very top.i also have a a layer for each one of my navigation menu content. Now i click on item 2, and i load a external movie clip called "fotos_mc" on to the stage and inside this movie clipe i load pic1.swf using: loadMovie ("pic1. swf", 1);it loads fine, except that it loads on top of my navigation menu, logo and so on, even it's on a layer that's under the layer where i have placed my menu and logo. is there a way that i have load my movie so that it displays behind my menue?
View 3 Repliesi am trying to create a swf file that contains 3 movie clips inside of it. i want the swf file to randomly choose one of those movies and play it.
i am on a mac with flash cs4.
is it possible to keep the loaded movies and then attach them to a mc ?The thing is that I have several external resources to load and I wish to attach them pour MCs along the execution of the movie.
View 2 Replieson one of the tutorials to load a movie it teaches you how to load with a button...
but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", "container");
[code]....
i want to load an external swf movie into the main swf movie. now ive been using the loadmovie script and it works fine but the loaded movie comes up in the top left of my site so my ? is, how can i specify the location of where my loaded movie ends up
View 3 RepliesI got some movies loading in a container, but the movies stay open, I want to be able to "close" the container, or hide it when I click on other navigation buttons that are included in my main timeline.
View 3 RepliesBasically I have a primary navigation and secondary or nested menu on one menu item. The following load movie script works fine on the primary menu on the root:
about_mc.onRelease = function() {
createEmptyMovieClip("container2", 1);
loadMovie("about2.swf", "container2");
[code]....
how can i load 2 .swf movies simultaneously through one load movie action button ?
View 7 RepliesI read the tuts on dynamic loading etc (the one about external stuff like mp3s, jpgs, swfs; and the one with the transitions). I'm messing around with it in MX and all works fine, except the problem I have is I cant check it locally! the bandwidth simulator and profiler doesnt seem to work with loading external content, the movie appears immediately.
So I tried loading the swf from the web (i.e. URL = file://[URL]) that gave errors "opening file" (the movie is there though). my only solution so far is to keep uploading my movie everytime I wanna check it!!! which is CRAP! I dont have a network at home, so cant really use those bandwidth simulators I saw on the sticky. basically I juz wanna load an external movie, and see how the parent movie handles it (i.e. progress is kept track of correctly, loaded notifications work etc.) how can I check all this locally?
I got this tutorial about external movie loading. It works but it seems that their is a little problem with it. How do you keep the button from loading an external movie once it's loaded already?
[URL]
Let's BUTTON-1 loaded MOVIE-1, now when you click on BUTTON-1 again it will load the movie even if it's loaded. How do you do it like only when another button is clicked will it load the movie for that button.