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








SetInterval Not Working In Flash 8


I am trying to load a movie play to end then load a next movie play to the end. But the code just does not work. Here is a sample code. If you could help me I would really appreciated it. This works using attach sound.

stop();
_root.createEmptyMovieClip(_root.container, 1);
_root.container._x = 94;
_root.container._y = 200;
loadMovie("vru1_3.swf", _root.container);
function callback1() {
nextFrame(2);
}
setInterval(callback1, 3000);




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-20-2006, 07:29 AM


View Complete Forum Thread with Replies

Sponsored Links:

SetInterval Not Working
On my first frame, I have put this code:

maxTime = 30; //in secs.
setInterval(myTimer, 1000);
stop();


function myTimer(){
maxTime--;
updateAfterEvent();
}


I have a dynamic text box on the first frame too, and it is link to the maxTime var. When i test the movie, it shows only 29 and never gets updated. What is wrong with my code?

View Replies !    View Related
SetInterval Not Working For Me
Hi,

I'm trying to repeatedly execute a function while a button is rolled over, and another while rolled out. The callback functions work fine if the setInterval is not there (though for only one frame at a time), but do not respond with the setInterval. Does anyone see what my problem is? It seems so simple, yet it's not working. The code was put on the _root timeline, by the way, and I'm using MX.


code: purpleButton_mc.onRollOver = setInterval(getBig, 100);
purpleButton_mc.onRollOut = setInterval(getSmall, 100);




function getBig() {
this._width *= 1.1;
this._height *= 1.1;
}
function getSmall() {
this._width /= 1.1;
this._height /= 1.1;
}



TIA,
aaroneousmonk

View Replies !    View Related
SetInterval Only Working Once
ok. i have a button that, when it's clicked, will call the setInterval command, wait one second, and then load a movie. i have another button that unloads the movie and clears the interval. this all works fine.

the problem is, if i try and click the button to load the movie again, nothing happens.

here's my code on the button to load the movie:

code:
on (release){
_root.timerInterval = setInterval(_root.runTimer, 1000, "about");
}


here's the function on frame one of the main timeline:

code:
var timer = 0;
var timerInterval;

function runTimer(mc) {
timer += 1;
if (timer == 1) {
loadMovie(mc + ".swf",_root.empty_mc);
clearInterval(timerInterval);
}
}

View Replies !    View Related
SetInterval Not Working In I.E.
I have a flash 9 app that calls a php script that in turn pulls in some variables from txt files. The function within the flash file that calls the php script operates via a setInterval() function. For some reason, this works fine in Firefox and Safari, but in IE the swf fails to update the fugures unless i clear the cache and reload the page..rather than the setInterval() function doing so every 60sec...

Can someone please advise me as to possible problems/workarounds?....

Thankyou in advance

View Replies !    View Related
Why Isn't This SetInterval Working?
I'm trying to create a wipe, where a bar expands vertically from the top to the bottom. This was accomplished with a motion tween. Now, I'm trying to use AS to duplicate that one bar across the screen, and this is done inside a movieclip, and the movieclip is on the main stage and it is setMask(my_mc); to reveal an image beneath.
Here's the code I'm using:


ActionScript Code:
totalBars = Math.round(Stage.width/bars._width);i = 0;duplicate = function () {    if (i <= totalBars) {        i += 1;        bars.duplicateMovieClip("bars"+i, this.getNextHighestDepth());        this["bars"+i]._x = i*bars._width;    }else{clearInterval(intervalID);}};var intervalID = setInterval(duplicate, 10);


But it doesn't work!

View Replies !    View Related
SetInterval Not Working For Me
Morning folk, I am a new user to both Kirupa.com and AS2, and probabaly like most of you came upon Kirupa as I was trying to search for a solution to my problem. Here it is:

I am trying to increment through a multidimensional array with a for loop to present the associated photo for five seconds before moving on to the next. The photos are arranged by categories that are important to their presentation - - thus the two dimensioned array. I am trying to work with "setInterval" but apparantly not correctly because dispite the function call and a 5000 delay, the program plows immediately through to the last photo and then presents it and only it. Can anyone point me in the direction of a solution (again, because I have limited experience with flash, code suggestions would be most helpful).

Thanks for any help.

View Replies !    View Related
Why Isn't This SetInterval Working?
I'm trying to create a wipe, where a bar expands vertically from the top to the bottom. This was accomplished with a motion tween. Now, I'm trying to use AS to duplicate that one bar across the screen, and this is done inside a movieclip, and the movieclip is on the main stage and it is setMask(my_mc); to reveal an image beneath.
Here's the code I'm using:


ActionScript Code:
totalBars = Math.round(Stage.width/bars._width);i = 0;duplicate = function () {    if (i <= totalBars) {        i += 1;        bars.duplicateMovieClip("bars"+i, this.getNextHighestDepth());        this["bars"+i]._x = i*bars._width;    }else{clearInterval(intervalID);}};var intervalID = setInterval(duplicate, 10);


But it doesn't work!

View Replies !    View Related
Need Delay, SetInterval Not Working
I've written some code that attaches n number of movieClips, scales them random, and then blows them across the stage with some gravity applied. It simulates wind. I've got an onEnterFrame() that keeps the gravity and wind applied and resets the clips x and y when they leave the stage. Well, here's the code:


Code:
var numLeaves:Number = 15;

for(i=1; i<=numLeaves; i++){
trace(i);
xStart = Math.random()*-200;
yStart = Math.random()*(Stage.height-50)-150;

trace("falling X= "+xStart+" falling Y= "+yStart);

this.attachMovie("box","box"+i,i,{_x:xStart, _y:yStart});

_root["box"+i]._yscale = Math.random()*100+50;
_root["box"+i]._xscale =_root["box"+i]._yscale;
}

this.onEnterFrame=function():Void{
for(i=1; i<=numLeaves; i++){
gravityWind(_root["box"+i]);
reset(_root["box"+i]);
}
}
That's probably more than I need to show, but I want to be clear. The problem right now is that it creates all the clips and sets their positions and they blow across the screen. I need to delay the attachment of each clip by a number of milliseconds so they don't blow across the screen all at once. I used setInterval in the for loop to no avail, I've actually tried placing the interval just about everywhere. Any Ideas on how to delay it?

View Replies !    View Related
SetInterval Not Working With Buttons
Hi
I'm trying to create a memory game. I'm using individual buttons containing two movie clips. One movie clip acts as a cover and the other movie shows the graphic.

When a user clicks on the cover, the button displays the graphic. This is where I have trouble because the graphic is displayed for a few seconds, but then goes forth and back to the cover and doesn't stop.

HOW TO STOP THE MOVIE FROM GOING FORTH AND BACK -graphic to cover-?
In other words, once the buttons is clicked it starts looping from graphic to cover and doesn't stop.


This is the script on the graphic frame.

var id = setInterval();
var id = setInterval(function(){}, 5000);
var id = setInterval(function() {
}, 5000);


var id = setInterval(function() {
play();
}, 5000);


stop();
var id = setInterval(function() {
play()
clearInterval(id);
}, 5000);



This is the code on the button

on(release){
_root.mc1.gotoAndStop("graphic");
}


German

View Replies !    View Related
SetInterval And Conditionals Not Working
Hi everyone;

Please help me solve this problem. I am working on a matching game. For each card I have created a movie clip with two frames. One is the cover and the other is the graphic. When the user clicks on the cover, the graphic is displayed.



I declared variables for each card, for example:

var a:Boolean= false;
var b:Boolean=false;
var c:Boolean= false;
var d:Boolean= falese;

Each card has its own button. When each button is pressed, a variable becomes true.
Here is the code for the first button, which is an instance of the movie clip cover.

on(press){
a=true;
_root.cover.gotoAndStop("two");
}

I would like to use setInterval to wait for the matching card to be displayed. If the matching graphic is displayed, both (for example, cover and cover_1) movie clips would be reduced to 50%. If the next card IS NOT the matching card, I would like each movie clip go back to its frame one, which is the cover.

Here is the code in the second frame of COVER .


function one() {
if(b==true){
_root.cover._xscale=50;
_root.cover._yscale=50;
}
else {
_root.cover.gotoAndStop("one");
}
clearInterval (pause);
}
pause = setInterval(one, 5000);


COVER_1

button
on(press){
b=true;
_root.cover_1.gotoAndStop("two");
}


Here is the code in the second frame of COVER_1 .

function one() {
if(b==true){
_root.cover_1._xscale=50;
_root.cover_1._yscale=50;
}
else {
_root.cover_1.gotoAndStop("one");
}
clearInterval (pause);
}
pause = setInterval(one, 5000);


The setInterval works, BUT THE CONDITIONAL IS NOT RECOGNIZING THE VARIABLES.

Please tell me how to fix the script.


German

View Replies !    View Related
SetInterval And If Not Working Properly
Hi everyone;

Please help me solve this problem. I am working on a matching game. For each card I have created a movie clip with two frames. One is the cover and the other is the graphic. When the user clicks on the cover, the graphic is displayed.



I declared variables for each card, for example:

var a:Boolean= false;
var b:Boolean=false;
var c:Boolean= false;
var d:Boolean= falese;

Each card has its own button. When each button is pressed, a variable becomes true.
Here is the code for the first button, which is an instance of the movie clip cover.

on(press){
a=true;
_root.cover.gotoAndStop("two");
}

I would like to use setInterval to wait for the matching card to be displayed. If the matching graphic is displayed, both (for example, cover and cover_1) movie clips would be reduced to 50%. If the next card IS NOT the matching card, I would like each movie clip go back to its frame one, which is the cover.

Here is the code in the second frame of COVER .


function one() {
if(b==true){
_root.cover._xscale=50;
_root.cover._yscale=50;
}
else {
_root.cover.gotoAndStop("one");
}
clearInterval (pause);
}
pause = setInterval(one, 5000);


COVER_1

button
on(press){
b=true;
_root.cover_1.gotoAndStop("two");
}


Here is the code in the second frame of COVER_1 .

function one() {
if(b==true){
_root.cover_1._xscale=50;
_root.cover_1._yscale=50;
}
else {
_root.cover_1.gotoAndStop("one");
}
clearInterval (pause);
}
pause = setInterval(one, 5000);


The setInterval works, BUT THE CONDITIONAL IS NOT RECOGNIZING THE VARIABLES.

Please tell me how to fix the script.


German

View Replies !    View Related
Using SetInterval Within A Class? Not Working
function onLoad(){
trace("Calling SetInterval");
setInterval(this,"resizeImage",1000);
}

function resizeImage() {

}

Why is this setInterval not working? I am using this code within a class.

Thanks

View Replies !    View Related
SetInterval Not Working As Expected
I used setInterval to fade the main sequence of my page. It works, but for some reason no matter what I change setInterval to, it does it at the same speed of 30 frames per second. So if it has to set the Alpha level from 100% to 0% it will take 3.3 seconds. You can see it here: Http://www.dhicompany.com. Does anyone know why this is or how to fix it?

Quote:




stop();
function fadeOut(){
_root.loaderClip._alpha--;
_root.barLoad1._alpha--;
_root.barLoad2._alpha--;
updateAfterEvent();
if(_root.barLoad2._alpha<=0){
clearInterval(timer);
_root.gotoAndPlay("startTwo");
}
}
timer = setInterval(fadeOut,10);

View Replies !    View Related
SetInterval Not Working In AS2 Class
Hi I have the following strange problem...

public function showImageAt(num:Number):Void
{
var interval:Number = setInterval(
function():Void {
trace("WORKING"); // works
test(); // doesnt work
clearInterval(interval);
},
500
);
}

private function test():Void
{
trace("test");
}

so the test function never gets called... anyone could help me on this one?

View Replies !    View Related
SetInterval Not Working Properly
Hi. I have the following simple AS in my movie.

Code:

function birdFlight() {
   num = 3
   trace (num + "test");
}


birdInterval = setInterval(birdFlight, 1000);

When i run the movie, i expect to see the number 3 traced every second. However, this only happens for 10 seconds, then after that the number 3 is traced twice every second (both numbers appearing at the same time). A further 10 seconds and the thumber is traced 3 times ever second etc.

My movie is currently running at 30fps. If i change this to 10fps, it correctly traces the number 3 for 30 seconds, then two numbers for another 30 seconds etc.

Obviously the Frame Rate is linked to the setInterval, but i cannot see how. Can anyone explain and provide a solution?

Thanks

View Replies !    View Related
SetInterval With Screens (slides) Not Working
Just a simple setInterval() script with a function that
tell the project to gotoNextSlide.

Can you change slides like this? I figured you must be able to, but not having any luck with it.


Thanks

View Replies !    View Related
SetInterval Stops Working After Few Iterations
Hi,

I have 3 different animations on the same timeline seperated by frame labels, I am using setInterval to create a random Interval before another animation is triggerred. At the end of each animation there is a _root.gotoAndPlay(1), on frame 1 is this code:

code:
stop();

//array of animations
anims = new Array("anim1", "anim2", "anim3");

//get rand num between 0 and 2
randNum = random(3);

//pick animation at that point in array
randAnim = anims[randNum];

//function to be called at end of setInterval
function playRand(arg) {
_root.gotoAndPlay(arg);
clearInterval(myVar);
}

//create random time interval
randInterval = (random(5)+5)*1000;
trace(randInterval);

//set the interval
setInterval(playRand, randInterval, randAnim);


This works fine for the first few iterations but after a while the interval seems to be completely ignored, traces show that the interval is being created but the movie is not responding to it.

Any ideas?

Thanks a lot.

View Replies !    View Related
SetInterval With Switch Statement Not Working
Hey...please i need some help...

Ok...on the code, everything works fine except the switch statement...
when counterLogo reaches to 2, nothing happens... the counter is actually working and adding by one with the setInterval but the switch statement is not recognizing the counterLogo sum.



Code:
counterLogo = 0;
//Start Loading Pictures

mcNorthAmerica.onRelease = function() {
function countLogo() {
counterLogo++;
trace(counterLogo);
}
count = setInterval(countLogo, 1000);
switch (counterLogo) {
case 2 :
startLoading("Logos/accenture.png");
trace("works");
break;
}
};

View Replies !    View Related
This._rotation Not Working In Function W/ SetInterval
I'm trying to use this._rotation+=1; in combination with setInterval() to rotate a clip constantly. However, nothing happens when i use code similar to below:

ActionScript Code:
onClipEvent(load)
{
function spinMe() {
this._rotation+=1;
}
setInterval(spinMe, 50);
}
}
however, if i use this code, this._rotation+=1; does work

ActionScript Code:
onClipEvent(enterFrame)
{
this._rotation+=1;
}
and if you use a function and call it in enterFrame it works too, so its the setInterval that I think is screwing with me. I don't want to mess around with fps cause that will interfere with too many other movie clips, so I need to find a way to use setInterval w/ my rotation function, help please?

-Brendan

View Replies !    View Related
SetInterval Stops Working After Few Iterations
Hi,

I have 3 different animations on the same timeline seperated by frame labels, I am using setInterval to create a random Interval before another animation is triggerred. At the end of each animation there is a _root.gotoAndPlay(1), on frame 1 is this code:


ActionScript Code:
stop();

//array of animations
anims = new Array("anim1", "anim2", "anim3");

//get rand num between 0 and 2
randNum = random(3);

//pick animation at that point in array
randAnim = anims[randNum];

//function to be called at end of setInterval
function playRand(arg) {
    _root.gotoAndPlay(arg);
    clearInterval(myVar);
}

//create random time interval
randInterval = (random(5)+5)*1000;
trace(randInterval);

//set the interval
setInterval(playRand, randInterval, randAnim);

This works fine for the first few iterations but after a while the interval seems to be completely ignored, traces show that the interval is being created but the movie is not responding to it.

Any ideas?

Thanks a lot.

View Replies !    View Related
SetInterval With Switch Statement Not Working
Hey...this is a begginer question but please i need some help...

Ok...on the code, everything works fine except the switch statement...
when counterLogo reaches to 2, nothing happens... the counter is actually working and adding by one with the setInterval but the switch statement is not recognizing the counterLogo sum.







Attach Code

counterLogo = 0;
//Start Loading Pictures

mcNorthAmerica.onRelease = function() {
function countLogo() {
counterLogo++;
trace(counterLogo);
}
count = setInterval(countLogo, 1000);
switch (counterLogo) {
case 2 :
startLoading("Logos/accenture.png");
trace("works");
break;
}
};

View Replies !    View Related
Simple Function And SetInterval Not Working
Here is my code, i've tried searching the forums and fighting with this way of fading the movie clip in and out. The movie clip has an instance name of "box", my brother also can't figure it out. need help!


Code:
var fadeChecker:Boolean = true;

function flicker():Void{
if(box._alpha >= 100){
fadeChecker = true;
}
else if(box._alpha <= 0){
fadeChecker = false;
}
if(fadeChecker == true){
box._alpha--;
}
else if(fadeChecker == false){
box._alpha++;
}
}
var nInterval:Number = setInterval(flicker,1000);

View Replies !    View Related
SetInterval Stopped Working Without Any Reason At All
Im really beginning to lose it.. All i wanted to do is make a stopwatch with a couple more functions.
At first everything worked. Later i changed some code (nothing to do with the setInterval function) and suddenly it doesnt work anymore! All it does is execute a function once and then stops.

Here is my code:

Code:
var sekunde:Number = 0; //seconds
var minute:Number = 0; //minutes
var intervalID:Number;
var stoparicaTece:Boolean = false; //is the stopwatch running


osveziStoparico();

function povecajSekunde(){ //increases the seconds
sekunde++;
if(sekunde>=60){
minute++;
sekunde = 0;
if(minute >= 60){
minute = 0;
}
}//1 minute
osveziStoparico();

}
function sproziStoparico(){ //initiates the stopwatch
if(!stoparicaTece){ //ce stoparica se ni bila pognana
intervalID = setInterval(povecajSekunde(), 1000);
stoparicaTece = true;
}
}

function ustaviStoparico(){ //stops the setInterval function
clearInterval(intervalID);
stoparicaTece=false;
}

function resetirajStoparico(){ //resets the stopwatch
sekunde = 0;
minute = 0;
osveziStoparico();
}

function osveziStoparico(){ //displays current seconds&minutes
stoparica.text = minute+":"+sekunde;
}
Thanks for your help because right now i want to hurl my computer through the window!

edit: i already tried restoring it to original state but it didnt work

View Replies !    View Related
SetInterval Used Inside A Function Not Working
If I place some working setInterval code within a function and then call the function, it fails:


Code:
function RevealLinks():Void {
menu_mc._visible = true;
// Begin with Menu Links hidden
for (var i = 0; i < 12; i++) {
_root.menu_mc["item" + i + "_mc"]._visible = false;
}
clearInterval(thisID);
var thisID:Number;
var count:Number = 0;
var maxCount:Number = 11;
var duration:Number = 100;
function executeCallback():Void {
_root.menu_mc["item" + count + "_mc"]._visible = true;
if (count >= maxCount) {
clearInterval(thisID);
}
count++;
}
thisID = setInterval(this, "executeCallback", duration);
}
RevealLinks();
Can someone remind me why this sort of thing doesn't work?

View Replies !    View Related
Putting SetInterval In If Statement Stops It From Working?
Hey i have a movieClipLoader that loads a jpg into a empty movie clip created in AS. I want to have the picture appear after one second the first time the function is called while other things on the stage disappear, but after the first time this one second delay shouldn't appear.

I decided to use a setInterval to get the one second delay, and this works when i dont make it only work on the first photo loaded, but as soon as i put it within an if statement the other things in the if statement work but the interval doesnt work.

This is the code that works, but has a delay on every image that is loaded:


ActionScript Code:
function loadBigPicture(iValue:Number, firstTime:String):Void {
    this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadProgress = function(target, bytes_loaded, bytes_total) {
        var myLoaded = Math.floor(100*(bytes_loaded/bytes_total));
        trace(iValue+" has loaded: "+myLoaded);
    };
    tlistener.onLoadInit = function(target_mc):Void  {
        target_mc._x = centerOfImageX-target_mc._width/2;
        target_mc._y = centerOfImageY-target_mc._height/2;
        target_mc._alpha = 0;
        var mypic = setInterval(brightenBigPic, 1000);
            function brightenBigPic() {
                target_mc._alpha = 100;
                clearInterval(mypic);
        }
    };
    bigimage_mcl = new MovieClipLoader();
    bigimage_mcl.addListener(tlistener);
    bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}

And the code that doesnt make the first image ever show up, but when the function is called again it works fine:


ActionScript Code:
function loadBigPicture(iValue:Number, firstTime:String):Void {
    this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadProgress = function(target, bytes_loaded, bytes_total) {
        var myLoaded = Math.floor(100*(bytes_loaded/bytes_total));
        trace(iValue+" has loaded: "+myLoaded);
    };
    tlistener.onLoadInit = function(target_mc):Void  {
        target_mc._x = centerOfImageX-target_mc._width/2;
        target_mc._y = centerOfImageY-target_mc._height/2;
        target_mc._alpha = 0;
        if (firstTime == "yes") {
            trace("firstTime");
var mypic = setInterval(brightenBigPic, 1000);
            function brightenBigPic() {
                target_mc._alpha = 100;
                clearInterval(mypic);
            }
           
        } else {
            target_mc._alpha = 100;
        }
    };
    bigimage_mcl = new MovieClipLoader();
    bigimage_mcl.addListener(tlistener);
    bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}

Any ideas on why the interval doesnt work when its put inside the if statement, on the 2nd, firstTime traces but the interval doesnt work.

View Replies !    View Related
Putting SetInterval In If Statement Stops It From Working?
Hey i have a movieClipLoader that loads a jpg into a empty movie clip created in AS. I want to have the picture appear after one second the first time the function is called while other things on the stage disappear, but after the first time this one second delay shouldn't appear.

I decided to use a setInterval to get the one second delay, and this works when i dont make it only work on the first photo loaded, but as soon as i put it within an if statement the other things in the if statement work but the interval doesnt work.

This is the code that works, but has a delay on every image that is loaded:

function loadBigPicture(iValue:Number, firstTime:String):Void {
this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadProgress = function(target, bytes_loaded, bytes_total) {
var myLoaded = Math.floor(100*(bytes_loaded/bytes_total));
trace(iValue+" has loaded: "+myLoaded);
};
tlistener.onLoadInit = function(target_mc):Void {
target_mc._x = centerOfImageX-target_mc._width/2;
target_mc._y = centerOfImageY-target_mc._height/2;
target_mc._alpha = 0;
var mypic = setInterval(brightenBigPic, 1000);
function brightenBigPic() {
target_mc._alpha = 100;
clearInterval(mypic);
}
};
bigimage_mcl = new MovieClipLoader();
bigimage_mcl.addListener(tlistener);
bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}

And the code that doesnt make the first image ever show up, but when the function is called again it works fine:

function loadBigPicture(iValue:Number, firstTime:String):Void {
this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadProgress = function(target, bytes_loaded, bytes_total) {
var myLoaded = Math.floor(100*(bytes_loaded/bytes_total));
trace(iValue+" has loaded: "+myLoaded);
};
tlistener.onLoadInit = function(target_mc):Void {
target_mc._x = centerOfImageX-target_mc._width/2;
target_mc._y = centerOfImageY-target_mc._height/2;
target_mc._alpha = 0;
if (firstTime == "yes") {
trace("firstTime");
var mypic = setInterval(brightenBigPic, 1000);
function brightenBigPic() {
target_mc._alpha = 100;
clearInterval(mypic);
}

} else {
target_mc._alpha = 100;
}
};
bigimage_mcl = new MovieClipLoader();
bigimage_mcl.addListener(tlistener);
bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}
Any ideas on why the interval doesnt work when its put inside the if statement, on the 2nd, firstTime traces but the interval doesnt work.

View Replies !    View Related
Setinterval Called Too Quickly Makes It Stop Working?
I am having problems with this function, which is called when a button is pressed. I am loading a JPG with a movieClipLoader into a newly created movieclip, and while this is loading the other is still viewable and is faded and deleted when the new JPG has fully loaded, using the code below:


ActionScript Code:
function loadBigPicture(iValue:Number, firstTime:String):Void {
    this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
    trace(_level0["myBigPicture"+iValue]);
    trace("loadBigPicture Called: "+iValue);
    mybigpic = new Object();
    mybigpic.firstTime = firstTime;
    mybigpic.onLoadInit = function(target_mc):Void  {
        target_mc._alpha = 0;
        if (_global.areComps == true) {
            _level0["myBigPicture"+_global.currentPic].mysymbol = setInterval(showISymbol, 3000);
        }
        if (firstTime == "yes") {
            trace("firstTime");
            _level0["myBigPicture"+_global.currentPic].mypic = setInterval(brightenBigPic, 1400);
        } else {
            _level0["myBigPicture"+lastPic].deleteBig = setInterval(removeBigImage, 500, lastPic);
        }
        function brightenBigPic() {
            target_mc.alphaTo(100,1);
    clearInterval(_level0["myBigPicture"+_global.currentPic].mypic);
        }
        function removeBigImage(lastPic:Number):Void {
            clearInterval(_level0["myBigPicture"+lastPic].deleteBig);
            target_mc.alphaTo(0,1);
            trace("removing: "+_level0["myBigPicture"+lastPic])
            removeMovieClip(_level0["myBigPicture"+lastPic]);
        }
        function showISymbol():Void {   clearInterval(_level0["myBigPicture"+_global.currentPic].mysymbol);
            theInformationBox.iSymbol.enabled = true;
            theInformationBox.iSymbol.alphaTo(100, 1, "easeOutQuad");
        }
    };
    bigimage_mcl = new MovieClipLoader();
    bigimage_mcl.addListener(mybigpic);
    bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}
If the button is pressed extremely quickly again and again, the intervals begin to stop working, any ideas?

View Replies !    View Related
Setinterval Called Too Quickly Makes It Stop Working?
I am having problems with this function, which is called when a button is pressed. I am loading a JPG with a movieClipLoader into a newly created movieclip, and while this is loading the other is still viewable and is faded and deleted when the new JPG has fully loaded, using the code below:

ActionScript Code:
function loadBigPicture(iValue:Number, firstTime:String):Void {
this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
trace(_level0["myBigPicture"+iValue]);
trace("loadBigPicture Called: "+iValue);
mybigpic = new Object();
mybigpic.firstTime = firstTime;
mybigpic.onLoadInit = function(target_mc):Void {
target_mc._alpha = 0;
if (_global.areComps == true) {
_level0["myBigPicture"+_global.currentPic].mysymbol = setInterval(showISymbol, 3000);
}
if (firstTime == "yes") {
trace("firstTime");
_level0["myBigPicture"+_global.currentPic].mypic = setInterval(brightenBigPic, 1400);
} else {
_level0["myBigPicture"+lastPic].deleteBig = setInterval(removeBigImage, 500, lastPic);
}
function brightenBigPic() {
target_mc.alphaTo(100,1);
clearInterval(_level0["myBigPicture"+_global.currentPic].mypic);
}
function removeBigImage(lastPic:Number):Void {
clearInterval(_level0["myBigPicture"+lastPic].deleteBig);
target_mc.alphaTo(0,1);
trace("removing: "+_level0["myBigPicture"+lastPic])
removeMovieClip(_level0["myBigPicture"+lastPic]);
}
function showISymbol():Void { clearInterval(_level0["myBigPicture"+_global.currentPic].mysymbol);
theInformationBox.iSymbol.enabled = true;
theInformationBox.iSymbol.alphaTo(100, 1, "easeOutQuad");
}
};
bigimage_mcl = new MovieClipLoader();
bigimage_mcl.addListener(mybigpic);
bigimage_mcl.loadClip(imglocation[iValue], _level0["myBigPicture"+iValue]);
}

If the button is pressed extremely quickly again and again, the intervals begin to stop working, any ideas?

View Replies !    View Related
Custom Objects And Internal SetInterval Loops -> A Problem Stopping The SetInterval
Let's say I had a class like this:


PHP Code:



var someVar = new Widget();

function Widget() {
    // Some variables, etc...
    this.int_someCommand = 0;
    // Activate the function on instantiation
    this.someCommand();
};

Widget.prototype.someCommand = function() {
    clearInterval(this.int_someCommand);
    this.int_someCommand = setInterval(this, 'someCommandLoop', 50);
};
Widget.prototype.someCommandLoop = function() {
    trace("THIS IS A WIDGET LOOP!");
}; 




...now, I was always under the impression that if you delete an object in Flash, the setInterval loops associated with it would die as well. But when I try to:


PHP Code:



// At some other point in my timeline...
delete someVar; 




or:


PHP Code:



someVar = new Object(); 




...the original loop is still running (I can tell just by reading the trace). How do I go about properly terminating a setInterval loop inside an Object without having to call a clearInterval()? Or is a clearInterval() the only way?

Thanks.

View Replies !    View Related
Tween Class, Does It Use Setinterval? Getting Strange Setinterval Type Problem
I have a gallery with small thumbnails. Upon clicking a thumbnail, I am using the Tween class to pull clips from an array and fade them between each other, loading the clips into a container.

When I click the thumbnail it loads the .swf fine and plays the Tween Class animation just as it's supposed to, however if I click any other thumbnail and go back to that first one the timing gets totally screwed up and the fades get jittery and overlap each other, much like it does with setInterval if you don't clear the intervals.

Is there a way to clear the Tween Class? Does it's timer run on setInterval?


This is the code I am using for the tween class


Thanks!


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

//content movieclips put into an array
var mcArray:Array = new Array(content1, content2);
for (var k in mcArray) {
mcArray[k]._alpha = 0;
}

// tween class has something called "OnEnterFrameBeacon" and it is added to the stage
// when we import the as file, so I wanted to get rid of it.
var n:Number = 0;

function playFades() {
if (n<mcArray.length) {
var tween_handler1:Object = new Tween(mcArray[n], "_alpha", Strong.easeIn, 0, 100, 1, true);
tween_handler1.onMotionFinished = function() {
//trace("motion finished by "+mcArray[n]);
//n++;
var tween_handler2:Object = new Tween(mcArray[n], "_alpha", Strong.easeIn, 100, 0, 3.5, true);
tween_handler2.onMotionFinished = function() {
//trace("motion finished by "+mcArray[n]);
n++;
playFades();
};
};
} else {
n = 0;
playFades();
}
}
playFades();

View Replies !    View Related
Flash MX TabIndex Only Working With Text Fields, Movies And Buttons Not Working :(
hey, has anyone heard of this, is it a known bug, or am i doing something wrong?

im using the following code to tab index a page, with text fields, buttons and movies that i would like to highlight to the visitor.

arrTabIndex = new Array("butAddress", "movEmail", "txtCC", "txtTelephoneNumber", "txtMobileNumber", "txtSubject", "txtSubject", "txtRealName", "txtBody");

for (var Count = 0; Count < arrTabIndex.length; Count++) {
eval(arrTabIndex[Count]).tabIndex = Count;
//eval(arrTabIndex[Count]).tabEnabled = 1;
//eval(arrTabIndex[Count])._focusrect = 1;
}

my problem is, that if i include movie clips or buttons, the first in the series does focus and show the colored square but the tab key does not move the focus to the next object.
if i only include text fields, the tab key works as normal
is this a bug, or am i doing something wrong?

many thanks, in advance
clive

View Replies !    View Related
Setinterval In Flash?
Hello,

i created a preloader which uses the command onEnterFrame. Someone advice me to use the FlashMX command "setinterval" instead of "onEnterFrame". I wasn't able to make it work. Could someone tell me how my code would be by using the "setinterval" command and how this command improves my code?

my code is working fine and it's the following:

loadMovieNum("File.swf", 1);
this.onEnterFrame = function() {
_root.loadPercent=Math.floor(_level1.getBytesLoade d()/_level1.getBytesTotal()*100);
_root.loadBytes = Math.round(((_level1.getBytesLoaded()/1024)*1000)/1000)+"Kb";
_root.Bar._xscale = _root.loadPercent;
if (_root.loadPercent == 100) {
delete this.onEnterFrame;
}
};

Thanks,
Miguel

View Replies !    View Related
Flash 8: SetInterval Help.
I am trying to create a tab that will slide out onRollOver. So far it will move where I want it but without the sliding transition. What am I doing wrong? Here is my code
Code:
attachMovie("nav", "nav_mc", this.getNextHighestDepth(), {_x:0, _y:100});
var i=0;
nav_mc.onRollOver = function():Void {
while(i<=50) {
nav_mc._x = i++;
updateAfterEvent();
}
};
moveMenu = setInterval(nav_mc.onRollOver,5);

View Replies !    View Related
[Flash 8] Help With SetInterval
I just started learning Actionscript, so I imagine the solution to my problem is glaringly obvious. That aside, I'd appreciate some help.

I'm trying to get a series of concentric rings to appear on the stage, grow, and then fade. So far I have everything working just fine except the setInterval integration. If I run my function (placeRing) it drops a circle on the stage, which then swells until it fades away at the appropriate point. When I rely on setInterval to run the function for me, however, things no longer work. A trace statement in my function is displayed as expected once a second, but the movie clip isn't placed on the stage. I'm sure I'm missing something simple, but I haven't been able to figure it out. Thanks!


Code:
var count:Number = 0;

function placeRing():Void
{
trace("placeRing go");
count++;
this.attachMovie ("mcRing","mcRing"+count, this.getNextHighestDepth,{_x:800, _y:500});
var newMC:MovieClip = eval("mcRing"+count);
newMC.onEnterFrame = function()
{
animate(this);
};
}

function fadeOut():Void
{
this._alpha -= 5;
}

function animate(inputMC:MovieClip):Void{
inputMC._xscale += 5;
inputMC._yscale += 5;
if (inputMC._xscale>500)
{
this.fadeOut();
}
if (inputMC._alpha<0)
{
count--;
inputMC.removeMovieClip();
delete inputMC.onEnterFrame;
}
}

var nInterval:Number = setInterval(placeRing, 1000);

View Replies !    View Related
[flash 8] SetInterval (probably Obvious) Help
Hello all,

I'm doing my best to put together a little game my brother can change the graphics on to his own delight. Its a basic side scroller type thing. What I'm doing is programmatically creating the scenery in the background and making it move across the stage, but only when the right mouse button is pressed.

I'm trying to use SetInterval to randomly create these pieces of scenery in the background, but I can't seem to get it working... I've searched the forum, and read nearly every post, and I just don't seem to be able to get it running.

Here's my code (it's proably a mess, but at the moment, I'm just trying to get things to work):


Code:
// Define Variables. These are editable

var speed:Number = 5; // Speed of the charecter

//
// Do not edit anything past this point, or you'll mess stuff up.
//

// Uneditable Variables

var moving:Boolean = false; // If where moving or not

// objects that are inherited

var scenery_obj:Object = new Object();

scenery_obj.onEnterFrame = function() {
if (moving==true){
this._x-=speed;
}
}

// Functions

function initialise() {
var bg_container:MovieClip = this.createEmptyMovieClip("bg_container", this.getNextHighestDepth());
}

function createScenery() {

var s:Number;
var sc_container:MovieClip = this.createEmptyMovieClip("sc_container", this.getNextHighestDepth());
sc_container.attachMovie("scenery_object", "scenery_object"+s, this.getNextHighestDepth(), scenery_obj);
s++;
}

// Setup enviroment

this.onLoad = function() {
scenery_obj._y=230;
scenery_obj._x=560;
initialise();
}

// KEYS
var keyListener:Object = new Object(); // define listener object

// the check keys function
keyListener.onKeyDown = function() {
if (Key.isDown(Key.RIGHT)) {
moving = true;
createScenery()
}
};
keyListener.onKeyUp = function() {
moving= false;
};
Key.addListener(keyListener);
Thanks in advance

View Replies !    View Related
Intergrating FLV With Flash SetInterval -hOW 2?
Hi flashfellas

I want to know how adidas added the ""Player - Pope"" movie (flv) to work smoothly with time.
Link: http://www.adidas.com/us/campaigns/m...t/default.asp#
Enter Site

Another example is Wendy's http://www.bbv99.com/
After some time without mouse activity the video will play different animation

I think they use a green screen to capture the video, then extract. Layered over the background movie clip. And use setInterval method to play the flv. However the movieclip is smooth....

hOW 2?

Thanx

View Replies !    View Related
Flash 'Screensaver' Using SetInterval
After detecting that the user is idle for more than the wait time, the 'areyoustillthere.swf' movie is played. Which works fine.

But as this movie is played, i want to confirm if the user is really not there. So i need to detect his mousePos again. How do i do that?


Code:
var numWaitTime:Number = 2*1000; // Time in seconds to wait, before switching back to main screen

startTracking();

function startTracking() {
mousePos = -100000;
trackMove = setInterval(detectIdle, 2000);
}

function detectIdle() {
if ((_root._xmouse+_root._ymouse) != mousePos) {
clearInterval(idle);
idle = setInterval(idleTime, numWaitTime);
}
mousePos = _root._xmouse+_root._ymouse;
}
function idleTime() {
_root.createEmptyMovieClip("mc1", this.getNextHighestDepth());
mc1.loadMovie("data/areyoustillthere.swf");
trace("are you still there?");

mc1._x = 250;
mc1._y = 125;
new Tween(mcAsk, "_alpha", Regular.easeIn, 25, 100, 1, true);
mousePos = _root._xmouse+_root._ymouse;
}
function startTracking() {
trace("bring user back to home");
}

View Replies !    View Related
SetInterval And Older Flash Players
I think I have a problem with my Flash app, and am not sure what to do. My app uses the following code, and includes setInterval. The app displays fine on my computer, but I have Flash Player 7. A friend tried to load the web page containing this code, but it never loads the Flash app...he disconnected before I could ask him what version of the Flash Player he was using, but something tells me that it is an older version. Can someone tell me if this is the reason for the file not loading, and if so, is there a way to make this code work on Players dating back to Flash Player 2?



// load the live update scores variables
function drawMe() {
loadVariablesNum("http://www.celtic-nation.com/liveupdate/test.txt", 0);
}

// load the variables defined in the drawMe function
var quitID;
quitID=setInterval(drawMe, 1000);

// set the counter
fscommand("allowscale", "false");
loadVariablesNum("http://www.celtic-nation.com/liveupdate/vartest.txt", 0);
count = "0";

// load the individual scores variables
function statMe() {
if (Number(count)>Number(numvars)) {
count = "0";
set("var", eval("var" add count) );
}
count = Number(count)+1;
set("var", eval("var" add count) );
}

// load the variables defined in the statID function
var statID;
statID=setInterval(statMe, 5000);
stop();

View Replies !    View Related
Scope Problems In SetInterval (flash 8)
Hi all,
I'm having some major scope issues when using the SetInterval function in Flash when used inside a class.
I tried all 3 possible methods:

1.
this.m_id = SetInterval(this.myFunction(this), 100);
or
this.m_id = SetInterval(Delegate(this,this.myFunction(this)), 100);
2.
this.m_id = SetInterval(function()={ .... },100);
or
this.m_id = SetInterval(Delegate(this,function()={ .... }),100);
3.
this.m_id = SetInterval(this,"myFunction",100);

when myFunction is something like this:
public function myFunction(mc){
trace(mc.m_someMember);
}

On no.1 mc.m_someMember returns "undefined". On the other hand when I do "trace(this)" it does return the full name of the object.
On no.2 I can't access any of the member functions. It simply passes over them as if they don't exist. Again, "trace(this)" works fine.
no.3 doesn't work at all! When the interval value is low (like 1) it plays once, when it's something high (like 300) it doesn't play at all!

I am using Flash 8 pro.

Thanks,
Yaniv.

View Replies !    View Related
Flash SetInterval Problem In Safari
For some odd reason I have a setInterval that doesn't work once in a while.
Well, 25% of the time.
If I try it on my PC it ALWAYS works in all 6 browsers I tested.

Is there an issue between Flash and Safari and/or Macs?

Anyone had this issue before?

View Replies !    View Related
NEWBIE - Flash Slideshow Using (setInterval) AS
Can some one tell me how I can create this slide show using the setInterval in ActionScript? because my the FLA and SWF file is extremely large. I have 29 photos that I want to fade in to each other

Also I added PREVIOUS, PLAY. STOP, and FORWARD buttons that I need help with adding ActionScript too.

PREVIOUS: goto previous photo
PLAY: start / cont movie
STOP: stop on current fram
FORWARD: goto next photo

Here's what I was working on. If someone could help me tha would be great.
http://www.lajaydesigns.com/dev/01/final-slide-app.zip

Thanks

View Replies !    View Related
SetInterval And Input Text [ Flash MX 2004 ]
Dear Users:

I have the following code:

code:
Scene 1
Actions for Frame 1
var myVar:Number;
myVar=0;
gotoAndStop(2);
_root.myLap=function(){
myVar+=1;
if(myVar>20){
myVar=0;
}
if(myVar==0){
myVar+=1;
}
}
Actions for Frame 2
if(_root.myIntvl==null){
_root.myIntvl=10;
}
setInterval(_root.myLap,_root.myIntvl);
//setInterval(_root.myLap,100);
(empty), (_root.myIntvl), <myInputText_txt>
(empty), (myVar), <myDynText_txt>


What this does is to iterate a dynamic text field in an endless loop between 0 and 20, sort of like a stop watch. What I'd like to do is to be able to have the user input a value for the setInterval in an input text field that will update setInterval and thus update the speed at which the iteration occurs. My code should work but it doesn't. Can anyone tell me what I've done wrong or what code I should be implementing instead?

Thanks in advance for your help

View Replies !    View Related
Slideshow In Flash--dynamically Loaded Jpg's/setInterval
I am making a slideshow with dynamically loaded images. here is my code.


Code:
//swap depths
bottom.swapDepths(8);
left.swapDepths(9);
right.swapDepths(10);
fade.swapDepths(5);

_root.createEmptyMovieClip("pics", 1);
pics._x = pics._y=0;

//The current image displayed
var num = 0;

//loads images
var imageArray = new Array("picture1.jpg", "picture2.jpg", "picture3.jpg");
nextPic();

//interval
setInterval(nextPic, 3*1000);

//function
function nextPic() {
fade.play();
pics.loadMovie(imageArray[num], "pics");
num++;
}


I have the images load dynamically. and the images also change on a setInterval. I have a movieclip called "fade" that fades in the picture on each interval. I do not know how to fade out--on a set interval within the interval (for example, it fades out 4 seconds into the 5 second interval). Also, how to make it so after I get to "picture3.jpg" it goes back to the first picture (restarts the slideshow). If you could help that would be great, you don't have to write the code for me, just help me to know what i could use. I have tried many different things.

If this isn't clear sorry. Just ask me to clarify what doesn't make sense

Thanks a bunch,

Lex

View Replies !    View Related
Flash Timer Display / Updateing SetInterval();
Greeting Yall,

I am creating a timer for a game we are building here at work and i am having a tiny bit of a display issue.

I was wondering if there was anyway to force a number varible to be two digits? So "1" would allways be "01" and "2" = "02" ect.

anything would help.
-Edward

View Replies !    View Related
GetURL Working In Flash Player 8 / Not Working In Player 9
Here I have the portfolio system I'm working at:
http://www.vamapaull.dxwebs.com/portfolio.html

when you click on the big image it should open a URL in a new window
When I test it on my computer is working fine(Flash Player 8), but when I test it in Firefox or IE (Flash Player 9) is now opening any URL... I think is some thing about the Flash Player 8 and Flash Player 9 compatibility... or some thing...
I don't know how to correct this problem... I need my portfolio working on Flash Player 8 and Flash Player 9 because now alot of users have Flash Player 9 on computers. :roll:

Any idea how to fix this issue? :?

View Replies !    View Related
Pass Variable To Custom Function Not Working In Flash MX For Flash 6 Player
I have a Flash application that I built in Flash 5 that I want to now output in Flash MX (not 2004, though) for Flash 6 Player. The problem is that part of my code, which works fine if published for Flash 5 Player, breaks if published for Flash 6 Player. I am loading text from an external text file, and then passing the text contents of each variable to a function (to strip line breaks). Following is the code... does anyone know how to rewrite this so that it will work as Flash 6 Player swf? The contents of the variable are not getting passed, and eval does not work on left side of expression... I've tried everything I can think of...

Thanks in advance for help.

-S



PHP Code:



/* content, correct, Q1, Q2, Q3, etc are all variable loaded from external text file. I am trying to pass contents of variables, which is why I need to eval them. This worked in Flash 5, but not in Flash MX if I publish as Flash Player 6 file.  */   
temp = stripLineBreak("content");
temp = stripLineBreak("correct");
for (i=1; i<=10; i++){
     z="Q"+i
     temp = stripLineBreak(z);
}
     
function stripLineBreak(x) {
     tempArray = new Array();
     tempArray = eval(x).split("
");
     eval(x) = tempArray.join("");
     tempArray.splice(0,tempArray.length);
     tempArray = eval(x).split("
");
     eval(x) = tempArray.join("");
     tempArray.splice(0,tempArray.length);
}

View Replies !    View Related
Flash Working In Flash Player, But Not When Inserted In A Html Page
Hello guys. I have a very strange problem.
I have created a dynamic banner, made up of two simple combo boxes, with 3 parts actionscript.
The ideea is, when first loading the banner, the first combo box receives a lists of artists and it populates itslef with them. After selecting an option, it will send the id and receive a second list of tracks that belong to the selected artist.
After you select a track, you will be redirected to the page where you can listen to it.
MY problem is that while testing it, it works just fine in flash player, but after publishing it, my computer gets frozen up, untill a popup message appears, saying that my computer will become unresponsive do to the script.
This happens when i've uploaded the swf on the server. On my local computer, it only started to work in HTMl after i've modified the settings and set it up as trusted script.
ANy ideea how i can make it work in the browser?
Thank you for your help and here is the code of the banner:

!st code goes int he first frame:


Code:
myData = new LoadVars();
myData.load("http://website.com/banner/banner.php");
myData.onLoad = function() {
total_var=this.variabile;
myComb_cb.addItem({label:["Select an artist"]});
for (var i:Number = 1; i<=total_var; i++) {
myComb_cb.addItem({label:this["variabila"+i] },{data:this["variabila"+i]});
}

};
2nd code goes in the first combo box:

Code:
on(change) {
_root.myComb2_cb.removeAll();
var reply_lv = new LoadVars();
var send_lv = new LoadVars();
send_lv.id = this.selectedIndex;
send_lv.sendAndLoad("http://website.com/banner/banner.php", reply_lv, "POST");
reply_lv.onLoad = function() {
total_var=this.variabile;
_root.myComb2_cb.addItem({label:["Select a track"]});
for (var i:Number = 1; i<=total_var; i++) {_root.myComb2_cb.addItem({label:this["variabila"+i] },{data:this["id"+i]} );

}
}
}
And thirs code goes in the second combo box

Code:
on(change) {
getURL("http://website.com/banner/banner.php?id_piesa="+this.selectedIndex, "_blank");

}

View Replies !    View Related
Xml Flash Website - When I Change The Publish Settings To Flash 8 Its Not Working
I have done a xml flash website, It has been done in Flash Mx and i have set publish settings as Flash 6 Player. Now im facing a problem, when i changed my publish settings selected Flash 8 Player when i run it . It gives me only a blank screen, why is that what is the reason. Please help its urgent.

View Replies !    View Related
Flash Site Not Working In IE7 But Ok In Firefox(Newbie To Flash Websites)
So i have created a simple 4 page flash site with CS3 as an actionscript 2.0.

My website works just fine in Firefox but does not work at all in internet explorer. Does anyone know if this is a Flash issue or Internet Explorer doing something weird. Feel free to check out my source file on the site.

I created the layout in Photoshop then imported it into Flash. From there all i did was hit publish. Am i missing a step?

The site is here
Any help would be greatly appreciated.
-shawn

View Replies !    View Related
I Started Exporting To Flash 8 Instead Of Flash 6 And My Loader Quit Working
I am using a loader component which I named tstone. I was setting the ContentPath to a variable on the first frame of the timeline containing this component by using:

tstone30.ContentPath=_root.page3_tphoto30;


However, I decided I wanted to take advantage of the justify feature for my dynamic text fields and began exporting to Flash 8 instead of Flash 6. For some reason, my loader quit pulling the images into the loader. If I switch back to Flash 6 it works again. Any ideas cause this is driving me crazy?

View Replies !    View Related
ActionScript Not Working Runs When Published In Flash 6 But Not In Flash 8
Hi,

I have this file which I created from http://www.tutorialized.com/tutorial...entation/11499 where the actionscript works in Flash Player 6 but when I publish into Flash player 7 or 8 it does not seem to want to play.

It gets a pop up message stating:
"A script in this movie is causing Flash Player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort?"

My purpose to get this working in Flash 8 is because I need to incorporate CSS Stylesheets externally.


Here is the following actionscript:

stop();
numberOfTabs = 3;
for (i=1; i<=numberOfTabs; i++) {
line = eval("tab"+i);
line.onRelease = function() {
for (i=1; i<=numberofTabs; i++) {
otherTabs =
eval("this._parent.tab"+i);
otherTabs.bottomLine._visible =
true;
}
this.bottomLine._visible = false;
contentFrame = Number (this._name.substr(3,
1));
this._parent.contents.gotoAndStop(contentFrame);
}
}
tab1.bottomLine._visible = false;

tab1.onPress = function() {
gotoAndStop("tab1");
};

tab2.onPress = function() {
gotoAndStop("tab2");
};

tab3.onPress = function() {
gotoAndStop("tab3");
};


How does it need to be changed?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved