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




Execute Statements Within A Loop



I use a loop to read an array and generate statements which set properties for movieclips (I'll try to paste the code on the bottom)

Within the loop the actions are being created in the correct format:
square1._x=300;

My movieclips (two squares) are on the same frame as the script.

The problem is that the actions do not execute within the loop. How do I get these lines to execute within the loop? I'm thinking I probably need to store them in variable(s) and write a function to execute them, but I'm not sure how to do this (or if its the right approach).

for (var i = 0; i<objectPropArray.length-1; i++) {
objectPropArray[i]["objName"]+_global.dot+_level0.objectPropArray[i]["propName"]+_global.equalSign+_level0.objectPropArray[i]["propValue"]+";";
}



FlashKit > Flash Help > Flash MX
Posted on: 07-31-2003, 05:53 PM


View Complete Forum Thread with Replies

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

Execute Several Statements Within One Button Handler?
Hi,
On click of a button, test.swf should load in the flashplayer and the x- and y-position of the mc "window" (which is situated in test.swf) should be set to 120 and 230.
I tried this:

on (release) {
loadMovieNum ("test.swf", 6);
_root._level6.window._x = 120;
_root._level6.window._y = 230;
}

test.swf is loading into level 6 but the window mc on test.swf doesn't change it's position.
It seems that flash cannot refer to a movie that has been just loaded in the player within the same Event Handler.
Does anyone know what to do about that?
Thanks!
mink

Do Trace Statements Execute Inside Of The Flash Player?
Or do they only execute inside of the Flash IDE test environment?

My guess is they do execute at runtime inside of the Flash player, as there's an option to publish with them omitted, but I'm not certain.

Just curious, and wondering in terms of performance.

Happy monday!

Execute Command Once In A Loop
Hi allz

maybe just a simple question.

is it possible in any way to execute a command only once in an enterFrame loop.

something like that

onEnterFrame = function(){

BLAH.gotoAndPlay(1); //Execute this only once in the whole loop

}

would be great if anyone got some ideas

thanks in advance

Why Would OnEnterframe Not Execute Within A For Loop
The clips are on the stage, they were dynamically placed there with attachMovie. Now I want to use a for loop to move them with the onEnterFrame event.


Code:
var clipNums = 6;
var counter = 1;
var targX = 300;
var targY = 500;


function displaceClips()
{

for (var k = 1; k <= clipNums; k++)
{
this.onEnterFrame = function ()
{

this["piece" + k]._x = (targX - this["piece" + k]._x)/5;
this["piece" + k]._y = (targY - this["piece" + k]._y)/5;
}
if (k == clipNums)
{
if (Math.ceil ((this["piece" + k]._x)) == targX)
{
delete this.onEnterFrame
}
}
}
}
//

displaceClips();

Thanks for your help in advance

Loop... Get From Array..... Execute....
welllllllll.............. i now have the loop....

for(i in _global.id) {

}

and i really need to execute code within that loop to compare variables.... eg


PHP Code:



_global.id = new Array();
    _global.id[ids] = new Array();
    _global.id[ids] = [];
    _global.id[ids] = [user, x, y]; //where user = username, x=x position,
 // y=yposition... and they are all dynamic

function checkid(id) { 
for (i in _global.id) {
if (_global.id[id][y]-_global.id[i][y] > 1000) { //just check if the y value of //user 1 - y value user i > 1000
return true 

} else {
return false
}
}





thanks a lot

Execute An Animation Loop Within EnterFrame Keylistener
Guys,

Need some help in figuring this out. I have this simple fighthing game im scripting in actionscript 3. mcPlayer is the name of my player mc where all the keyframe animation of the character are stored.



Im having problem scripting the heavy punch which requires 26 frames of animation. everytime when, the heavypunch key is hit, i will trigger a loop to complete the animation.

The problem is, this entire thing is running in a game loop, i need to somehow create a delay so that, the animation can be completed. Right now, the character is always playing the first frame of the sequence everytime i hit the punch button. below is the sample code.


ActionScript Code:
public function gameLoop(event:Event) {
    checkKeys();
    moveObjectInMemory();
    render();
}
       
public function keyUPFunction(event:KeyboardEvent) {
    if (event.keyCode == 37) {
        arrowLeft = false;
    } else if (event.keyCode == 39) {
        arrowRight = false;
    } else if (event.keyCode == 38) {
        arrowUp = false;
    } else if (event.keyCode == 40) {
        arrowDown = false;
    } else if (event.keyCode == 32) {
        lightPunch = false;
    } else if (event.keyCode == 88) {
        heavyPunch = false;
    }
}
       
public function keyDOWNFunction(event:KeyboardEvent) {
    if (event.keyCode == 37) {
        arrowLeft = true;
    } else if (event.keyCode == 39) {
        arrowRight = true;
    } else if (event.keyCode == 38) {
        arrowUp = true;
    } else if (event.keyCode == 40) {
        arrowDown = true;
    } else if (event.keyCode == 32) {
        lightPunch = true;
    } else if (event.keyCode == 88) {
        heavyPunch = true;
             }
}


//Below is the problem
public function checkKeys(){
if(heavyPunch){
    move_index = 0;
    while(move_index < 26){
        move_index++;
                 mcPlayer.gotoAndPlay(61+move_index);
    }
    heavyPunch = false;
}

Anyway, have experience in handling this?

For Loop, While Statements
I am having trouble with my for loops and while statements. When I put them in onClipEvents(enterFrame) the counters seem to be reseting to zero every frame. When I put these loops in frame actions with or without looping the frame they also don't work right. Could someone tell me were types of loops should be writen. Thanks in advance.
jahu

Seeing Which Variable Is Highest Using Loop And If Statements
hey all,

i have these variables,

var variables1 = 24;
var variables2 = 45;
var variables3 = 28;
var variables4 = 40;


var final:Number;

if(variable1 > variable2){
final = variable1;
}else{
final = variable2;
}

trace(final);

I have that for now but understand i will need a loop or an array or a for statement so i can get it to work with more than just two variables..

please help! its very urgent.

GEN Quest. About Conditional/loop Statements
Hi there,

Any ideas to the following conditional/loop action question much appreciated..

As long as no onRelease takes place my_mc is playing frame 1 up to frame 28, where a frame-script then tells the playhead to go to 1 and play from there again.
But when the onRelease event is issued the playhead should continue to play from whatever position it is at at the time, but ignore the script on frame 28 as it gets there and play up to frame 41 - the end of my _mc's timeline.

I'm confused by some of the info I have read on the subject of loops, where it said that For...in, Do while, For and While are no solution for this, as they would bring Flash to a halt. So I thought of a syntax, something like:
if (this._currentframe<28 ){
this.gotoAndPlay (_currentframe+1)
else if (this._currentframe ==28 ){
this.gotoAndPlay (29)
}
}; ..... (The idea is to jump over -or bypass- the frame which holds the script to go back to frame 1, and is only a mind spin NOT PROPPER CODE!)
If there is a way to include frame28 (as opposed to having to jump over it) it would be ideal, since the animation on the timeline wouldn't suffer the loss of 1 frame, but I'd be prepared to live with that.

It's funny, as I would have thought conditional scripts to achieve things like this to be one of the 1st things to be clearly & easily explained in the MM Flash tuts (or one of the thousends online, or forums), but either it really is something so profanely easy that no example is necessary (apart from for me ) or I must be looking right passed the obvious (wouldn't be the 1st time )

Any ideas on what would be good to use here??

Generate Nested Switch...Case Statements Via Loop?
If the subject isn't entirely clear, it's because I'm not sure how to describe what I want to do. What I have currently is a large group of ComboBox components which trigger an event handler, which uses a Switch...Case statement to determine the selection, and then uses another Switch...Case to figure out which ComboBox actually called it so the function called can use the appropriate arguments. The way I have it written has bloated the code, so I'm wondering if there's a shorter way to do this.


Code:
function change(evt) {
num = evt.target.selectedItem.data;
switch (num) {
case "ltgold" :
row_style_for_menu = 'ltgold';
switch (evt.target) {
case stylemenu1 :
set_row_style('1', row_style_for_menu);
menu_index_1 = 0;
trace('one');
break;
case stylemenu2 :
set_row_style('2', row_style_for_menu);
menu_index_2 = 0;
trace('two');
break;
case stylemenu3 :
set_row_style('3', row_style_for_menu);
menu_index_3 = 0;
trace('three');
break;
}
break;
case "dkgold" :
row_style_for_menu = 'dkgold';
switch (evt.target) {
case stylemenu1 :
set_row_style('1', row_style_for_menu);
menu_index_1 = 1;
trace('one');
break;
case stylemenu2 :
set_row_style('2', row_style_for_menu);
menu_index_2 = 1;
trace('two');
break;
case stylemenu3 :
set_row_style('3', row_style_for_menu);
menu_index_3 = 1;
trace('three');
break;
}
break;
case "ltred" :
row_style_for_menu = 'ltred';
switch (evt.target) {
case stylemenu1 :
set_row_style('1', row_style_for_menu);
menu_index_1 = 2;
trace('one');
break;
case stylemenu2 :
set_row_style('2', row_style_for_menu);
menu_index_2 = 2;
trace('two');
break;
case stylemenu3 :
set_row_style('3', row_style_for_menu);
menu_index_3 = 2;
trace('three');
break;
}
break;
}
}

My Variables Load With LoadVars...how Do I Execute A Loop To Assign Variables?
I have 52 (one for each week) duplicated MCs, a loadVars(), and variables "sermonTitle" and "airDate," which I'm trying to assign with the following:

this.airDate=_root.loadContent["airDate" + sermonDate];
this.sermonTitle=_root.loadContent["sermonTitle" + sermonDate];

which is placed in an onClipEvent (enterFrame) handler of the button which is duped . The vars load when I click Video > 2001.

The vars loaded have values named sermonTitle1, sermonTitle2, etc. and the same for airDate. The numbers attached reference the sermonDate which has already been assigned though my duplicateMovieclip loop:

num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
trace(this["b"+n].sermonDate);
n = n + 1;
}

I've tried attaching the assign code to the dupMovieClip loop:

num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
this["b"+n].airDate = "airDate" + n;
this["b"+n].sermonTitle = "sermonTitle" + n;
trace(this["b"+n].sermonDate);
n = n + 1;
}
setProperty("b", _visible, 0);

and it works - as far as assigning the correct value to the correct button, but it does not associate the loaded vars with them.

The SWF is VERY sluggish, though, which makes me think the onclipEvent is not the best way of assigning vars. I get the trace(this) showing all of the variables loading, so I know that's not the problem.


Does anyone know how to best assign these? I have been advised to use a loop for it. How would I go about executing a loop for this, as I will have navs loading in different text files - Thanks

Link to SWF:
HERE

Super Newbie Question: Using Multiple IF Statements, For One ELSE Statements
What i want to make ... is

on (release) {
if (part.text == 1) {
gotoAndStop(random(1)+4);

if (part.text == 2) {
gotoAndStop(random(2)+4);

} else {
gotoAndPlay(33);
}
}

that doesnt work for some reason.. Any ideas why? Thanks!

Execute App?
Hi, I'm new to flash. I am trying to create a flash desktop.
Is it possible to launch an app from a flash movie?
say for instance if I wanted to have it open notepad when I click on a button or graphic.

Execute Php
is there ohter way to call and execute php file rather than
loadVariables("file.php",this);
Thanks

Execute A Roo
is it possible to execute an external file through flash mx?

Execute URL?
Hi, I'm building a menu for my desktop. I'm using flash 5 and Win98. I have a button that should open a program when clicked (eg. Internet Explorer). when using GetURL It starts to download the file, and asks me if I want to save or open. Is there a way to avoid this, such as a function that will execute a URL?

Thanks for your time.

How Do I Execute My .xvb?
I have a vxb script that i would like to launch, instead of an .exe i tried to change it in the fscommand, but it wasn't working, is this possible?

Let me rephrase this.
I have an exe file that will run different kinds of .xvb scripts. But i would like NOT to have to go through all the clicks to get to the .xvb script i want, how do i tell my button to launch my exe, and then use a particular .xvb file?

what i'm thinking is something like this, maybe someone else may get the idea of what i'm thinking of:

on (press) {
fscommand("exec","myProgram.exe", "mySubScript.xvb")
}


I want to "pinpoint". Have myProgram.exe open, but have the "mySubScript.xvb" already loaded up & ready to go.

Self Execute
hi I want to create a flash projector that (is self executable)will start playing once a person loads it in their cd-rom drive i want to create this on a PC but i would like it to self execute on a mac as
well. thanks in advance

Can't Execute
I have a file that is identified as :
Collecting data from file: carol
93.8% (.EXE) Macromedia Projector/Flash executable (1121580/11/184)
3.1% (.EXE) Win32 Executable MS Visual C++ (generic) (37706/45/16)
1.0% (.SCR) Windows Screen Saver (13105/51/3)
0.8% (.EXE) Win32 Executable Generic (10527/13/4)
0.6% (.DLL) Win32 Dynamic Link Library (generic) (7600/42/2)
but I am unable to execute it..What do I need to run it?

Execute
Hey Guys....

Need some help in executing Command Prompt from flash. Can somebody post the script.

Xml Won't Execute On IE7
Here's my problem, I have a banner that is supposed to dynamically load 4 sets of images at the same time. I didn't know how to do this using 1 xml file since I'm only starting to use xml with flash, so I created 4 xml files for each set of images and based my AS on those 4 files. So far so good. Everything seems to work ok when I run the swf directly, but if I try to run it on Internet Explorer it won't open de images.
I read somewhere that someone had a similar problem and that it was due to some I.E. security issue regarding xml. But it didn't have a answer as how to fix it. I'll attach one of my xml files since they are all basically the same.
Here's my AS:

Code:
delay = 2000;
delay2 = 3000;
delay3 = 4000;
delay4 = 5000;
//-----------------------
clearInterval(myInterval);
clearInterval(myInterval2);
clearInterval(myInterval3);
clearInterval(myInterval4);
////--------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
firstImage();
}
}
}
function loadXML2(loaded2) {
if (loaded2) {
xmlNode = this.firstChild;
image2 = [];
description2 = [];
total2 = xmlNode.childNodes.length;
for (i=0; i<total2; i++) {
image2[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
firstImage2();
}
}
}
function loadXML3(loaded3) {
if (loaded3) {
xmlNode = this.firstChild;
image3 = [];
description3 = [];
total3 = xmlNode.childNodes.length;
for (i=0; i<total3; i++) {
image3[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
firstImage3();
}
}
}
function loadXML4(loaded4) {
if (loaded4) {
xmlNode = this.firstChild;
image4 = [];
description4 = [];
total4 = xmlNode.childNodes.length;
for (i=0; i<total4; i++) {
image4[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
firstImage4();
}
}
}
xmlData1 = new XML();
xmlData2 = new XML();
xmlData3 = new XML();
xmlData4 = new XML();
xmlData1.ignoreWhite = true;
xmlData2.ignoreWhite = true;
xmlData3.ignoreWhite = true;
xmlData4.ignoreWhite = true;
xmlData1.onLoad = loadXML;
xmlData2.onLoad = loadXML2;
xmlData3.onLoad = loadXML3;
xmlData4.onLoad = loadXML4;
xmlData1.load("images01.xml");
xmlData2.load("images02.xml");
xmlData3.load("images03.xml");
xmlData4.load("images04.xml");
p = 0;
c = 0;
d = 0;
n = 0;
this.onEnterFrame = function() {
filesize1 = container01.getBytesTotal();
loaded1 = container01.getBytesLoaded();
if (container01._alpha<100) {
container01._alpha += 10;
}
filesize2 = container02.getBytesTotal();
loaded2 = container02.getBytesLoaded();
if (container02._alpha<100) {
container02._alpha += 10;
}
filesize3 = container03.getBytesTotal();
loaded3 = container03.getBytesLoaded();
if (container03._alpha<100) {
container03._alpha += 10;
}
filesize4 = container04.getBytesTotal();
loaded4 = container04.getBytesLoaded();
if (container04._alpha<100) {
container04._alpha += 10;
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded1 == filesize1) {
container01._alpha = 0;
container01.loadMovie(image[p], 1);
slideshow();
}
}
}
function nextImage2() {
if (c<(total2-1)) {
c++;
if (loaded2 == filesize2) {
container02._alpha = 0;
container02.loadMovie(image2[c], 1);
slideshow2();
}
}
}
function nextImage3() {
if (d<(total3-1)) {
d++;
if (loaded3 == filesize3) {
container03._alpha = 0;
container03.loadMovie(image3[d], 1);
slideshow3();
}
}
}
function nextImage4() {
if (n<(total4-1)) {
n++;
if (loaded4 == filesize4) {
container04._alpha = 0;
container04.loadMovie(image4[n], 1);
slideshow4();
}
}
}
function prevImage() {
if (p>0) {
p--;
container01._alpha = 0;
container01.loadMovie(image[p], 1);
}
}
function prevImage2() {
if (c>0) {
c--;
container02._alpha = 0;
container02.loadMovie(image2[c], 1);
}
}
function prevImage3() {
if (d>0) {
d--;
container03._alpha = 0;
container03.loadMovie(image3[d], 1);
}
}
function prevImage4() {
if (n>0) {
n--;
container04._alpha = 0;
container04.loadMovie(image4[n], 1);
}
}
function firstImage() {
if (loaded1 == filesize1) {
container01._alpha = 0;
container01.loadMovie(image[0], 1);
slideshow();
}
}
function firstImage2() {
if (loaded2 == filesize2) {
container02._alpha = 0;
container02.loadMovie(image2[0], 1);
slideshow2();
}
}
function firstImage3() {
if (loaded3 == filesize3) {
container03._alpha = 0;
container03.loadMovie(image3[0], 1);
slideshow3();
}
}
function firstImage4() {
if (loaded4 == filesize4) {
container04._alpha = 0;
container04.loadMovie(image4[0], 1);
slideshow4();
}
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
function slideshow2() {
myInterval2 = setInterval(pause_slideshow2, delay2);
function pause_slideshow2() {
clearInterval(myInterval2);
if (c == (total2-1)) {
c = 0;
firstImage2();
} else {
nextImage2();
}
}
}
function slideshow3() {
myInterval3 = setInterval(pause_slideshow3, delay3);
function pause_slideshow3() {
clearInterval(myInterval3);
if (d == (total3-1)) {
d = 0;
firstImage3();
} else {
nextImage3();
}
}
}
function slideshow4() {
myInterval4 = setInterval(pause_slideshow4, delay4);
function pause_slideshow4() {
clearInterval(myInterval4);
if (n == (total4-1)) {
n = 0;
firstImage4();
} else {
nextImage4();
}
}
}
So if anyone has an idea of how to solve this I would appreciate it. Thanks in advance for any tip.

Execute
Hey Guys....

Need some help in executing Command Prompt from flash. Can somebody post the script.

How Do I Execute Programs?
I'm trying to use Flash to design and build an interface for a CD. However, I have not been able to reliably get Flash to execute files. The closest thing that I can do is have it try to download it from my HDD or CD. Is there a reliable way to get Flash to just execute a program? Thank you for any help.

Execute Program?
Anyone can help??
Can Actionscript execute program??
If can, How to?

As To Execute Applications *.EXE ?
as to execute applications EXE into FLASH MX ???

Execute Once Loaded
using flash 6. i load movieB into an instance of movieA and i dont want movieA to execute the next frame until movieB is entirely loaded. ive tried attaching onEvent(load) onto the instance where i load movieB to no avail. am i on the right track?

thank you

Fscommand Execute *.exe *.bat
Flash MX
I was used to run executables with flash 5, but when i used MX this all didn't work like it used???
who? can? help? me?

Need To Execute LOADER
Created a loader seperate from my website, need to execute the loader before the website appears. How do i do this. When someone goes to my website the loader must "load" bf my WSite. Thank you for any help you can give. P.S. didnt mean to repeat myself.

If Do Not Compare But Execute....?
Hi everybody

I have a problem while scripting a little preloader. Everything goes well until I want a comparison to be made with a "if". I don't know why but my if do not combare but execute what i have to compare. For example:

if (a._width=b._width){
gotoAndPlay(4);
}

if i execute, it will do this : the width of a will be equal to the width of b.... Is there somebody who know what is wrong.
thanks.

Vakarm
here's my frame script:


var vcharge=getBytesLoaded();
var vtotal=getBytesTotal();
var vpourcent=math.ceil((vcharge/vtotal)*100);
//vfondbarretotal is the width of the background of my loading bar.
mcbarre._width=(vfondbarretotal*vcharge)/vtotal;

if (mcfondbarre._width=mcbarre._width) {
gotoAndPlay(4);
}
gotoAndPlay(2);

Execute A Function Each 2 Sec
Hi. Im writting a function to display a graphic, but I want it to draw the graphic slowly. So, I wrotte a function, whose argument is y, and tried to do this, on my scene's 1st keyframe:

controlY = 0;
tempo = 500;
function moveOn() {
gotoAndPlay(2);

}
timer = setInterval(moveOn(), tempo);
y = 1; // I would give the arg somewhere else, but this is a trial
function pos(y) {
trace("foi"+controlY); // if i would see this, then the function works
// y=ax2+bx+c to remember the equation
x = 2;
attachMovie("dot", "dot"+y, 1);
setProperty("dot"+y, _x, x);
setProperty("dot"+y, _y, controlY);
controlY++;
}


and on my 2nd keyframe:
gotoAndPlay(1);
clearInterval(timer);

Auto Execute
ok, is there a code to put into a flash doc that will make my swf file, on a CD, automatically execute? Like you put it in the cd drive and it will automatically start your swf file. Thanks for any help.

Execute Every 3 Seconds
Hi,

How can I get some code to execute every 3 seconds?

I tried to define a static variable to get the start time and then I can start from there, but it kept returning errors.

Any help will be very much appreciated.
Thanks

Pause/execute/pause/execute - HELP
I'm trying to pause something, run the function, when the function is done running, pause again and then execute. What have below works for the first pause and execute:

startTime = getTimer();
this.onEnterFrame = function() {
currentTime = getTimer();
if (currentTime-startTime>4000) {
// do something cause 4 seconds have passed
moveItUp();
delete this.onEnterFrame;
}
};

what I'd like to do is this:
run moveItUp(); after 4 seconds, run another function called moveItUpTop();

I tried placing the first bit of code within moveItUp and it didn't work. What am I doing wrong here? Do I have to clear the timer?

[F8] How Do I Execute A PPS (PowerPointSlideShow)
How do i execute a PPS (PowerPointSlideShow) in a flash 8 presentation???

It is a user driven presentation that has a "next" and "back" button to take them from slide to slide. On one of the slides i need it to execute a PPS that will open ontop of the FLASH ( it is on FULLSCREEN mode aswell ) so that it can play and once complete the user will close the PPS and resume back with the Flash presentation.

Please help my deadline is tomorrow and i have no idea how to do this.
Currently i tried the script:

fscommand("exec", "Shift Happens.pps");

Which doesnt work.

Thanks
Dru

Execute Functions One After Another
I would like to make a function that could execute other functions

execute the one after another - in a manner that the next function is executed only after the one before has finished its task

I have been thinking about how to achieve this but haven`t come up with anything good.

If you have any ideas please share


Thanks in advance

Execute Text
I'm reading in commands from a text file. Anyone know how to execute the variable the commands are stored in?

Execute A String?
I am sooo frustrated... I've spent the last 2-3 hours trying to figure this out. I can't.

I did this sort of thing once before... I think it's possible.

Here's what I'm trying to do:

_parent.module_sounds.loadmovie("module_sounds.swf ");
I'm trying to do it this way:

whichMovie = "module_sounds"
MovieToLoad = "_parent."+whichMovie+".loadmovie('"+whichMovie+". swf');
????ExecuteString?????(MovieToLoad);

I'm trying to build this line out of assembled variables... and then have actionscript execute the line. I don't know how to do it... I've searched Google... and the actionscript dictionary. Nothing is familiar.

This is probably a rookie question to all of you experts out there... sorry. lol.... I am not finding my answers out there... can somebody please tell me how do I write the above code properly?

I'm properly not using the proper lingo. I'm sorry... I'm self taught. Please help me guys! I'm creating a pre-loader and I want it to cycle through an array... 1 movie at a time. that's why it's important that I figure this out.

Execute Php Script
hi, i have an scrip in php, and i want to tell flash to execute that php. is this possible? thanks

Function Does Not Execute At First
Right. I'm having a lot of strange bugs in this project I'm doing. Actual bugs in Flash that get saved into my fla but I managed to get it to work at the end.

Just 1 strange behaviour left.. Please, please advise if you recognise this;

- Timeline enters movieclip frame for the first time.
- I call a function to execute, it does not.
- Normal commands do execute on that frame.
- After this first denial my functions execute when I enter the same frame.

This happens everywhere in my .fla ...

Does anybody know what the H is going on?

Wait Max 5 Sec, Then Execute
have 6 buttons.
When a user dont drag his mouse over one or more of these buttons for about 5 sec.
a mc should run and tell the user "please drag your mouse over these 6 buttons."

And when the user do this, the message should dissapear.

Please how should the code look like.
I should really appreciate that.

Whait Max 5 Sec And Then Execute
Sorry, I just saw that my question has been posted under wrong forum.
Really sorry for that.

I have 6 buttons.
When a user dont drag his mouse over one or more of these buttons for about 5 sec.
a mc should run and tell the user "please drag your mouse over these 6 buttons."

And when the user do this, the message should dissapear.

Please how should the code look like.
I should really appreciate that.

Execute OnEnterFrame
ok, should this work or am i barking up the wrong tree?


Code:
onEnterFrame = traceMe("test")

traceMe = function(param){trace(param)
}
if that won't work then would someone explain how you get something to exectue a predefined function and pass a variable...

Execute An Exe File
Hi Friends,

How We Open An exe File Using Flash Swf Or Exe File.
I Use fscommand exec .But It Cant work.
Also How Open If The exe File Is In cd.
ie,Execute A Setup Program Using Flash File.

Execute OnEnterFrame
ok, should this work or am i barking up the wrong tree?


Code:
onEnterFrame = traceMe("test")

traceMe = function(param){trace(param)
}
if that won't work then would someone explain how you get something to exectue a predefined function and pass a variable...

Flash Does Not Execute JS In IE
Hi everyone

I hope someone can help with my following problem:
I have a flash file with some images seperated by 8 pixels. Each image has a rollover and rollout effect:

Code:
on(rollOver)
{
stop();
//makes a div in the page visible
getURL("javascript: open_pop(popup1)");
}

on(rollOut, keyPress "<Backspace>", dragOut, releaseOutside, press, dragOver)
{
//hides the div
getURL("javascript: close_pop(popup1)");
play();
}
In IE when you move the cursor really quickly over the 8px gap the popup div is not closed/hidden although if you move slowly it is and it works slow or fast in firefox. If you move of the image file all together (not onto anothe image) then the div is hidden.

Does anyone have any ideas of why?

Regards
P_h_p

Execute Functions One After Another
I would like to make a function that could execute other functions

execute the one after another - in a manner that the next function is executed only after the one before has finished its task

I have been thinking about how to achieve this but haven`t come up with anything good.

If you have any ideas please share


Thanks in advance

I Need Execute A .dir Or .pdf By A Button In Swf
Hi, I wanna execute a presentation in director and a few pdf files, but I donīt know use the fscommand scritp.

I use only exe but nothing

Can you help me?

Thanks

What That Script Will Execute ?
Stage.scaleMode = "noScale";
Stage.align = "TC";
stop ();
_root.g_page = 0;
_root.page = 0;

[as1] How To Execute A MovieClip? Help
ActionScript Code:
onClipEvent (load) {
    function fear() {
        this.onEnterFrame = function() {
        };
        letterHold1 = new Array("B", "C", "D", "E");
        startHold1 = new Array(2, 2, 2, 2, 2);
        for (var b = 0; b<4; b++) {
            for (var a = startHold1[b]; a<=9; a++) {
                if (_root["boxx"+letterHold1[b]+a].holder._currentframe == 13) {
                    _root["boxx"+letterHold1[b]+a].holder.gotoAndPlay("light_off");
                }
            }
        }
        letterHold2 = new Array("F");
        startHold2 = new Array(1, 1, 1, 1, 1);
        for (var b = 0; b<3; b++) {
            for (var a = startHold2[b]; a<=7; a++) {
                if (_root["boxx"+letterHold2[b]+a].holder._currentframe == 13) {
                    _root["boxx"+letterHold2[b]+a].holder.gotoAndPlay("light_off");
                }
            }
        }
        letterHold3 = new Array("A");
        startHold3 = new Array(4, 4, 4, 4, 4);
        for (var b = 0; b<3; b++) {
            for (var a = startHold3[b]; a<=9; a++) {
                if (_root["boxx"+letterHold3[b]+a].holder._currentframe == 13) {
                    _root["boxx"+letterHold3[b]+a].holder.gotoAndPlay("light_off");
                }
            }
        }
        letterHold4 = new Array("A");
        startHold4 = new Array(1, 1, 1);
        for (var b = 0; b<3; b++) {
            for (var a = startHold4[b]; a<=3; a++) {
                if (_root["boxx"+letterHold4[b]+a].holder._currentframe == 13) {
                    _root["boxx"+letterHold4[b]+a].holder.gotoAndPlay("color");
                }
            }
        }
        if (_root.boxxF8.holder._currentframe == 13) {
            _root.boxxF8.holder.gotoAndPlay("color");
        }
        if (_root.boxxF9.holder._currentframe == 13) {
            _root.boxxF9.holder.gotoAndPlay("color");
        }
        delete this.onEnterFrame;
    }
    fear();
}

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