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




Global Stop Function?



Hi I'm using MX 2004 and was wondering if there is any way to pause an entire movie rather than just the main timeline?



Ultrashock Forums > Flash > Flash Professional
Posted on: 2004-03-08


View Complete Forum Thread with Replies

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

Global Stop Function
Hi I'm using MX 2004 and was wondering if there is any way to pause an entire movie rather than just the main timeline?

[CS3] Global Function = Global Variables As Well?
CS3/AS2
if i have a global function with some variables defined within it, are the variables global too? if not how would i make them global too?

_global.function someFunction() {
var cake = 10;
var book = 15;
}

someFunction is global so therefore "cake" and "book" are too?

Global Function, Global Variable
how to declare global function and global variable? if i declare it just in frame 1, then the object in other frame can reach it? thanks for answer..

Global Stop? Please Help...
i am dynamically loading swf's into a shell movie. the loaded swf's have multiple movie clips playing in them. i have a pause/play button in the shell that will pause and play the loaded swf.

the pause button calls loadedSwf.stop();

this works, but only for the main timeline in the loaded swf. the other mc's in the loaded swf continue to play. I have thought of keeping an array of all of the playing mc's in the loaded swf and telling them all to stop, but this isn't practical considering i have 50-60 movies to load (one at a time) and they all have untold numbers of mc's playing inside them. it seems like there should be better way. is there some kind of global stop function that will stop all mc's from plaing inside an swf?

any help would be MUCH appreciated...

Global Stop?
just wondering if this is possible... yes i mean global stop.. where you can stop all the playing movieclips regardless of the number at the same time.. achievable or not?

Global Stop
newbie question:
We have a flash scene with several movie clips embedded in it. I want to be able to globally control whether the scene plays or not. I named the each instance of the movie clips in the scene and assigned the action 'on keypress "s" - stop. This method only works on one clip and if assigned to the 3 of them the command does not work and everything keeps looping. If I edit the symbol and try and put a stop action there it doesn't work either.

Anybody have any other ideas? thanks

Mike

Global Stop?
just wondering if this is possible... yes i mean global stop.. where you can stop all the playing movieclips regardless of the number at the same time.. achievable or not?

Global Stop On Rollover
Hey guys -
I have a movie that was sent to me that I need to modify. It's a series of buttons that are motion tweened to slide in and out of the stage. What I need to do is stop the tweens when I user mouses over the movie. I thought about adding a button over the stage to stop the movie but that would stop the other buttons underneath it from functioning. Any help you could provide would be greatly appreciated.

Thanks!

Global Stop/pause Everything
Is there a way to stop all movie clips and timelines from running and restart them with a stop/pause and play button? I don't want to target them: mc.stop(); or mc.pause(); I am talking about a global stop or pause button to stop everything. Thanks.


--aaron

Initiate Global Stop/pause?
anyone know if there is some way of initiating a global stop/pause.

i have a large number of duplicate movie clips that are named sequentially and all in motion across the stage at one time. Essentially a driving game with objects going past. Each movieclip contains its own individual script for setting it in motion.

When the user crashes I would like to be able to freeze all the clips at once.

Is there anyway of pausing/stopping all movieclips simultaneously? If not, I was thinking that maybe this could be done with a wildcard? (if it exists) or prototypes (which i know nothing about).

thanks in advance

[F8] Global Timeline Stop Command
OK Guys, hopefully someone can help me out here or at least point me in some direction!

I have a presentation which consists of a main timeline with an assortment of animations and MC's which run independently of the main timeline. I also have some animations which loop depending on array data and also some switch commands to control navigation.

All was going well until I was asked for a pause/play button to be added.

Due to the dynamic nature of the presentation this isn't as easy as a simply pause/play button with a stop and play command

Anyone have any idea how I can stop something like this in it's tracks and then start again from where it is without some major rework?

Mike

Initiate Global Stop/pause?
anyone know if there is some way of initiating a global stop/pause.

i have a large number of duplicate movie clips that are named sequentially and all in motion across the stage at one time. Essentially a driving game with objects going past. Each movieclip contains its own individual script for setting it in motion.

When the user crashes I would like to be able to freeze all the clips at once.

Is there anyway of pausing/stopping all movieclips simultaneously? If not, I was thinking that maybe this could be done with a wildcard? (if it exists) or prototypes (which i know nothing about).

thanks in advance

Function After A Global Function Executes?
Hey all

I have a menu opening from the side, and that function is called openMenu; and it's _global. When that menu opens, I think it'd be nice to have the open windows slide over with it. My idea so far is to have a function inside each window that goes something like,


Code:
x = (this._x + 160) // 160 is the menu width.
y = this._y

when openMenu() executes = function() {
this.slideTo(x, y, seconds, animType);
}
And then the inverse when closeMenu executes.

How can flash tell when openMenu executes?

Problem With A Function Within Global Function
Hi!

I have a global function for loading php data:


Code:
_global.MovieClip.prototype.loadPHP = function(Url, Data) {
var php_result:LoadVars = new LoadVars();
php_result.onLoad = function(success:Boolean) {
if (success) {
// Connection OK
if (!php_result.error) {
this.Title.text = "Some info";
this.gotoAndStop(2);
} else {
this.Title.text = "Some info";
this.gotoAndStop(3);
}
} else {
// Connection Error
}
};
var php_send:LoadVars = new LoadVars();
php_send.sendAndLoad(Url,php_result,"POST");
};
It works as it should, except I can't access the Title.text or gotoAndStop from within the onLoad function. I've tried without the "this." aswell. It works fine outside the onLoad function.

Any ideas?

Stop Actionscript Function At A Specific Frame (stop Looping)
I want to stop an effect at a specific frame but I dunno how.
Do I have to put something in the code?
I'm confused.
Or just tell me how to stop it from looping.
Edit:
Is it possible to attach this to a movie clip? Then i can stop it or use onEnterFrame and then escape();
I actually have no idea what I am talking about. /Edit

Here is one of the code I borrowed:

MovieClip.prototype.placeInSpace = function(id) {
var ratio = this.focaldistance / Math.sqrt(this[id].z * this[id].z);
this[id]._x = this[id].x * ratio;
this[id]._y = this[id].y * ratio;
this[id]._xscale = this[id]._yscale = 1000 / this[id].z;
}
MovieClip.prototype.randomPlace = function(id) {
var radius = this.rmin + (this.rmax - this.rmin) * Math.random();
var polar = 2 * Math.PI * Math.random();
this[id].x = radius * Math.cos(polar);
this[id].y = radius * Math.sin(polar);
this[id].z = this.zmin + (this.zmax - this.zmin) * Math.random();
}

Here's the other code cause I can use two in my movie:
function mover() {
// Move the particle over time
this._y += this.speed;
this._yscale += 10;
this.speed++;
if (this._y>500) {
this._y = 0;
this.speed = Math.random()*10;
this._yscale = 100;
}
}
function starField(x, y, n) {
// Generate a starfield of specified dimensions with n stars
for (var i = 0; i<n; i++) {
var star = this.createEmptyMovieClip("star"+i, i);
var dot = star.createEmptyMovieClip("dot", 0);
star._rotation = Math.random()*360;
star._x = x;
star._y = y;
dot.lineStyle(0, 0xFFFFFF, 100);
dot.moveTo(0, 10);
dot.lineTo(0, 15);
dot.onEnterFrame = mover;
dot.speed = Math.random()*10;
}
}
starField(275, 200, 100);

Global Function
Does anyone know how to make a function available globally?
I'm using movies loaded in movies so _root isn't an option, and it's a pain having to keep going _parent._parent._parent... all the time.

Global Function - Is It Possible
i need to write a couple of functions which are available globaly in a movie. the functions are for the menu and switch buttons on or off dependant on a global variable set by each button .

this is the variable being set in the buttons:
_global.onname = one_btn

i need also to test here for present on buttons and switch them over to the variable _global.offname.

this is the code which needs to go global:

function buttonon(_global.onname){
setProperty(name, _alpha, "100");
myColor = new Color(1);
myColor.setRGB(0x999999);
}


function buttonoff(_global.offname){
setProperty(name, _alpha, "100");
myColor = new Color(2);
myColor.setRGB(0xB2B298);
}
any ideas gratefully recieved.

cheers

Global Function
I am trying to create functions that will duplicate a movie clip based on an array:

EG.

Code:
popAlbums = new Array("Pop Life", "Playlist", "Hip Hop Nation");

addpop() {
arrayvar = popAlbums
numClips = arrayvar.length
x = numClips
trace(arrayvar[0]);
for(i=0;i<x;i++) {
trace(x);
trace(i);
this.attachMovie("albumId", arrayvar[i], 100+i);
this[arrayvar[i]]._x=0;
this[arrayvar[i]]._y=50+i*30;
trace(popAlbums);
}
}


What I can't figure out is how to run the function with in a movie clip. This is what I have in the MC:


Code:
addpop();


How do I make the function global?

Global Function Vs. Not
Hey guys,
I have a question about declaring functions. Say I declare a function like so:
_global.thefunction=function() {
blah blah
}

I have a piece of code that only works if I declare the function this way:
function thefunction() {
blah blah
}

Aren't both of these essentially the same thing with one being accessible by all timelines and movie clips. I found it weird that one of my animations worked when I created the function the second way and not the first way. I understand the other way around. But for the local function to work and the global to not work didnt make sense to me. Thanks guys
Don

Global Function
(using Flash MX 2004)

Is there a way to make a global function for on(release)?
I tried setting one up when the file loads, but I get the error stating "on(release) can only be attached to a button, etc."

thanks!

Global Function
Hi all

How can I control a movieclip color Global so I dont have to worry
if the movie is used inside another movie

To be more specefic ... change the color with AS3
to my Btn_fill

Regards

AS3 Global Function
Hi,

I'm new to as3. What is the proper way for classes to communicate with a function of another class - should I be reading up on dispatch event? I did google and a search on here but haven't yet found the answer I'm looking for. Basically I have 4 button classes whose instance is created in the fla file (ie on the timeline) - i want those buttons to call a "global" function. Thanks for help.

Global Function?
how can I make a global function such as trace?

i want to make a function called trace2. here's the function as is... very simple.


Code:
var debug = true;
function trace2(str)
{
if (debug) trace(str);
}
i don't want to have to use _root.trace2(str); everytime.

I just want to be able to use trace2() from anywhere. so I guess i need the variable debug global AND the function to be global.

I think you just set global vars like...

_global.debug:Boolean = true;

is that correct?

then how do I do the same for a function?

Trying To Use My 1st Global Function
i'm having problems implementing my 1st global function... so i'm hoping someone out there can point me in the right direction.

here's the code i have placed on the 1st frame of a movie that acts as button. What i'm trying to do is recreate this actionscript to declare it as global function that can be called from anywhere within a project


Code:
this.onEnterFrame = function() {
if (rewind != true) {
return undefined;
}
prevFrame();
};
this.onRollOver = function() {
rewind = false;
play();
};
this.onRollOut = function() {
rewind = true;
prevFrame();
};
so i now have the following code declared on the 1st frame of the root timeline


Code:
stop();

_global.aniButton = function() {
this.onEnterFrame = function() {
if (rewind != true) {
return undefined;
}
prevFrame();
};
this.onRollOver = function() {
rewind = false;
play();
};
this.onRollOut = function() {
rewind = true;
prevFrame();
};
};
and this is the code now placed on the movie clip which acts as the button


Code:
this.onRollOver = function() {
aniButton;
};
unfortunately this isn't working and i'm somewhat stumped, as a relative beginner i could do with a push in the right direction and would much appreciate your advice on this.

looking forward to replies... hopefully!!

James

Can't Get Global Function To Be Seen
Hello,

I have a simple banner which rotates through three different movieclips. I would like to create a function on the main timeline that controls the length of delay for each of the clips.

So far this is what I have on the main timeline, which is a single frame:

_global.displayTime = function () {
startTime = getTimer();
MovieClip.prototype.onEnterFrame = function() {
currentTime = getTimer();
if (currentTime-startTime>2000) {
delete onEnterFrame;
nextFrame();
}
}
};

And on the timeline in each movie clip, here is how I'm calling the function each time I want to use it:

displayTime();
stop();

The function works when everything is on the main timeline, but not when I want it to drill down into a movieclip.

I apologize if the answer is really obvious and I don't see it. I've been trying to figure this out all day with no luck.

Thanks

A Truly Global Function ?
Hi I have a main movie which loads other movies into inner_mc for the main content.

I can access _global variables from either the parent or child movie but can not appear to either
1)access functions in the parent movie from the child movie
3)manage to gotoandplay/stop in the parent timeline from the child.

either of the above would solve my problems

I have tried _parent.gotoandplay(x) , _root.gotoandplay(x) etc to no avail , I have also tried _parent.function_name(); & _level0.function_name() etc from the child_mc

any pointer really appreciated , this is the last bit of my project & its driving me potty !

Global Function
i have the following function:


ActionScript Code:
info = function() {
};

Which is in the first keyframe of a seperate layer to the other code. This layer continues without keyframes, just normal frames taking the original code with it.

I need to be able to store info.data1 = "hi"; in say frame 1 and recall it in frame 6. My guess is the code I have is ressetting the function values on every frame the movie changes to.

How can I get this global, I tried, _global.info = function() {
}; but no luck.

Global Function
Hi,

is it possible to create a global function like in AS2? I tried a bit to
create a class that does it but wasn't succesfully. Well I am new to
class programming...


class rand {
public var random
public function random (to:int):int{
return Math.ceil(Math.random() * to);
}
}

How To Set Up Global Function
I am trying to unload an swf file that has been loaded into level 1 of a Flash MX EXE.

This is what I have so far...

1. A Flash MX EXE loads an swf file into level 1 - this works fine

2. On the first frame of the Flash MX EXE I have this script

_global.closeLevel = function(){
unloadMovieNum(1);
clearVars;
}

3. On the loaded swf file (on level 1) there is a button that has this script

onRelease(){
closeLevel();
}


4. When the button on the level 1 swf is clicked, the entire Flash MX EXE closes.

Any ideas on how I can get the the button on the level 1 swf file to unload the level 1 swf... leaving the root (Flash MX EXE) showing?

P.S. both movies are the same size, and cannot be modified (in size).

Help With A Global Function
ok. I searched. can't find exactly the answer to my question.

I have a bunch of little mC's that have a few frames that I'll be moving through frame by frame with buttons. rather than putting all the code to check currentfames, etc on each button (there's 25 of these mC's with two buttons each), I'd like to call a global function. I haven't been able to get it to work. here's the code:


in root timeline:

_global.nextPage=function(){
if(_currentframe < _totalframes){
nextFrame();
}
}


in mC, on button:

on(release){
_global.nextPage();
}


what am I doing wrong?

Help Using Global Function
I use this code on a movie clip Button to animate it and add the appriate onRelease link etc.

Code:


this.onEnterFrame = function() {
   if (rewind != true) {
      return undefined;
   }
   prevFrame();
};
this.onRollOver = function() {
   rewind = false;
   play();
};
this.onRollOut = function() {
   rewind = true;
   prevFrame();
};



however, i'm tring to get this to work as a global function which i can call from anywhere in order to save having it on every movie clip button. But i can't get it to work and my actionscript knowledge is still somewhat sketchy.... I'm at the point of trying to pull all my limited knowledge together to be able to see the big picture!!

anyway... i have this code declared in frame 1 of the root timeline

Code:


stop();

_global.aniButton = function() {
   this.onEnterFrame = function() {
      if (rewind != true) {
         return undefined;
      }
      prevFrame();
   };
   this.onRollOver = function() {
      rewind = false;
      play();
   };
   this.onRollOut = function() {
      rewind = true;
      prevFrame();
   };
};



and this code placed on the timeline of a Movie Clip, which is placed on the root timeline

Code:


this.onRollOver = function() {
   aniButton;
};



Unfortunately this isn't working so i'm hoping someone would be kind enough to point out where i'm going wrong! I think i'm getting relatively close but than again i'm not the expert!!

Ultimately i want to be able to call this function from an external .as file but one step at time for now

Thanks

Global Function Syntax
I need to convert the following into a global function:

function scroll (direction) {

//conditions etc

}

but none of my guessing works, its very simple i'm sure but nothing i've tried works..

many thanks

Invoke A Global Function From A MC?
Hi,

I know this might be a question for the Newbie forum but here goes anyway -

In MX, I have a function on the main time line, which fades in a MC:

Code:
inertia = 5;

function Fadein(by) {
this._alpha += (by - this._alpha)/_root.inertia;
}
How do I call it from an onClipEvent handler?
Will it even work?
Do I have to target the MC I'm invoking it from?

Arrrggghhhhh help!

I know I'm missing the obvious.

Actually I may have approached it in the wrong way, so this is what I'm trying to do:

I have about sixty movieClips which fade (and eventually spin ,move, etc) in at various times in this projector - I just want to write a global function, so I don't have to re-write all the code in an onClipEvent handler every time.

Cheers in advance for any help.

Stu

Making A Function() Global
Hi all

The Flash MX manual states that if a function is set with _global, you don't need to set the path to it when calling the function.

I've put my function in a frame on the main stage, and am trying to call it in the action script of a movie clip. How do I set the function to be globally accessible? In other words, where on earth do I add the _global command to achieve this? The manual doesn't elaborate.

Cheers. in advace.

Global Function In Flash
How can we write a Global function in flash. I want a same function to be used when I click different buttons.

How To Declare/use A Global Function
I have like 8 movieclips that have this code in all of their 1st frames.


Code:
this.onRollOver = function() {
this.gotoAndPlay(2);
}
stop();
How can i make a global function on the root so that all I have to do is call the function instead of reusing the code over and over again in each movie clip?

Thanks in advance!
Paul

P.S. How would I call it?

Global Function Problem
so in the first frame of my movie i made the function hitWall like:

Code:

_global.wallHit = function() {
for (i=1; i<=_root.needle.gun.shotCount; i++) {
if (this.hitTest(_root["shot"+i])) {
trace("hit a wall");
_root["shot"+i].removeMovieClip();
_root.needle.gun.shotCount = _root.needle.gun.shotCount-1;
}
}
};


and when I try to call it in a MC like:

Code:
onClipEvent (enterFrame) {
wallHit();
}


it doesnt work

anyone know what I'm doing wrong?


edit: im using MX

Global Variables Within A Function
Hey All,

Need a bit of help here. I'm trying to define a variable within an onLoad function that I could then access globally. Heres a WAY stripped down version of the function with a trace test that both works and then does not. Check it.....



---------- If I trace "monster" within the function it returns fine -------
themeData = new XML();
themeData.load("themes.xml");
totalThemes = new Array;

themeData.ignoreWhite = true;

function myOnLoad () {
totalThemes = themeData.childNodes;

for(a=0; a < totalThemes.length; a++){
randomTheme = random(totalThemes.length);
_global.WM = totalThemes[randomTheme].firstChild.attributes.webMarker;
wmColor = new Color();
wmSet = parseInt("0x" + [WM]);
wmColor.setRGB(wmSet);

}
trace(WM);
_global.monster = WM;
trace(monster);

}
themeData.onLoad = myOnLoad;

stop();




---------- But the trace outside the function returns undefined -------
themeData = new XML();
themeData.load("themes.xml");
totalThemes = new Array;

themeData.ignoreWhite = true;

function myOnLoad () {
totalThemes = themeData.childNodes;

for(a=0; a < totalThemes.length; a++){
randomTheme = random(totalThemes.length);
_global.WM = totalThemes[randomTheme].firstChild.attributes.webMarker;
wmColor = new Color();
wmSet = parseInt("0x" + [WM]);
wmColor.setRGB(wmSet);

}
trace(WM);
_global.monster = WM;


}
themeData.onLoad = myOnLoad;
trace(monster);
stop();







Any ideas? Need help on this one!!!!!!!!!

cheers
-jub

Global Function From A Class
Hello,

I defined a global function in my .fla file.
I try to access it from an object I created. The problem is, is doesn't work.

My code :

default.fla :

PHP Code:



// I create the object
var obj:MyObject = new MyObject();

// This function displays my error messages
// It should be accessible from everywhere, including the objects.
_global.errorMessage = function(str:String) {
    error_txt.text = str;
}




MyObject.as :

PHP Code:



class MyObject {
    function MyObject() {
        // I try to launch errorMessage() defined before
        errorMessage("There's an error.");
    }
}




When I compile the animation, Flash tells that the method named 'errorMessage' doesn't exist...

Can somebody help me?

Redefining A Global Function
Is there anyway to redefine the global loadMovie (not movieClip.loadMovie)?

I'm trying to avoid making an edit to a component.

At the very least, I need the global loadMovie to broadcast an event I can pick up on.

Global XML Function - Problems
Hi,

All my text content is from XML files. This means that I am loading and parsing a lot of xml files.

I am using global functions to achieve this (see code below)


Code:
//Parses contents of XML Files and places in an array: textfield[]
_global.gParseContent = function(content_xml) {
var items = content_xml.firstChild.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
if (items[i].nodeName == "text_block") {
textfield[i] = items[i].firstChild.nodeValue;

}
}
};
//We call this function and provide it with a path to the xml file.
//This will locate file, parse contents and add to an array
_global.gParseFile = function(path) {
var templateA_xml = new XML();
templateA_xml.ignoreWhite = true;
templateA_xml.onLoad = function(success) {
if (success) {
trace("xml file loaded");
trace(this);
gParseContent(this);
} else {
trace("Error loading XML file");
}
};
templateA_xml.load(path);
};


The idea is that each time I need to load XML content I simply provide the path of the xml file to the function :


Code:
gParseFile(path);


This would then populate the array textfield[] with the xml data.

The problem I have is that the array seems to retain some data from the previous xml parse, so I end up with a kind of hybrid array.

I have a feeling this is to do with the scope of the function.

Any input would be much appreciated.

T.

Function And Global Variables
ActionScript Code:
fileNamesLoadVars = new LoadVars();fileNamesLoadVars.load("getFilesNames.txt");fileNamesLoadVars.onLoad = function(){    _global.gFileNamesArray = this.fileNames.split("|");    trace(_global.gFileNamesArray.length); //which output successfully in output window as 7}for(i=0; i< _global.gFileNamesArray.length; i++){//do something here        }


ok.. i've got problem with the actionscipt above... this AS is inside a movieclip at the first frame. i've declared _global.gFileNamesArray = new Array(); in the main timeline(_root), but the problem is my 'for loop' which it couldn't get the global variable...

when i do a trace(_global.gFileNamesArray.length) outside the loadvars.load function it gives me 0...

any suggestions y..? how do i use the loadvars.load function to manipulate a global variable..?

i'm rather new to actionscript btw....

Global Function Call ?
I would like to be able to call a function from anywhere. So if you have a movieClip nested 5 levels deep and/or you have a swf in a swf in a swf you can still call this function.

Function And Global Variables
ActionScript Code:
fileNamesLoadVars = new LoadVars();fileNamesLoadVars.load("getFilesNames.txt");fileNamesLoadVars.onLoad = function(){    _global.gFileNamesArray = this.fileNames.split("|");    trace(_global.gFileNamesArray.length); //which output successfully in output window as 7}for(i=0; i< _global.gFileNamesArray.length; i++){//do something here        }


ok.. i've got problem with the actionscipt above... this AS is inside a movieclip at the first frame. i've declared _global.gFileNamesArray = new Array(); in the main timeline(_root), but the problem is my 'for loop' which it couldn't get the global variable...

when i do a trace(_global.gFileNamesArray.length) outside the loadvars.load function it gives me 0...

any suggestions y..? how do i use the loadvars.load function to manipulate a global variable..?

i'm rather new to actionscript btw....

[as 2] Best Way To Do Global Movieclip Function
In Flash MX I implemented a global fade function for the MovieClip class. I found it very helpful to fade items left and right. I want to implement the same functionality in Flash MX 2004 Pro. Should I still use the "MovieClip.prototype.fade" assignment or is there a better way?

Thanks in advance.

Just A Hint: Global Function
Hi folks,

Back again - I got many request asking if it's possible to create a global function.

You can create anything global with _global...

Here ist the function solution:


Code:
_global.myfunc = function () {
trace ("Hey I am global");
}
Call:

Code:
myfunc();
This is a global Function definition No timeline restrictions...

yours
Matze K.

Note: Movieclips are timeline based objects so don't try this with MC's.

Can You Call A Function Through A Global Variable?
Can any one help me with this little problem.
I 'm sure there is a way round it but i'd rather a more flexible soultion than lots of repetitive scripting.

I want to make a function the value of a global variable so that the _global variable can be used to execute the function.

The reason for this is that i have a button that i want the user to be able to assign different functions to.

the function i want to be able to execute is

_level1.drone3selection ();

(i'm calling a function in a loaded movie clip on level one)

i want to make this the subject of the global variable so that

_global.drone3draw = "_level1.drone3selection ();"

how do i then call this function by refferencing this global?

is it just ?
_global.drone3draw;

or is it

_global.drone3draw ();

can it be done like this?

if i trace like this
trace(_global.drone3draw);

I get exactly what i would normally type to execute the function directly.

ie. _level1.drone3selection ();

Any light on this issue would be very much appreciated.
it is crucial to me that i have the flexibility of making the command from the button flexible so it can call any fuunction that is related to it.
how do i do it?
cheers
Rob

Global Function Over All Scenes In The Movie
Hello.
I would like to call a function in several scenes. The function is defined in one of the scenes. How can this be done without writing its code in each scene?
Thanks.

Question About A Creating Global Function
Hello

I want to create a function that I will write it on the first frame of my movie, and than I will be able to call it from any frame or MC that I want in my entire movie.

I think it is called prototype or something like that, but even so I don't understand exactly how to do that.

can anyone help me???

Thank You!

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