PDA

View Full Version : MX - Delay Problem with AS...



BVision
May 30th, 2003, 09:19 AM
This code is on fame one of my buttons mc..

When I click on the first and then the second button everything is great.

As soon as I stop clicking.. let's say... 5-10 seconds of non-clicking time... there is a dramatic delay when displaying a graphic..


Why is this?
I dont understand why this is happening... after the images are loaded, they should just pull right up again.... (My thoughts..)

Pleas help.

The code is..



but.onPress = function() {
_root.createEmptyMovieClip("container", 1);
_root.container.loadMovie("images/full/Fogged Eye v1.jpg");
_root.container._alpha = 0;
_root.container._x = 290;
_root.container._y = 10;
accel = _root.container._alpha+8;
onEnterFrame = function () {
_root.container._alpha += accel;
_root.container1._alpha -= accel;
};
};

but2.onPress = function() {
_root.createEmptyMovieClip("container1", 2);
_root.container1.loadMovie("images/full/Precious Lightning v1.jpg");
_root.container1._x = 290;
_root.container1._y = 10;
_root.container1._alpha = 0;
accel = _root.container1._alpha+8;
onEnterFrame = function () {
_root.container1._alpha += accel;
_root.container._alpha -= accel;
};
};

thoriphes
May 30th, 2003, 11:48 AM
it may be because of that onEnterFrame function. Flash probably thinks you are trying to give that button an onEnterFrame, which it can't do. try changing your oEF function headings to
_parent.onEnterFrame = function() { ... }

BVision
May 30th, 2003, 02:27 PM
I did that... No change..

Thanks for the effort though.

Im not quite sure why this code is having this delaying-- problem..

I will post more code if someone wants to try to help.



-----

I updated the pictures being loaded... I thought it was maybe the filesize of the full pictures. But it wasnt.. It's something with the way things are loaded/AS/objects.. Something isnt right...

hhmm....
?????????

any thoughts?

thoriphes
May 30th, 2003, 02:35 PM
here's something you may want to look up in the flash help:

setIntervali would go into detail but i have to go. i'll check back later.