Solved

problem with loadMovie() inside setInterval or onEnterFrame()

Posted on 2004-08-14
7
407 Views
Last Modified: 2008-03-06
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 :
myClip.loadMovie("logo.jpg");

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.
0
Comment
Question by:bachbouch
  • 2
7 Comments
 
LVL 13

Accepted Solution

by:
FLAASHER earned 250 total points
ID: 11803223
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
0
 

Author Comment

by:bachbouch
ID: 11805937
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.
0
 
LVL 1

Assisted Solution

by:CT_Flasher
CT_Flasher earned 250 total points
ID: 11807120
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.
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 12294999
split the points plz
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question