Skip to main content
Inspiring
June 19, 2006
Answered

beyond myself

  • June 19, 2006
  • 2 replies
  • 300 views
the following (at bottom), works great
BUT...
ideally I need the files which are currently jpgs, and will be swfs, to
fade in from 0 alpha to 100 alpha, the movie runs at 30 fps and I would like
the fade to be about 2/3 second (20 frames visually), I can do this with the swf, but i would like to do with action script (can that happen if using jpgs ?).
I have no idea how to do that in Action Script.

Secondly, this is not showing up in my preloading, is that because it comes from seperate directory?
How to do that?

Thirdly, I would love to have an intervval timer so this will replay after about 30 seconds.

Lastly, is this type of thing possible with the image in the library and the linkage set to export for actionScript?

All this is way beyond my AS limits

anyOne willing to help me?

thanks for looking


filename = ["1.jpg", "2.jpg", "3.jpg","4.jpg","5.jpg"];
path = " http://208.106.158.167/fiveR/1330/";
i = filename.length;
k = Math.ceil(Math.random()*i);
//k = Math.floor(Math.random()*i);
loadMovie(path+filename, movieTarget);

This topic has been closed for replies.
Correct answer _gary_
you can't import anything into the library using actionscript and you can't set a linkage id using actioncript. you can import and set a linkage id in the authoring environment.

you can't use loadMovie() to instantiate a movieclip that's in your library. you would use attachMovie() and you would use the linkage id to specify the movieclip that's to be attached. there is no path to your library.

thanks

2 replies

kglad
Community Expert
Community Expert
June 20, 2006
you're welcome.
kglad
Community Expert
Community Expert
June 19, 2006
1. initiate a loop that increments your movieTarget's _alpha in the required time span AFTER loading is complete.
2. the directory is irrelevent (as long as it's correct). you have shown no preloader code to critique.
3. put your code in a function and use setInterval() to call the function every 30 seconds AFTER loading is complete
4. it makes no sense to use a preloader on library items because they are already loaded onto the user's computer when your swf starts. you can certainly fade-in an attached movieclip, though.
_gary_Author
Inspiring
June 19, 2006
thanks for the reply,

I am uncertain, and confused on how to specify the directory if the items are from the library, as opposed to the way they are set up now.

I Can(yes) understand to import the swfs to the library and then set linkage to export for AS(? first frame or Not ?)
filename = ["1.jpg", "2.jpg", "3.jpg","4.jpg","5.jpg"];
path = " http://208.106.158.167/fiveR/1330/";

i suppose I could leave the filename as is, but how to specify path/dir as library items?? I don't know..

thanks

kglad
Community Expert
Community Expert
June 19, 2006
you can't import anything into the library using actionscript and you can't set a linkage id using actioncript. you can import and set a linkage id in the authoring environment.

you can't use loadMovie() to instantiate a movieclip that's in your library. you would use attachMovie() and you would use the linkage id to specify the movieclip that's to be attached. there is no path to your library.