ActionScript 3.0 :: Call Load Function On A Loader Two Movie Clips Down?
Oct 6, 2009Call the load function on a loader two movie clips down?
View 1 RepliesCall the load function on a loader two movie clips down?
View 1 Repliesin my flash, I have an interface which loads pictures through button clicks. During the "loading stage" of every picture, a preloader animation is displayed.Currently, after the swf starts, the first picture is loaded without said preloader animation. I wish to call the preloader function (see code example below) ONCE during startup of the swf, with the first picture load.
loadMovie("load/beach.jpg", _root.content_mc);
// image 1 loads the beach image using startPreload
image1_btn.onPress = function(){
[code]....
Here is the code to call function using event listener:
var listListener:Object = new Object();
istListener.change = function() { changeImage(); }
thelist.addEventListener("change", listListener);
[code]......
So I want to make some movie clips function as buttons to load some external swfs. I have this action script on the mc's:
on (release)
{
loadMovie("Chuck.swf", "motionmc");
}
It was working when it was a button, but now nothing happens?
I'd like to control a movie clips current frame by another movie clips action script.I realise the following controls the outside (root) frame time line:
on(release){
_root.gotoAndStop(1);
}
but I'm not sure how to apply that to my other movie clip. I'm guessing it would be something like this:
on(release){
_*movie_clip_name*.gotoAndStop(1);
}
siteLoader.as, Line 23 1061: Call to a possibly undefined method load through a reference with static type Loader.
[Code]....
I Have 3 Movies:MAIN.SWF, contains loading movie actions for Nav.swf and Home.swf.NAV.SWF, contains navagation menu loaded on Level 2 in Main HOME.SWF, contains slideshow for home page loaded on Level 1 in Main In NAV.SWF, there is a MOVIE CLIP "graphmc", which contains a BUTTON "graphicbtn", When this button is clicked, I'd like the HOME.SWF (which is loaded into Main.swf on Level 1) to fade out and unload, and load and fade in Graphics.SWF in place of it.
View 6 Repliesis there a way to refer to all movie clips on the stage or apply a function to all movie clips without applying the function to all manually?
View 3 RepliesI'm having a problem with something which i thought i knew and apparently i dont.I have 2 Movieclips in my scene. i have "whole" and inside it "but1gallery" inside "but1gallery" i have a button named "but1". What i need is to get to a frame inside mc "whole" when clicking "but1". this is my code(im using AS2):
View 1 Replies[code]...
And I have a mc on the stage that have a code inside to attach a scroll from the library. This scroll load a mc called "Rotuladores1", and inside this mc I have my button "r1".[code]...
When I use the following code inside a keyframe in a layer (Actions layer) it works fine. When I use it inside a custom class I get the following error: .../siteLoader.as, Line 19 1061: Call to a possibly undefined method load through a reference with static type Loader.
[Code]...
I want to use loadMovieNum('platformer4.swf', 0);to reset all my variables, but then I want to call a load function after to load the users data. How can I do this?
View 1 RepliesI am working on flash application that uses Slideshow screen, now i am trying to call a function when a screen loads; what this function does is it create a focus on one the movie clip.
I tried using the 'onClipEvent(onload) ' - it does call the function but does not set the focus on it; however if i code setfoucs ( selection.setfoucs) on key handler it sets the focus.
In the FLA file i have two animations of a turbine and a fan turning one is controlled via a button the other is a loop action that is not controlled.The button control is simple telling the movie clips to got frame 2 and play,and on the fan and turbine movie clips I have a goto and play frame 2 action the end of their time line. By doing this I get a rotation effect .
The problem is that when I call play function from the start button the movie clip does not play properly and just shudders between frames,rather than way it should run as a looped animation.
I was looking at this thread about the watch function and would like to use it to detect changes on movieclips properties.
View 3 RepliesI have a "map_mc" movie clip that has over 500 movie clips(counties). I also have the countynames in xml format. I want to be able to
1. in a loop get a list of all movie clips
2. and in a dynamic text box assign the county name to the movie clip (from xml).
Is it possible to get the names of all movie clips and then assign the countynames?
I have the xml part semi working and on mouseover can display the name but is stuck on the movie clip part.I am trying to avoid typing all the county names and in the future will be adding census and other data to the xml.
I am trying to load a opening box animation and simultaniously text on top of the animation, is that possible?
View 1 RepliesI want to display a Flash video in a popup window, and when the video has finished playing, close the window using a javascript function "closeIt":
<script>
function closeIt() {
alert("About to close...");
[code]....
How can I achieve this? I have imported a video into Flash (choosing "load external video with playback component"). This is in frame1. I thought that in the second frame I could make a call to ExternalInterface.call("closeIt") in the Actions window. I have tried this, but when I publish and view the flash movie in a web brower, I never see the javascript alert.
How do I apply one variable and one function to many movieclips?[code]The reuseFade function works if I target the movieclip by name on the stage,ex: var T1:Tween = new Tween(mc_black1, "alpha", Strong.easeIn, 0, 100, 5, true);using "this" doesn't work.The only way I know how to make this work is creating four functions to handle the event
View 7 RepliesimportSubtemplate = new XML();
importSubtemplate.ignoreWhite = true;
importSubtemplate.onLoad = function(success) {
[code].....
I have this page that has 8 movie clips, and I want to make these movie clips function as buttons. I got that part done already, but what I need now is the Rollover part. I made one separate animated movie clip that'll function as the rollover, so whenever a button is rollovered the animated movieclip will play on top of that button. So my question is how do you designate the one animated rollover movieclip to play on top of each separate button when they are rollovered on? Hope it's not too confusing to understand.
View 3 RepliesI would like some help on writing a piece of code.I need to write a function that if some movie clips are in some x and y value, then gotoAndPlay('end');
Code:
function gotoEnd() {
if
(tv_mc._x = 41.8;
tv_mc._y = 157.3;)
then
gotoAndPlay('end');
}
How would I apply my existing function that involves calculating the x and y position of a specified movie clip, to multiples of movieclips. MY MOVIECLIPS on stage are
Code:
Ball_mc
Ball_mc2
Ball_mc3
MY FUNCTION is
Code:
function hitDetect(event):void {
var ballX:Number = (ball_mc.x-videoX)/sizeDif
var ballY:Number = (ball_mc.y-videoY)/sizeDif
[code]....
Should I use Arrays? Loop?
how to load multiple movie clips on the stage? My ActionScript 3 are as below:
I declared a movie clip - "mcPhotoFrame" (i.e. an instance of "mcPhoto" movie clip) and would like to load all the pictures on the stage but after finished loading, only the last photo shows on the stage.
I made website last year using Actionscript 2, and everything was working fine, its been uploaded to the net and works brilliantly. Now when I've come back and opened it now, none of the movie clips will load saying theres an error. I haven't touched it since then, and have no idea why its not working, all the external .swf files are still in the same folder, and all of them work perfectly alone. I've just started making a new website where I'm also trying to get the main file to load an external file on a movie clip layer, but its not working?
View 3 RepliesI've been working on this extremely annoying problem for over 3 hours!
Alright the basics: A parent movie, and a loaded movie.
Inside the parent movie on a frame where the loaded movie is loaded, are two functions[code]...
I have multiple functions and multiple ways to call them because I'm trying atleast for ONE of them to work! I have twisted this code, changed the functions, and tried so many different ways to debug this problem! And finally, I am showing you my most simplified way of testing this problem.
Normally, when I load my parent movie and once it loads the loaded movie inside it, if I click the button- it should call one of my functions. Then I should see the traced message in my output. Instead- nothing happens.
I'm trying to use a movie clip's function from a fellow movie clip 2 children up and I can't find the right code. I've used:
MovieClip(datalist.getChildByName("content")).onpauseButton();
MovieClip(datalist.root.root.root).onpauseButton();
MovieClip(datalist.scrollb.content).onpauseButton();
MovieClip.(datalist.onpauseButton);
and none of them work. The function is "onpauseButton" and it is inside of "content" which is inside of "scrollb" which is inside of "datalist." I'm trying to call it from datalist's neighboring movie clip so that it activates along with another function:
manualButton.addEventListener(MouseEvent.CLICK, fl_ClickToLoadFile_1);
function fl_ClickToLoadFile_1(event:MouseEvent):void{ navigateToURL(new URLRequest("M-23 6263.pdf"), "_blank");// want to add the onpauseButton code here
}
I recall that there is a way to do it, I just can't find the right sequence. Everything online is about how to call up to a function outside of the movie clip and not down to a function inside of one.
Does anyone one know if it is possible to call a function from a different movie clip than the one it is in. For example, a function named loadData() which is on the first frame of a movie clip instance named thumbNail which is on level 0 on the stage i was thinking that it should work to call the function from frame one on the stage with..
View 5 RepliesIt doesn't load during the first load.
myVars= new LoadVars();
myVars.onLoad = function(works)
{
if(works){
[code].....
I am tryin to hit a servlet to get the data.
I have three movie clips on my stage. Their names in my library are a1_mc, a1_mc2, and a1_mc3. Each of those movie clips on my stage has a different instance name. All of these are connected with an actionscript in the same file.Now, I'd like the movie clips to appear at a random position every time, they are loaded.
I already tried to make a new array and solve this issue with the sort() command. However, that did not work out properly. The positions and instance names of the movie clips on my stage are as follows:
a1_mc
instance name on stage: a1
position on stage: X = 20.0 | Y = 140.0
[code]....