-
Moving a movieclip waiting then moving back(popup effect)
Hi this is my first post. I usually find what I need by searching but I'm not managing to get anything for this problem.
Basically I want to have an image move up to the fill the background when the movie loads then wait for 30secs and then move down again to almost out of view.
I've seen this effect on alot of online adverts, I'm sure alomst everyone will know the type I mean.
Any help on this would be great.
Thanks
oh I'm using AS2 for this.
Last edited by Sprogleg; 01-05-2010 at 12:57 PM.
-
Do you have an example of the effect?
-
Example of how far I have got
I have an example of what I want to happen but I don't think I've done it the best way.
http://www.justsandymedia.com/flashad_1_3.html
Basically I have 300 frames and code on the first and last as follows.
First frame:
Code:
setInterval(ad1_mc.onEnterFrame,1000)
ad1_mc.onEnterFrame = function() {
if (this._y <> 0) {
this._y -= 22;}
}
Last frame:
Code:
delete ad1_mc.onEnterFrame;
stop();
ad1_mc.onEnterFrame = function() {
this._y += 22;
}
To make this more complex I'm trying to have it pull in an image hosted somewhere else but at the moment the image is in the fla as part of a movieclip symbol.
-
Nearly there but need a little help
I think I've nearly worked this out.
I have this so far http://www.justsandymedia.com/test/test3.html
Which is pulling in an image in the same folder as the swf.
What I'm trying to do now is have it stay visible for 20-30secs before moving back down out of view again.
Any help would be greatly appreciated.
Code I'm using
Code:
// Create a movie clip instance.
this.createEmptyMovieClip("img1_mc", 10);
var mcl_obj:Object = new Object();
mcl_obj.onLoadInit = function (target_mc:MovieClip):Void {
target_mc._y = 110;
target_mc.onEnterFrame = function() {
target_mc._y -= 10; // decrease current _y position by 3 pixels
if (target_mc._y <= 0) {
target_mc._y = 0;
delete target_mc.onEnterFrame;
}
};
};
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mcl_obj);
// Load an image into the movie clip
img_mcl.loadClip("flashadd_test_1.png", img1_mc);
Last edited by Sprogleg; 01-06-2010 at 07:38 AM.
Tags for this Thread
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
|