ActionScript 2.0 :: How To Communicate With Loaded Movies
Aug 3, 2006
I have a site I am building in AS3. I have a main SWF, site.swf, that loads the subsections as seperate SWF's only when a user clicks on them (to save on initial load time).or my subsections, I need to be able to communicate with the SWF that loaded it. In AS2, this was simple enough - just say something like_parent._parent.gotoAndPlay("something"), and step up enough levels to speak to movie clips in the main SWF.Trying to do this in AS3, however, results in errors such as this when trying to compile my subsection SWF:Code:TypeError: Error #1009: Cannot access a property or method of a null object reference.... because it thinks I am trying to communicate with something that doesn't exist. The result is that I can't compile my subsection SWF's.For example, I am unable to reference a variable in the main SWF using this code in my subsection SWF:
View 8 Replies
Similar Posts:
Jan 11, 2006
i am currently working on a flash site, and i want to know that if there are possible ways that i can pass a value(better be a string)to the function of the external swf movie file that loaded by loadMovieNum(1.swf,1) function?
View 3 Replies
Apr 7, 2009
I want to communicate between flash movies on two different machines. Is this possible? Maybe with Flex? Also, can you open a windows command prompt with flash and send it commands?
View 1 Replies
Mar 8, 2009
I started learning the basics of as3.0 a year ago by doing a lot of experiments.. I never read a book or took lessons or something.. I guess i'm still missing important logics when i'm programming. I'm creating my personal flash imagegallery but I can't figure out how to communicate between a loaded swf and its parent swf.
I have a main.swf file with document class main.as which loads external swf files into a movie container. I am also loading a background sound like[code]...
The only work around I was thinking about would be to keep showing the stop/start sound button from the main.swf when a slideshow instance is called.. but then I'll screw up my design I want a second button inside the slideshow that can also stop the main bg sound.
View 1 Replies
Dec 23, 2010
I have a external swfs that I am using as skins for a app launcher. They are loaded in to the main movie via xml and loadMovie.How can I pass intervals and as commands to my skins. I need to send things like:button command for closing projectorvar clockValue for clock text fields in the skinxml menu info to nested movieclip in skin.swfI was thinking shared libraries, but I want to load the skin.swf dynamically with my xml, and I want the skin to maintain its structure so the ui style can be completely changed, instead of just placing mc's in the same place each time with only a slightly different theme
View 8 Replies
Mar 5, 2010
I am building a highscore system for my site, and I was wondering how to communicate with classes that are included in an external swf that i've loaded in.
Basically, how does mindjolt do this:
[Code]....
View 1 Replies
Jun 25, 2010
I am comming from AS2, obviously. I have looked at many of the post people have to get "something" to be avaialble on a root type method, but I haven't found anything that has worked for this yetFor those who are saying "you're missing the point", and the rest of the "this is a bad idea" or "not needed" comments would you mind detailing the process of making a variable avaiable from a subMovie to a mainMovie and from mainMovie back to subMovie; or changing the property to an object inside of a SWF that has been added to a movie using addChild()?These are the constraints I have to work within. I can't restructure the 100-150 some odd pieces that are already in existance using AS3. New funtionality is needed that requires communication between the two movies.
View 6 Replies
Jan 14, 2009
This has quite a long background history, so I`ll first ask the question: how can I make a loaded SWF file activate a function inside another loaded SWF file - both in the same 'parent' movie, domain and directory - when the user clicks a 'link' on the first swf?I'm new to actionscript, been only working with it for 2 months and I've been learning on the go. So far, so good, flash cs3 help has been useful, as well as this forum and other sites. My project is a website, no innovations, just simple info and light animations.The site should have an intro page (I called it index), a preloader, then the actual site (home), with links to each specific area (pages). In home, a small slideshow movie clip should always be on the upper left corner looping images until the user clicks a link to a page, when the slideshow fades away. With this briefing, I made a file for the index, and a uiloader in it would get the home file and that 'should' be it.My stage resizing event listener was working perfectly on home - standing alone - moving the slideshow exactly as it should. But when home was loaded inside index, the slideshow moved way more than it should never getting in the right place. After various unsuccessful attempts, I decided to move the slideshow into its own swf and load it directly in the index, together with the home file. This way, I managed to make it relocate precisely, but got myself the problem I'm asking here. I need to get the slideshow to fade away when the user clicks a page link, but they are separate files.
I tried to use a Loader.content based function, located at the index, but figures Flash help was not exactly clear on how I had to use it properly, so I did not manage to get it to work. It always reported an unspecified property. I searched around here and over the net, found similar problems and their solutions but could not resolve my problem. I think this is a little too specific..
View 1 Replies
Mar 6, 2011
I have an app with a setup page that requires the user to select a scenario for a quiz. Their choice determines the content that's loaded next.
With as2 I would have used a global variable to indicate the users choice but of course that's not longer an option, and I don't think I can send an event because the next page isn't loaded yet.
So how do I communicate with a class belonging to a dynamically loaded swf that isn't loaded yet?
View 1 Replies
Apr 6, 2011
I have a heck of time here with an issue. I have an xml document that when a certain button on the stage is clicked it loads it's corresponding external swf into an empty movieclip on the stage. This empty movie clip is a holder for all external swfs.So what I'm trying to do is when an external swf is loaded that has buttons on it, I need those buttons to communicate with the main timeline and remove a mc that is on the Stage. I need the currently loaded swf(s) to be able to do this.So whatever the currently loaded external swf is that's loaded, I need it to talk to the main timeline. (I have quite a few external swfs that need to do this) So I imagine I need to somehow target the currently loaded external swf to get it to talk to the main timeline.The code below in summary doesn't work but it doesn't give errors either. I don't pretend to know what I'm doing and I haven't been successful in searching for a solution to this particular issue.
// main timeline object
var index:Object=this;
function loadComplete (e:Event) {
[code].....
View 3 Replies
Jan 2, 2010
Is it necessary to unload Movies in Flash, or can I keep multiple movies loaded simultaneously? Are there memory requirements that make it necessary to limit the number of Flash movies loaded at one time?
View 1 Replies
Dec 4, 2010
I have a project where I have to load other flash movies into it as a "porfolio".So as of right now the code I have when clicking on the christmasCardBtn is [code]This is working fine to load the movie. I also have a button that appears when a movie is loaded that is coded to remove the myLoader1 child when selected. So the movie dissapears. But there are a few of my movies that have on-going sound clips. How do I make the sound turn off when the button to remove the movie is selected?I tried adding SoundMixer.stopAll(); to the button that removes the movie but this doesn't work.
View 1 Replies
Oct 23, 2003
i have my loaded .swf buttons loading 'movie1' and 'movie2'. both 'movie1' and 'movie2' have a tween in frames 1-5, which is a box that slides open and is stopped. in frames 6-10 the box slides backwards in the opposite and dissapears. i would like it if 'movie1' is open and the user clicks the button for 'movie2', 'movie1' plays 6-10 and then loades 'movie2' and vice versa. i just don't a script for this function.
View 7 Replies
Jul 16, 2003
Can someone tell me why images or swf loaded dynamically to an empty MC can't assume button events.I'm tring to build mc that load images or swf whit a preloader, but when it loads I can't put a button event on this mc.
View 2 Replies
Oct 23, 2003
i have my loaded .swf buttons loading 'movie1' and 'movie2'. both 'movie1' and 'movie2' have a tween in frames 1-5, which is a box that slides open and is stopped. in frames 6-10 the box slides backwards in the opposite and dissapears.i would like it if 'movie1' is open and the user clicks the button for 'movie2', 'movie1' plays 6-10 and then loades 'movie2' and vice versa. i just don't a script for this function..
View 7 Replies
Mar 24, 2004
Ive made two simple up/down buttons, that "scrolls" a loaded movie by the following code (lets say the movie is loaded to level 5):
_level5._y += 5;
Very simple.
Well, Id like to be able to hold down the button and have the movie scroll continously, like the scroll++ code does for textboxes
View 2 Replies
Apr 21, 2003
A problem that I'm having is that any movie I load into my main swf (regardless if I load it into an empty MC or just a higher level) my mouse still recognizes buttons that are underneath the loaded swf. This can be confusing to the viewer as the pointer turns to essentially an invisible button because you can't see the underlying button. Is there anyway to make the Flash player not recognize buttons underneath loaded SWF's or do I have to turn to invisible upon load?
Also, I'm having trouble getting the loaded swf to communicate with the main movie that loaded it. I think I need to use the parent action but I'm not sure how. I'm trying to use code that is created and contained in the movie that it loaded, is this correct?
View 3 Replies
Apr 16, 2005
i load external movie with loadMovie action.
It loads the SWFs into the movie correct.
I have problem, how simply switch between the loaded movies. The last loaded movie overlay all loaded movies.
How is possible do it the swap of the loaded movies?
View 1 Replies
Apr 30, 2009
Is there a way to automatically unload movies when a new movie is loaded? eg: 5 buttons, 5 bit of art. At the moment they overlap instead of unloading before the new one loads.
View 4 Replies
Nov 10, 2011
I have a base move that loads other movies into an empty clip [code]...
View 3 Replies
Mar 9, 2009
So lets say if you three movies loaded on the stage on top of each other and if I want to disable the buttons for all the movies that under the very top one so this way user is only able to click on the button of the very top loaded movie.
View 1 Replies
Feb 20, 2012
I need to load a flash-game inside the flash site. The goal is to get information about the winners' score to publish it on the site. The problem is that the game was developed by third-party programmers, so I have no idea if I can get access to any variable of the loaded swf (game) to get the highscores.
How can I retrieve the data from loaded swf?
View 1 Replies
Aug 31, 2009
I'm trying to use the code below to show a graphical representation of the sound from externally loaded FLVs, as they play.The code I have is below, can I change this to listen for whatever sounds Flash is playing at the moment and computeSpectrum from tha
Code:
var url:String = "song.mp3";
var request:URLRequest = new URLRequest(url);
[code]......
View 5 Replies
Oct 24, 2009
I have a main Movie that I'm using loadClip into empty HolderMc's. I am using listener inits and they are loading and working fine independently. the main movie loads swf A and B. I have a button in swf A needs to tell swf B (headHolderMc) to change:[code]I've tried _root.headHolderMc._alpha = 100; but nothing works.[code]
View 7 Replies
Jul 6, 2010
I have the following AS3 code. I'm just beginning and have gotten on this since finding it here: (take out the spacesloadingData.phpNow, I find out that I cannot access the properties of the loaded movies because they are AS1 or AS2. converting this to AS2?
Code:
import fl.containers.UILoader;
var ar_movies:Array = new Array();
[code].....
View 0 Replies
Feb 27, 2004
Can a loaded movie unload itself, I've tried but nothing positive. This is the thing, I have a section that I loaded, and I want a close button in that loaded movie, not in the actual main movie.
View 3 Replies
Mar 26, 2003
how to keep track of loaded MCs? I have a navigation system loading content MCs. The problem is, when I choose another nav button, I want it to (onPress) figure which clip is currently loaded then gotoAndPlay a frame label in that clip, which will play an exit animation and load the content area corresponding to the newly pressed button.
Someone on Flashkit suggested having the loaded content MC send a variable to the main time line to act as a kind of flag to say which section is active but I'm not sure how to go about doing this.
View 7 Replies
Nov 10, 2006
I'm trying to load multiple .swf's into a horizontally expandable flash page (it's for a portfolio). The problem is, being a bit of novice when it comes to actionscript, I can't work out how to create the correct spacing for my images. I've got the code below but obviously the x position is simply a fixed amount (210px) which is no good as some images are much wider than others. I've tried to use _width to make the spacing dependent on the swf width but nothing seems to work.
[Code]....
View 4 Replies
May 26, 2009
I have several external loaded with related buttons. However, I want the loaded flv removed when other buttons click. I s there any way to do it?
View 6 Replies
Dec 27, 2002
i have a movie that has 3 buttons on it..(and there r 7 of these button containing movies being loaded into my main movie...but this is not important in our case i guess.) anyway, each button loads a movie (they r draggable windows) into my main movie, located in different levels (not targets)..the problem is i want to change the alpha and depths of these draggable movies.eg;when i click on a button i want that draggable movie to come forward and set its alpha to 100 and the other two to 30..i could do this by loading the windows in target locations..but i can't do it when i load them in levels..
View 3 Replies