-
[F8] Actionscript Fade
Okay, what I want to happen is when the movie loads, it will randomly go to a picture that will fade in. Then after a maybe 10 seconds it will fade out and another picture will fade in. It will do this again and again. It'd be great if you can also post how to control the fading...
What I'm using now is:
PHP Code:
function reload(){
value1 = Math.floor(Math.random() * 6) + 1
gotoAndStop(value1);
}
stop();
_root.reload();
It's on the first frame and there are 5 other frames, each with a movie clip containing:
PHP Code:
onClipEvent (enterFrame)
{
this._alpha = _alpha + 2
}
It only fades in once when it loads but it stops there.
I only know the very basics for now, so can you please help me?
-
function reload(){
value1 = Math.floor(Math.random() * 6) + 1
gotoAndStop(value1);
}
stop();
_root.reload();
what is gotoAndStop(value1);
mypic.gotoAndStop?
There is a Dent in my desk where i keep Banging my Head.
-
In other words, _root.gotoAndStop(value1);
It's gonna go to and stop at a random frame on the main timeline.
Oh and I've improved the code(I think) Now it fades in and after a while another pic pops up. It doesn't fade out though... Code for the pics(which are mcs) except with a getURL. Another problem I found is that it setInterval sets in so if the movie loads the first time, the pics fades in maybe after 5 secs... I want it to fade in when it loads.
PHP Code:
function reload() {
value1 = Math.floor(Math.random()*10)+1;
gotoAndStop(value1);
}
function deadClick() {
}
function gotoMyComic() {
getURL("http://lazylonewolf.comicgenesis.com/", "_top");
}
function gotoMyArchives() {
getURL("http://lazylonewolf.comicgenesis.com/", "_top");
}
function gotoMyDA() {
getURL("http://lazylonewolf.comicgenesis.com/archive.html", "_top");
}
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightNotice:ContextMenuItem = new ContextMenuItem("© 2008 ~ Lazy Lone Wolf", deadClick);
copyrightNotice.separatorBefore = true;
var myCLink:ContextMenuItem = new ContextMenuItem("Cat Nine Home Page", gotoMyComic);
var myALink:ContextMenuItem = new ContextMenuItem("Cat Nine Archives", gotoMyArchives);
var myDALink:ContextMenuItem = new ContextMenuItem("DeviantArt", gotoMyDA);
myMenu.customItems.push(myCLink, myALink, myDALink, copyrightNotice);
_root.menu = myMenu;
gotoAndStop(Math.floor(Math.random()*10)+1)
setInterval(reload, 5000);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|