• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

problem with loadMovie() inside setInterval or onEnterFrame()

Hello ;
I am trying to load external images inside an empty movie clip  . When I do that the picture keeps blinking. I think the problem has to do with timing. Can anyone help me to find a solution to make the loaded picture not blinking.

the code looks something like this:

inside the pic movie clip :

in the main scene :

function redraw () {
someMovieClip.attachMovie("pic", name, depth);

and redraw function is called inside onEnterFrame .

you can download the file from www.bouguerra.com/fla/rotating_menu3.fla and to rephrase the problem : in the movieClip pic I want to load external pictures instead of dragging ones from the library. I had a sleepless week trying to figure this out. You will save my life if you can help me with this....

Hope you got an idea about what the problem is and u have an answer to it.
  • 2
2 Solutions
i think u need to put (stop;) action in the frist frame to stop loading the pic several times :)
just try

or give me a link to the file u did
bachbouchAuthor Commented:
u can get the file from here www.bouguerra.com/fla/rotating_menu3.fla , I already have stop(); in the first frame and
i think it is more complicated than that.
The most likely reason for seeing a blinking picture is you are constantly loading/reloading it.

Once you add any code inside onEnterFrame = function():Void { // any code here }, it will run at the frame rate of your movie, e.g., 12 times a second, infinitely many times until you assign a different function to onEnterFrame, for example, onEnterFrame = function():Void {} - empty function.

If you are using MX 2004, take a look at MovieClipLoader class in Flash help system. It simplifies movie clip and image loading quite a bit.

Hope this helps.
split the points plz
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now