Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Calling A Movie Tutorial



Does anyone know of a realy good tutorial on calling a movie(loadMovie)from your movie? Something that explains how it works and how you control it and display it...
[Edited by DreamSavage on 03-28-2002 at 06:30 PM]



FlashKit > Flash Help > Flash Newbies
Posted on: 03-28-2002, 07:04 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Animating Dynamically Loaded Mcs/lee Brimlows Carousel Tutorial/calling The Pros
hiya,

i followed lee brimlows excellent carousel tutorial and i am wondering how to animate dynamically loaded mcs in that tutorial before the main animation, which is basically a carousel of dynamically loaded icons that rotate in a circle depending on where the mouse is, starts.

what i am aiming at is to have a sort of fountain-like animation before the main thing starts; in that way that the icons not just 'appear' on the stage, but are animated from 0, 0 to their position on the carousel.
i have the proper classes for the curved fountainlike animation (MCTween classes), but i don't know where to put the code in the actionscript, for i am not that good at actionscript to grasp what is going on.

i know that this:

Code:
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
is the part of the code where the icons are dynamically created and the functions are called, and i guess i have to squeeze this code (created by myself; probably wrong), which i think could be the correct one to achieve what i am looking for, into:


Code:

function fountain()
{
this.xposition = Math.cos(this.angle) * radiusX + centerX;
this.yposition = Math.sin(this.angle) * radiusY + centerY;
this.bezierSlideTo(0, 200, this.xposition, this.yposition, 1, "easeInOutQuint", 1, undefined, undefined, undefined);
}
the problem is i don't know where to put it in.

though i don't have a problem with the tween class, i thought i might give reference to it:
the bezierSlideTo is a MCTween class. the syntax is:
<MovieClip|TextField>.bezierSlideTo(control point x, control point y, x, y [, seconds, animation type, delay, callback, extra1, extra2]);
http://hosted.zeh.com.br/mctween/

i attached the original tutorial files from gotoandlearn.com. due to filesize limitations, i split the folder in three. just put everything in one folder and you'll be shiny.


this is the link to the video tutorial:
http://www.gotoandlearn.com


i am not letting you do the work; this is just a desperate call for help. i tried everything i know to get this idea to work, but due to my limited knowledge can't come up with the solution (which is probably pretty easy); and i decided to ask for help before pulling any more hair out...

the guys at the gotoandlearn forum couldn't help, by the way.

any help is greatly appreciated!
cheers,
dual


this is the actionscript used in the tutorial:

Code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();

home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}

function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}

function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}

function unReleased()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}


function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/2500;
}

Calling A _root. Variable Of A Movie Clip That Is Loaded Into Another Movie...
My problem is I have two movie clips that i'm working with. The child-clip has a variable and a movie at _level10 (the base of it) that I would like to call when the child-clip is loaded into the parent-clip. I tried _level10.variable but that did not work. And commonly _root brought me to the _root of parent.

How can I get around this?

P.S.
I know there was a way in Flash 4 that you could call instances backwards (//instance) or something like that. But I haven't used Flash 4 in a LONG while.

Plz Help

Calling Functions In Main Movie From An External Loaded Movie?
Hey everyone

I have a preloader function in my main movie, that I would like to be able to use in the different SWF's that I load into new levels using loadMovie....

How do I refer to this? Can anyone take a little time to explain how..

- Rune

Calling Movie After Movie From A Main Flash File
Hi all,

I have some banners made in flash and I need a main flash to contain all banners and show them one after the other in an infinite loop.

I've tried to coy the frames of the banners and paste them in the main flash file one set of frames after the other, but it is a total mess, nothing is in its place.

What should I do?
Should I call the banners from the main flash as separate movies? If so, how is it done?

Thanks a ton in advance!

Calling Frame In Movie From Movie Clip
how can i call a certain frame in a MOVIE SCENE from a MOVIE CLIP. im using just one scene. the way ive done it is i have the movie clip places in the main movie scene at the 10th frame. From inside the movie clip (say instance name = "dipper"), at the last frame i want it to play from the 1st frame of the movie scene n NOT the 1st frame of the movie clip.

many thnks.

Calling The Buttons Of One Movie Into A Nested Movie
Hi Saviour
I have a main menu, the navigation in this main movie is externally loaded in blank movie, navblank_mc . One of the menu buttons loading in this main menu is "Work". And in work.fla , i have a blank movie again called "tbnblank_mc" in which i have externally loaded the zooming thumbnails.swf.

I have buttons called "print", "web" etc in the work.fla. Now on clicking Print button , I want that only thumbnail 2, 4, 6, 8 should be visible in zoomingthumbnails.fla.

How do i connect the buttons of work.fla with thumbnails of zoomingthumbnails.fla...


plz help..dis is veryyyyyyy urgent...im working on a deadline...

Thanx a ton

Calling A Movie On The Main Stage From Another Movie.
I have a movie that I placed on the main stage and I want to call it by way of another movie. Since the movie I want to call resides outside of the movie that will call it, I was wondering how I would go about doing that. Here's the code I've got so far for the movie that is going to make the call:

on (press) {
tellTarget ("DEbuttons") {
gotoAndPlay("fade in");
}
}

DE buttons is the movie that resides outside of this movie and on the main stage. I wasn't sure if I can use _level0 somewhere in there and I wasn't sure where it ought to go. Thanks for any help.

Calling The Buttons Of One Movie Into A Nested Movie
Hi Saviour
I have a main menu, the navigation in this main movie is externally loaded in blank movie, navblank_mc . One of the menu buttons loading in this main menu is "Work". And in work.fla , i have a blank movie again called "tbnblank_mc" in which i have externally loaded the zooming thumbnails.swf.

I have buttons called "print", "web" etc in the work.fla. Now on clicking Print button , I want that only thumbnail 2, 4, 6, 8 should be visible in zoomingthumbnails.fla.

How do i connect the buttons of work.fla with thumbnails of zoomingthumbnails.fla...


plz help..dis is veryyyyyyy urgent...im working on a deadline...

Thanx a ton

Calling A Movie On The Main Stage From Another Movie.
I have a movie that I placed on the main stage and I want to call it by way of another movie. Since the movie I want to call resides outside of the movie that will call it, I was wondering how I would go about doing that. Here's the code I've got so far for the movie that is going to make the call:

on (press) {
tellTarget ("DEbuttons") {
gotoAndPlay("fade in");
}
}

DE buttons is the movie that resides outside of this movie and on the main stage. I wasn't sure if I can use _level0 somewhere in there and I wasn't sure where it ought to go. Thanks for any help.

Calling Another Movie
how do i load a movie from another movie and goto a particular scene. thanks.

Calling For A Movie
I am making a web layout all done in flash for a project.

I have been working with flash since january of this year. I have a button with rollover. When you put your mouse over the button, a TV screen kinda comes out from behind the button. Inside that "tv" screen, i want to have one of my old flash movies to play in that box. Is there a way to call for that movie?

Calling 30 Fps Movie Into 18 Fps
I have created a main movie that's 18 fps. I have created a game at 30 fps that I would like to call into the 18 fps movie. Both movies need to remain at their respective fps to function properly. Is there a way to do this?

Calling SWF At The End Of A FLV Movie
I've modeled - prepared cut scenes for a 3d animation that I'm importing as chunks into flash (FLV files). Now, I'm wondering how to create an effect similar to:

http://www.mediaboom.com

Upon clicking a section the cut scene will activate. At the end of the animation I need it to call my swf file. Then when a new section is clicked I want the animation to revert (rewind) back to the starting scene and then call the next animation (like media boom). Any advice??

Calling A Loaded Movie? HOW?
This should be easy, but I'm having a hell of a time with it.

I have a movieclip with an instance of soundClip on the main timeline.

In this movieclip, I am loading an SWF file as such:

loadMovie ("mySound.swf", "soundClip");

In my main movie, I want to control this loaded SWF file.

What is the path to it?

I've tried this but it didn't work:

_root.soundClip.mcControl.sLoop.start(0, 99);

(mcControl is a MC in the loaded movie) but that does not work at all.

Any help is appreciated!

Calling A Movie Clip
What is the best way to call in a MC from a library. I am using attachMovie with _root as the parent. Is there a better way?

Calling A Movie Clip
What is the best way to call a MC into the scene from a library. I am wanting to click on a MC and have another MC from my library appear in the scene.

Calling A Movie Clip
I have a movie clip in the library named movie1
now in Scene 1 on frame 10 I want that movie to play

How do I call it?

Calling Movies From Within That Movie.
I have 3 movies and 3 buttons in one file. I want each button to call a different movie. The only way I know how to do this is by creating 3 seperate .swf files each one contaiing one of these movies and call them using the "loadMovie" command. Can someone tell me the easy way of doing this so that I can keep all movies in the one .fla file?

I appreciate the help, thanks!

Calling Flash Movie From VB App.
I have a question about using a Flash movie as the screen splash for a Visual Basic application. Basically, how can I do that? I've searched Google and on Flashkit but could not find the answer. I've tried a few things like publishing my movie to an excutable (exe) file and then using the VB Shell command. The problem here is the code in my VB app begins immediately after the Shell command starts execution. There is a Flash component in VB but I've not been able to figure out how to make that work. Any help is appreciated.
TIA

Calling A Movie Clip
This is hard to explain, I apologise if it's been covered, if it has, I can't find it.
Anyway,
I created my normal navigation bar out of buttons. When one of the buttons is 'clicked', I want a second navigation bar to pop up elsewhere on the screen. To keep the site simple, I want to make the movie clip for the second navigation bar seperate from the first. How do I get the first navigation button to 'call' another navigation bar.

Thanks

Calling Movie Clips
helloo
how can i call a movie clip from a button ??
to load on my first scene

thanks alot

Calling A Movie Function
how do you call a function from a movie that is two layers back with out using _root???

thanx
shaun

Calling Movie Clips?
its been a long while since i've used flash, in fact its my first tiem with MX, before i was working with Flash5.

I'm looking to call an instance of a MC when clicking a button, to give a rollover effect for the button, then after rolling out it plays the 2nd animation of the effect disappearing, kinda like Button #1 here:

http://www.jpsnetwork.com/hosted/jas...ton_tests.html

however, i want to do it so that when i rollover, its not in the same MC, i want to call an instance of those lines,

if i remember correctly, in flash5 it would be:

_root.lines.gotoAndPlay(2);

but this is not working in MX, can anybody help me?

thanks

Calling A Function In Another Movie
Is it possible to call one movie's function from another movie?

If so, how would this be done?

Calling A Movie Symbol
Hi everyone.
My question is simple:
How do i call a movie symbol from a button or graphic within my movie?

When i click that graphic (or button) i want it to take me to a movie symbol i have in my library.

What kind of actionscript do i need?

I'm using Flash mx 2004.

Thanks.

Calling Function From Another Movie
i use one function in main movie on 1. frame :

Code:
function saveVisitor (my_link)

{
// some action
}
This function works in main movie
***

i load in main movie exter. movie, than need i call this function

Code:
saveVisitor (my_link)
Is it possible?

---

I tried it but no works mayby path problem only

Calling Variable From One Movie To Another
Can we refer a variable inside another movie from my main movie.

1) I have first movie with variables declared for ex:

var color = "mycolor";

2) I have a second movie - I am loading the first movie inside the second and if I assign this a text field does it work.

_root.mytext.text = color;


Like this it is not working so any possible way

Calling A Movie Within 3 Movies
I need a little bit of guidence here I have a movie that it suppose to be a button it has another movie within the movie is a movie with more movies and im trying to call a movie within the 2 movies to display on scene1 one how would i go about doing this?

Heres a little example of how my movie is.

Scene1>royalbloodline>dropdown1>bloodtxt

Im trying to call the movie from bloodtxt to display on scene 1

Calling A Function From Within A Movie
Howdy!

I need to be able to call a centrally defined function within a movie clip that is playing within a movie clip.

Here is what I have tried: In the main timeline i have a whole level to itself that only contains
ActionScript Code:
function functioname(){
    script;
}
. And then a MC is loaded that has another MC in it. It is within this second MC that I want to call the previously defined script. Here is how I am trying it
ActionScript Code:
onclipevent(load){
    functioname();
}
, and it does not seem to work.

Do i need to be using a _parent or _root tag? Or am i totally going about this the wrong way.

Cheers

Calling Function From Another Movie
i use one function in main movie on 1. frame :

Code:
function saveVisitor (my_link)

{
// some action
}
This function works in main movie
***

i load in main movie exter. movie, than need i call this function

Code:
saveVisitor (my_link)
Is it possible?

---

I tried it but no works maybe path problem only

Or must i use _global propety?

Calling Function From Another Movie
i use one function in main movie on 1. frame :

Code:
function saveVisitor (my_link)

{
// some action
}
This function works in main movie
***

i load in main movie exter. movie, than need i call this function

Code:
saveVisitor (my_link)
Is it possible?

---

I tried it but no works maybe path problem only

Or must i use _global propety?

Buttons Calling Another Movie
Is it possible to push a button in one flash movie and tell another flash movie on the same page to do something?
For instance, go to http://rmv17.topcities.com/. When a link is pushed in the header movie, I want the nav movie to change frames. The Quick Links frame is the frame that you see.
Disregard the unfinished parts.

Calling Movie Clips
I have some short flash movie clips, 2-3 secs. How do I script it to wait a minute before calling the next one.

Calling An External Movie From A Movie..
I want to change frames in a different .swf movie, for example I have a navigational .swf movie in one iFrame, and when I click one of the nav buttons, I want it to change frames in an other external movie, is there a way to call from one movie to the other, using action script?

Thanks for the help.


Kyle Hildebrant.

Calling/loading Movie Clips...
Hi flashers, got a little problem...
Can I call/load a movie clip that is in the library (not an instance) from the scene (using a button) and without changing of keyframe?.
I'm in the scene, with an only keyframe and i want to press a button that loads/calls a movie clip, is that possible?

Thanx lads.

Calling A Variable From Within A Movie Clip
the answer to this question must be simple and i have made a hard honest attempt to find the answer myself. i cant find it in the book i have so i was wondering if u ppl could help me out.

i have several scenes and the first one loads and the user can click one of 5 links done, and then it takes them to another scene with another navbar. what i want to do is assign a variable to the scene thats says what scene(or page) it is, i need this so i can use it in a if else statement in the nav bar mc code to figure out which scene is loaded, that way a user clicking the same button as the page he or she is on will not have any effect. i need the actionscript for it.

oh yeah btw, i stopped writing this message twice cause of ideas i had that might work, and guess what, they didn't i really need your help

thankx in advance.

dave

Movie Clip Calling Scences
I have created a drop and drag movie clip menu system which on it's drop down menu has a series of options which by using invisible buttons link to other scenes within my movie.

However the when i use any of the following code it completely ignores the scene command but does recognise the frame command

on (release) {
gotoAndPlay ("inspiration", 1);
}
or

on (release) {
_root.gotoAndPlay ("inspiration", 1);
}

Any ideas?

Calling A Root Scene From Within A Movie
I have created 2 scenes (scene1, scene2)
Inside scene1 I have placed a movie.
Withing that movie I have a button that must run scene2.
I have tried using

gotoAndPlay ("scene2", 1);
_root.gotoAndPlay ("scene2", 1);

but all these seem to do is jump me to the first frame of scene2.

How do I get scene3 to run.
My whole navigation depends on it (as well as my sanity)
I will idolise anyone who can help me.

Calling Movie Clip Methods
My movie has one simple movieclip. it simply has one function defined on its timeline:
function test() {
trace("hello silly")
}

The clip's linkage is set to "test". I then instantiate the clip in the main movie timeline:
attachMovie("test", "test1", 0)
This is cool. However, calling the function with:-
test1.test()
on the main timeline doesnt work. I've read through Moock's ASDG pages 314,5 which appear to say I'm doing the right thing.
Anybody care to help please, Ive tried everything!

Calling Scenes From A Movie Clip
I'm using a drop down style menu which is a MClip. When adding an action to a button within this movie clip to call another Scene within the movie, it does not work. In other words the typical:

on (release) {
gotoAndPlay ("Scene 1", 1);
}

action does not work. Anyone had any experience with calling movie scenes from buttons located within a movie clip?

In help would be great....I have tried _root. and _level0. syntex.

Thanks,
FEW

Calling A Function Within A Movie Clip
On my main timeline, I have a movie clip located on frame 3. Inside that
movie clip I have a function. My goal is to call that function from frame 4
of my main timeline.

I have tried the following code with absolutely no results:
_root.myMovieClipName.myFunctionName();

Any suggestions?

Refer To Movie Of Calling Window
Hi, need desperately a solution to the following:

A movie launches a new movie in another window by
getURL("newmovie.html","_blank");

Upon the closing of that new movie by
getURL("javascript:window.close();");

I want to get back to the first window. But how to refer back to the first window and the movie in it?

Appreciate your help.

Load Movie And Calling Variables
I have a projector flash movie which is getting to big to run on the hyper-powerfull computers we have at work so then then I thought that I could break my flash file (.exe) into smaller ones and use the load and unloadmovie actions to make it run better.
The thing is, I have some dynamic && input text boxes that are set by the user in the very first frame of the first scene and they have to be used on every scene in order for the calculations to work.
- Can I call a variable that is within another flash file into the main flash file????
How would I do that? First of all, this flash file must be published as a stand alone flash movie (.exe file). So, do I break the main file into smaller .exe ones?? Or just the main one as .exe and the rest of them as .swf????? What about the variables???
Tks for your help!!

Calling Vars From Within Movie Clips?
If I set a var on the main stage (i.e. _level0), how can I access it and read its data from within a movie clip? I've tried calling it from within a tell_target ("_level0") command but it still can't find the var, only on the main stage.

By the way this is Flash 4. Have MX but this needs to be done in v. 4.

Help anxiously required and appreciated, and thanks to all who helped before.

Calling Vars From Within Movie Clips?
Apologies for posting this on two forums, wasn't sure where it would be better suited:

If I set a var on the main stage (i.e. _level0), how can I access it and read its data from within a movie clip? I've tried calling it from within a tell_target ("_level0") command but it still can't find the var, only on the main stage.

By the way this is Flash 4. Have MX but this needs to be done in v. 4.

Help anxiously required and appreciated, and thanks to all who helped before.

Kind regards.

Calling Out Movie Clips-won't Reappear
Flash MX:

sorry for cross-posting need...help...bad.

i need a MC to appear when i click on a button and to disappear when i click on the CLOSE button within the MC.

On first click the MC appeared, fine. Problem is, after i've clicked on the CLOSE button to close the MC, the MC refuse to reopen when i try to click on it.

i use this code on the button to call out the MC:

on (release) {
aboutus._visible = true;
gotoAndPlay("aboutus");
}

And this one on the CLOSE button to close the MC:

on(release) {
this.gotoAndplay("fade");
}

the button that calls out the MC just would not work after the first click. whar went wrong?

h-e-l-p...

Calling A Movie Clip To The Stage
Hay all,

Okay i learned how to do this in school like 6 months ago, but i totally forget how. Little help.

I have to make the MC exported for action script i know that. then its like"

loadMovieNum("Mymovie",4)

but i cant get this to work right and i think there has to be some sort of x/y values in there somewhere to.

Thanx All

Help Calling Function From Movie Clip
Basically myset up is this, in the main timeline on the first frame I load the function fadeBGAudio and the mp3, now when I reach a certian frame on the main timeline, my menu which is in a movie clip loads (menu_mc). In the menu are several buttons any one of which I need the fade sound call to operate from.

This is my fade sound code. How can call the fucntion from with in my menu_mc?

Code:
// variables for sound object
var bgVol = 100;
var bgVolMin = 0;
var bgVolMax = 100;
var bgVolInc = 5;
///////////////////////////////////////////////////
// this function fade the background music down or up
function fadeBGAudio(upDown, sndObj) {
this.onEnterFrame = function() {
if (upDown == 1) {
// Fade the audio up
bgVol += bgVolInc;
if (bgVol<=bgVolMax) {
sndObj.setVolume(bgVol);
} else {
sndObj.setVolume(bgVolMax);
delete this.onEnterFrame;
}
} else {
// fade the audio down
bgVol -= bgVolInc;
if (bgVol>=bgVolMin) {
bgsound.setVolume(bgVol);
} else {
bgsound.setVolume(bgVolMin);
delete this.onEnterFrame;
}
}
};
}

/*
// call function to fade IN the BG audio
fadeBGAudio(1, bgsound);
// call function to fade OUT the BG audio
fadeBGAudio(0, bgsound);
*/


On my menu button in the menu_mc I have this:

Code:
on (release) {
//////////////////////
for (var i in _root) {
if (typeof (_root[i]) == "movieclip") {
removeMovieClip(_root[i]);
}
}
///////////////////////////////
//stopAllSounds();
_root.fadeBGAudio(0, _root.bgsound);
_root.gotoAndPlay(1);
}

Calling Functions In A Loaded Movie
Hello,

As an intern I am working on a project, and for that project I have to create a simple interface.

Now I have created a movieclip with all actionscript, that is necessary. I want to use this movieclip in another movie with the loadMovie function (maybe via a moviecliploader would be better, but I don't know that yet).

Let's say I have a function getPoints() in this movieclip.
What I would like is to know I can call this function (that is in the loaded mc) with a button, that is in the movieclip the the mc is loaded into. I have been searching for an example with the syntax I have to use, but I can't find anything.

Hope this is clear enough.

Regards,
Jorrit

Copyright © 2005-08 www.BigResource.com, All rights reserved