Refine My Code : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-06-2008, 01:39 AM
View Complete Forum Thread with Replies
Sponsored Links:
AS2 - Refine My Code...it Sucks : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
View Replies !
View Related
[CS3] My Code Sucks : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
View Replies !
View Related
Quick Fade In / Fade Out On RollOver / RollOut
While taking a break from trying to figure out how to accomplish something in Flash MX 2004, I stumbled upon a site that is a perfect example of what I'm trying to do.
http://www.aperfectcircle.com
The project I'm working on has a circular navigation system with eight buttons around the circumference of the circle. The actual buttons are just symbols, so I want to have the name of the link quickly fade in above the middle of the circle when you mouseover a button, and then the name quickly fades out when the mouse leaves that button's hit area. I don't want to use tweened animation in a MC on the button's over state, because I want the fading to be totally smooth if you quickly move from one button to another, or if you move the mouse out of the hit area before it has fully faded in. I know there is a way to do this with hitstate and _alpha, but I have never used these commands before, and I can't find a very clear example of how to implement this behaviour with them.
So, in short, I need to put a script on a button, that will fade in another MC on rollover, and fade it out on rollout.
Please look at the site mentioned above to see exactly what I'm talking about, and thanks for any insight you can provide.
View Replies !
View Related
Xml Slideshow Fade In And Fade Out Assistance (code Supplied)
Hi all,
Can someone help me out here - needing someone to point out (or offer!) the solution. I'm working with the following code, and want to have my slideshow images fade into each other. At the moment, the picture before, after it's reached its delay setting, just switches off and the next one fades in, meaning the background displays (which isn't desirable)
CODE BEGINS ------------------------------------------------------
delay = 4000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
function moveSlide() {
current_mc = _root.myClips_array[_root.target_mc];
new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
_root.target_mc++;
if (_root.target_mc>=_root.myImagesNo) {
_root.target_mc = 0;
}
_root.myText_txt.text = _root.myImages[target_mc].attributes.title;
next_mc = _root.myClips_array[_root.target_mc];
new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
}
}
}
CODE ENDS ------------------------------------------------------
Any help, HUGELY appreciated
Thanks in advance
View Replies !
View Related
Fade In / Fade Out Multiple Movie Clips - Help Me
I have a flash website that is setup linearly into different sections. Lets call them Section 1 through 5. The page is divided in two. On the left side is my navigation. On the right side is my content. On the left side behind my buttons is a picture. I have 5 different pictures, 1 for each section. So, what i want to do is when you click on a button and go to a new section I want it to fade-out the bottom picture and fade-in the new picture and take you to the new content section.
Anyone know how to do this? I don't know much actionscript, but I'd like to do this w/o having to make a ton of movie clips.
I've been messing with this all day...Please help.
Thanks
IJoeR
View Replies !
View Related
Buttons To Fade In And Fade Out Movie Clips
Sorry if this seems rudimentary to everybody, but I’m trying to write a script for a web page (possibly tween?) that uses several different buttons to control movie clips that fade in and fade out. All the movie clips are in the same location on the stage. so the clip that is present needs to fade out when another button is pushed and a new clip fades in. This website has a great example of what I’m looking to do.
http://jchawaii.com/v6/boards.php
View Replies !
View Related
On Rollover Fade In / Rollout Fade Out
hi i have a picture that should fade in on rollover and fade out on rollout.
i also searched the forums and tried this code:
Code:
stop();
t1._alpha = 0;
function fadeOut() {
t1._alpha -= 5;
if (t1._alpha == 0) {
clearInterval(myIntervalId);
}
}
function fadeIn() {
t1._alpha += 5;
if (t1._alpha >= 100) {
clearInterval(myIntervalId);
}
}
t1.onRollOut = function() {
myIntervalId = setInterval(fadeOut, 50);
};
t1.onRollOver = function() {
myIntervalId = setInterval(fadeIn, 50);
};
now it fades in and out again but after that it won't fade in again.. and its kinda "un-smooth" (maybe cuz of fps?)
thx for help
nico
View Replies !
View Related
My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
Hello all,
Hopefully this is just a simple problem with my code.
I have a container on the stage. When the loaded clip gets to the last frame it triggers the decreaseAlpha() function on the root level. This fades the current container out and works fine.
However I also want it to load the next clip(which it does) and fade that clip in. This doesn't work. It doesnt' fade in, can anyone point me in the right direction?
Thanks!!
Code:
function decreaseAlpha(boxName, clipName){
boxName.onEnterFrame = function(){
if(boxName._alpha > 0){
boxName._alpha -= 15;
}if(boxName._alpha < 5){
delete boxName.onEnterFrame;
increaseAlpha(boxName, clipName);
}
}
}
function increaseAlpha(boxName, clipName){
loadMovie(clipName, boxName);
boxName._alpha = 0;
boxName.onEnterFrame = function(){
if(boxName._alpha < 100){
boxName._alpha += 15;
}if(boxName._alpha == 100){
delete subboxName.onEnterFrame;
}
}
}
View Replies !
View Related
My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
Hello all,
Hopefully this is just a simple problem with my code.
I have a container on the stage. When the loaded clip gets to the last frame it triggers the decreaseAlpha() function on the root level. This fades the current container out and works fine.
However I also want it to load the next clip(which it does) and fade that clip in. This doesn't work. It doesnt' fade in, can anyone point me in the right direction?
Thanks!!
Code:
function decreaseAlpha(boxName, clipName){
boxName.onEnterFrame = function(){
if(boxName._alpha > 0){
boxName._alpha -= 15;
}if(boxName._alpha < 5){
delete boxName.onEnterFrame;
increaseAlpha(boxName, clipName);
}
}
}
function increaseAlpha(boxName, clipName){
loadMovie(clipName, boxName);
boxName._alpha = 0;
boxName.onEnterFrame = function(){
if(boxName._alpha < 100){
boxName._alpha += 15;
}if(boxName._alpha == 100){
delete subboxName.onEnterFrame;
}
}
}
View Replies !
View Related
[MX04] Help Me Out With This Fade-out / Fade-in Code
Basically what i want to happen is when i press a button, it fades out whatever movies is in page_holder then unloads it. Right after unloading it it fades in the new movie into page_holder. However although the new page is loaded, it's alpha remains 0 and the fadeInPage function does not happen. What's up with my code?
PHP Code:
on (press){
function fadeOutPage(){
if (_root.page_holder._alpha >=0){
_root.page_holder._alpha -= 10
}
if (_root.page_holder._alpha <=0){
clearInterval (fadeOutPageX)
_root.page_holder.unloadMovie
loadMovie("home.swf","_root.page_holder")
function fadeInPage(){
if(_root.page_holder._alpha <=100){
_root.page_holder._alpha +=10
}
if(_root.page_holder._alpha >=100){
clearInterval (fadeInPageX)
}
}
fadeInPageX = setInterval(fadeInPage, 25)
}
}
fadeOutPageX = setInterval(fadeOutPage, 25)
}
Thanks in advance
View Replies !
View Related
Rollover Fade In Fade Out
I am building a swf and need to have a few rollovers. There will be on main picture and when you rollover the subtitles I want the picture to fade out and the new one fade in. I remember doing this years ago but dont know how for cs3.
Tanks
View Replies !
View Related
RollOver Button Fade In...rollOut Button Fade Out
ok, maybe this is simple but i cant get it to work....
i want to make a button (a circle) and when i roll over it a block of text or something should fade in and then stop at a fully visible state. it should wait at that state of appearance until the mouse rolls out of the button's hit area which should cause the the text block to fade out showing the button in it's normal Up state...i can't figure out what i have to do (scripting or MC wise) to make this work...please help me! thanks!
*Julie
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Last edited by PixelSense : 2004-02-01 at 01:54.
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
How Do I Do This Fade Rollover?
Hi. I found this fade rollover button on a tute page, but can't a) find it again and b) work out how it's done.
I tried emailing the author but I think he's disappeared.
http://www.jamesgladwin.com/Pages/mo..._rollover.html
Thanks - Summer
View Replies !
View Related
Rollover Fade
Does anyone know how to do this rollOver effect?
http://www.museum.wa.gov.au/default...Sheet=perth.css
Enter flash site and look at the rollOver buttons. I have the bar moving over each button but can't get it to fade out.
See attached.
Any ideas?
Thanks.
View Replies !
View Related
Rollover Fade
Does anyone know how to do this rollOver effect?
http://www.museum.wa.gov.au/default...Sheet=perth.css
Enter flash site and look at the rollOver buttons. I have the bar moving over each button but can't get it to fade out.
See attached.
Any ideas?
Thanks.
View Replies !
View Related
Fade In On Rollover
I need my picture to fade in on the rollover of a button. Here's my script
ActionScript Code:
on (rollOver) {
if (a_mc._alpha < 100) {
a_mc._alpha=100;
}
}
It did not work when i put _alpha++; b/c I think the code just play's through once
anyone know how I can fade in my pic on the rollover of a button?
Sandman9
View Replies !
View Related
Rollover Fade Out
I'm trying to get an effect when you roll off of a button, which has a movie clip in the over state, the button fades back to the over state. Check out
http://juniatwork.mrtio.com/[/url]
the buttons used at the top of the page. Not the best example, but i like how when you roll off of them, no matter where you are, they just fade out rather than abruptly stopping. I don't know really anything about actionscripting, so please be gentle with your wording if that is what i need to do to get this effect. thanks for any help..
View Replies !
View Related
Fade Away On Rollover...
This should be an easy one, hope I'm asking this in the right place...
I saw a movie where there were little squares covering the whole screen, and when your mouse comes within a certain distance of a given square it fades away, never to return. Eventually you're revealling an image beneath all the squares.
I did some searching but had little luck finding a thread on this. Anyone point me in the right direction?
Thanks in advance.
bc1 ... this is my first post.
View Replies !
View Related
Fade In Graphics On Rollover
this should be a simple script. what i need is a loop to fade in a graphic (this will be repeated to fade in 15 different images by mousing over them)
here's the basic code:
on (rollOver) {
setProperty("movie 1", _alpha, "100");
}
i'm hoping to keep a "for" loop (or whichever type is best) inside this on (rollOver) command.
i rember somthing about 1++ to go through the steps. also, 5 steps from _alpha=0 to _alpha=100 should work just fine.
tia
View Replies !
View Related
How Do I ... Rollover Button... Fade Off
Quick question ...
I have made a button which fades on, when you rollover it... but what I would like to know is how to make it fade out ... with or without the cursor over the button... essentially this is a mini button which activates a movie clip with a photograph... and I would like have the button be fluid... rather than have it just blip off when the mouse cursor shifts off of the button...
any help would be greatly appreciated..
you can reach me at this alternate email address...for any answers you might have or come up with...
ceo@derelictdesigns.com
thank you.
View Replies !
View Related
[F8] Actionscript - Fade - Rollover
Here is what I have so far.
I am new to Flash but do a decent amount of php and xml.
This shows the images but they do not fade in and I can't get rollovers to work.
Goal:
to get each image to fade in individually
to enable a rollover for each image
xml_data = new XML();
xml_data.ignoreWhite = true;
xml_data.onLoad = load_xml;
xml_data.load("xml/myspace.xml");
function load_xml(loaded) {
if (loaded) {
xmlNode = this.firstChild;
total = xmlNode.childNodes.length;
} else {
content = "file not loaded!";
}
/* VARIABLES */
mod = 4;
x_start = 5;
x_jump = 90;
y_start = -49;
y_jump = 54;
for (i=0; i<total; i++) {
img_sml = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
img_lrg = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
if(i==0) { iy = y_start; }
if(i%mod==0) { iy += y_jump; ix = x_jump-(x_jump*2) + x_start; ix += x_jump; }
else { ix += x_jump; }
//trace(ix+" x "+iy);
_root.attachMovie("photo","photo"+i, i, {_x:ix, _y:iy});
eval("photo"+i)._alpha = 100; // Set alpha to 100 to see images
eval("photo"+i)._xscale = (eval("photo"+i)._xscale/1.5);
eval("photo"+i)._yscale = (eval("photo"+i)._yscale/1.5);
eval("photo"+i).loadMovie(img_sml, "photo"+i);
// Not working.. ?
if(eval("photo"+i)._alpha<100) {trace("alpah"+i+"= "+eval("photo"+i)._alpha); eval("photo"+i)._alpha += 2; }
else { eval("photo"+i)._alpha = 100; }
// Checking x,y placement
//trace(eval("photo"+i)._x +" x "+ eval("photo"+i)._y);
// Not working...
eval("photo"+i).onRollOver = function() { trace("HERE"); }
}
}
*** XML
<?xml version="1.0" encoding="iso-8859-1"?>
<node>
<image>
<thumb>images/img_photos/img_thumb/100005928.jpg</thumb>
<lrg>images/img_photos/img_lrg/100005928.jpg</lrg>
</image>
<image>
<thumb>images/img_photos/img_thumb/100303208.jpg</thumb>
<lrg>images/img_photos/img_lrg/100303208.jpg</lrg>
</image>
<image>
<thumb>images/img_photos/img_thumb/102791648.jpg</thumb>
<lrg>images/img_photos/img_lrg/102791648.jpg</lrg>
</image>
<image>
<thumb>images/img_photos/img_thumb/104448404.jpg</thumb>
<lrg>images/img_photos/img_lrg/104448404.jpg</lrg>
</image>
</node>
Any help getting on the right track is appreciated.
Jon
View Replies !
View Related
Fade Up Pic On Text Rollover
I have a menu across the top of the page and need to have a photo elsewhere in the page fade up when a menu item is rolled over.
The way I have been doing this has been bogging things down significantly, I think and I'm hoping someone can give me an alternate method.
Here's the code I currently have on each movie clip (containing a photo) that needs to fade up or down based upon what nav item is rolled over:
onClipEvent(Load) {this._alpha = 0; //initialize photo to hidden} //end on Load
onClipEvent(enterFrame) {
if (_root.navItem == "Tab1") { //check to see if mouse is over tabif (this._alpha < 100) { //fade up
this._alpha = this._alpha + 20;
} //end fade up } else { //if mouse not over tabif (this._alpha > 0 ) { //fade out if necessary
this._alpha = this._alpha - 20;
} // end fade out } //end if mouse
} //end enterFrame
I was wondering if there is, for example, code I could put on the tab itself to only fire the movie clip fade when the tab is rolled over, instead of having the movie clip itself check constantly. Some sort of "while the mouse is over the movie clip, fade up, else fade out" kind of thing.
TIA,
Carolyn
View Replies !
View Related
Can Someone Please Help Rollover Fade In/out Issues
Hello everyone. I am new to these forums and would greatly appreciate help on this one. I lifted some script from another post here and have tried to format it to my needs. Here's what needs to happen. On rollover a movieclip must fade in, wait, and then fade out. When I attach the script below to the movie clip this all happens correctly.
BUT subsequent rollovers must continue fade in (if currently fading in), fade back in (if currently fading out), or reset pause duration (if currently waiting). Any help will recieve a verbal reward for helping me retain my sanity.
ActionScript Code:
mc.onRollOver = function() {
status = 0;
variation = 2;
function inc_alpha() {
if (mc._alpha<100) {
mc._alpha += variation;
}
}
setInterval(inc_alpha, 10);
function wait() {
if (mc._alpha>=100) {
status += 1;
}
}
setInterval(wait, 100);
function dec_alpha() {
if (status == 1) {
if (mc._alpha>0) {
mc._alpha -= variation;
}
}
}
setInterval(dec_alpha, 10);
};
View Replies !
View Related
Fade Images On Rollover
i am pretty new to flash (last night at about 11:00 pm) and need to know how to "fade" images in when. i don't know the lingo yet so here is a site that shows what i am talking about.
http://www.timtadder.com/index3.html
rollover the images on bottom right and see how the large images "fades" in. i have everything else (the thumbnails and large image) from a tutorial already set up. just need to know how to add the fade. and i do not want it as a slideshow.
thank you
View Replies !
View Related
Alpha Fade On Rollover
wow, i think this is like the 5th time i'm asking this question, no one could help-
ok, i'll ask it differently this time. I just want the button to fade out on rollover. at the same time, i would like text (that is loaded externally in a text field called "caption") to fade in also on rollover.
i've tried sooooo many things - scavenging this board and others.
suggestions pleasepleaseplease thanks!
View Replies !
View Related
Alpha Fade On Rollover
wow, i think this is like the 5th time i'm asking this question, no one could help-
ok, i'll ask it differently this time. I just want the button to fade out on rollover. at the same time, i would like text (that is loaded externally in a text field called "caption") to fade in also on rollover.
i've tried sooooo many things - scavenging this board and others.
suggestions pleasepleaseplease thanks!
View Replies !
View Related
Fade Alpha Of Mc With RollOver
Hey shockers,
Im trying to achieve an effect like this . Down the bottom where the two sections are low alpha until rollover, then the sections go to high alpha etc.
I tried the on(rollOver){
_root.mcName._alpha = 100;
This did change the alpha but the clip contains input boxes that I now cant use, plus I get the hand cursor.
Any help or direction of tuts appreciated
View Replies !
View Related
Fade Between Images On Rollover.
Hi guys,
I was hoping someone may be able to help me with this :-)
I have a thumbnail gallery that is populated by an XML file which is working fine but I want the thumbnails to fade to colour when you roll over them and stay coloured when selected.
Time is really of the essence with this one!!
so if anyone can point me in the right direction you would really help me from scrambling in around banging my head against a brick wall I'd really appreciate it.
Here's the XML
ActionScript Code:
<project client="Client" projName="Project02" year="2001" movPath="0">
<images>
<image path="projects/imgs/project02_01.jpg" thumbCol="project_2_work_thumb_col_01.jpg" thumbBw="project_2_work_thumb_bw_01.jpg"/>
<image path="projects/imgs/project02_02.jpg" thumbCol="project_2_work_thumb_col_02.jpg" thumbBw="project_2_work_thumb_bw_02.jpg"/>
<image path="projects/imgs/project02_03.jpg" thumbCol="project_2_work_thumb_col_03.jpg" thumbBw="project_2_work_thumb_bw_03.jpg"/>
<image path="projects/imgs/project02_04.jpg" thumbCol="project_2_work_thumb_col_04.jpg" thumbBw="project_2_work_thumb_bw_04.jpg"/>
<image path="projects/imgs/project02_05.jpg" thumbCol="project_2_work_thumb_col_05.jpg" thumbBw="project_2_work_thumb_bw_05.jpg"/>
<image path="projects/imgs/project02_06.jpg" thumbCol="project_2_work_thumb_col_06.jpg" thumbBw="project_2_work_thumb_bw_06.jpg"/>
</images>
<gallery>
<image title="Project02" main="images/project02_01.jpg" thmb="thumbnails/project_2_work_thumb_col_01.jpg" bw="thumbnails/project_2_work_thumb_bw_01.jpg"/>
<image title="Project02" main="images/project02_02.jpg" thmb="thumbnails/project_2_work_thumb_col_02.jpg" bw="thumbnails/project_2_work_thumb_bw_02.jpg"/>
<image title="Project02" main="images/project02_03.jpg" thmb="thumbnails/project_2_work_thumb_col_03.jpg" bw="thumbnails/project_2_work_thumb_bw_03.jpg"/>
<image title="Project02" main="images/project02_04.jpg" thmb="thumbnails/project_2_work_thumb_col_04.jpg" bw="thumbnails/project_2_work_thumb_bw_04.jpg"/>
<image title="Project02" main="images/project02_05.jpg" thmb="thumbnails/project_2_work_thumb_col_05.jpg" bw="thumbnails/project_2_work_thumb_bw_05.jpg"/>
<image title="Project02" main="images/project02_06.jpg" thmb="thumbnails/project_2_work_thumb_col_06.jpg" bw="thumbnails/project_2_work_thumb_bw_06.jpg"/>
</gallery>
<projectInfo imgPath="projects/imgs/project02_info.jpg">
<summary><![CDATALorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.]]></summary>
</projectInfo>
</project>
and here is the actionscript.
ActionScript Code:
MyXML = new XML();
MyXML.ignoreWhite = true;
MyXML.onLoad = function(success) {
numimages = this.firstChild.firstChild.nextSibling.childNodes.length;
spacing = 44;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.firstChild.nextSibling.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._y = i*spacing;
this.thumbHolder._x = 0;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
};
MyXML.load("xml_example.xml");
Thanks in advance for any help or pointers guys.
Cheers.
View Replies !
View Related
Actionscript To Load Random External Movie, Fade In, Wait, Fade Out, Repeat
Hello,
I'm trying to construct some AS3 that will load a random one of several external swf files, fade the instance in, wait 5 seconds, fade the instance out, and load a new random movie (it can be the same one; I don't want to get too complicated at this point).
I could do this with no problem using older methods, but the client insists this is written in 3.
Please help; I'm at my wits end!
View Replies !
View Related
Newbie Question - Fade In Fade Out While Trning On And Turning Off A Music Loop
Hello everyone,
This is what I want to accomplish. I want to make my music loop fade in when turning on and fade out while turning off. I'm attaching the .fla of what I have now.
Currently the music loop stops abruptly when the pause button is clicked and starts suddenly when the play button is clicked. I want to smooth this action out and make it fade in when play button clicked fade out when pause button clicked. Hope you got my point.
I have added my sample .fla to show how have I added the music loop and the buttons.
Have this chunk of action script in it to load the music loop and play it infinitely.
PHP Code:
mySound = new Sound();
mySound.attachSound("myloop");
mySound.start("0", "999");
This bit on the puse button with an instance name pauseBTN
PHP Code:
on (release) {
mySound.stop();
playing = false;
playBTN._visible = true;
pauseBTN._visible = false;
}
and this bit on to the play button with an instance name playBTN
PHP Code:
on (release) {
if (playing != true) {
mySound.start(0, 999);
playing = true;
playBTN._visible = false;
pauseBTN._visible = true;
}
}
Please find my attachment here:
Thanks in advance
View Replies !
View Related
Multiple Fade In Fade Out Events On Different Sentences From A Text File?
Hi there
i've just learned to use flash to produce a flash doc that displays the tibetan mind training slogans. they're basically 59 sentences: be a child of illusion, always maintain a joyful state of mind etc etc.
anyway, i'm wondering if anyone knows how i can make it easier to achieve this. at present i've done it by creating individual fade in fade out events along a time line. but it strikes me that it should be possible to create just one fade in, fade out event and get flash to apply this event to all subsequent sentences. even better would be if i could just get flash to pull each sentence from a plain text file. does anyone know how to do this? maybe actionscript can do this. then it would be easy to create a flash file for learning anything from vocabulary to history quotes!
you can view it here:
http://www.geocities.com/tamsin_dev...saverfinal7.swf
here's the flash file
http://www.geocities.com/tamsin_dev...saverfinal7.fla
also, how can introduce a random element into this, so that any of the 59 slogans will be picked.
if you need any further info please contact me at tamsin_devas@yahoo.co.uk i can send you the slogan source files as well if you want.
eventually i want to create a screen saver.
thanks for any help you can provide. i'll write your name in tibetan if you want.
tamsin
View Replies !
View Related
Fade In/out Rollover Effect Problem
I have around 50 buttons in a swf, and I wanna make those rollover effects that leave a tray behind, so I used this script:
on (rollOver) {
setProperty("_root.fadein", _x, "12.9");
setProperty("_root.fadein", _y, "72.3");
_root.fadein.gotoAndPlay(2);
}
on (rollOut) {
setProperty("_root.fadein", _x, "-425.9");
setProperty("_root.fadein", _y, "28.5");
setProperty("_root.fadeout", _x, "12.9");
setProperty("_root.fadeout", _y, "72.3");
_root.fadeout.gotoAndPlay(2);
}
the fadein is a movie that gives the innitial effect, the fadeout movie leaves a tray, that desapears.
the problem is that the tray effect resumes only to two links, on the third passage the first one interrupts.
does anyone know a simple and effective actionscript???
any help welcome.
thanks in.advance
View Replies !
View Related
Rollover Fade In/out And Loader Problems
Hello.
I am currently making a website for my wife and her artwork, but I have run into a few snags in the actionscript department. This website is my first real attempt at making a functional flash site, so I am fairly new to most of the programming involved. Have had many many years of experience with HTML and CSS though.
Our problem is this:
We have a set of thumbnails in a grid, that on rollover, begin playing a 10 frame mc that plays from 50% opacity at frame 1 to 100% opacity at frame 5. On rollout, it plays from frame 5-10 which does the same as what I just explained but in reverse so it reverts back to its 50% opacity state.
The rollover code is:
PHP Code:
on (rollOver) {
_root.thumbholder.elephantmov.play();
}
on (rollOut) {
_root.thumbholder.elephantmov.play();
}
The scripting per frame in the timeline of the fading thumbnail movieclip, is to stop at frame 1, 5, and gotoandplay (1) on the tenth frame.
Now, it all works, but the problem is that when one moves the mouse beyond the borders of the thumnail too quickly, the movie stops at 100% opacity, when we want it to always be at 50% opacity in the rollout state. Can anyone come with a recommendation to alter the code so that this will be possible?
And also, is there somehow to make a movie stop loading the rest of the movie at a specific frame? The site we are making features a language choice at the first frame, and we don't want the loading to begin until the appropriate flag has been clicked, and the preloader starts.
Thanks a lot in advance for any help. Would be much appreciated.
View Replies !
View Related
On Rollover Fade Dyn. Created Textfields?
Hi all,
Trying to make my dynamic created textfields fade with an onRollOver.
I know the basics i.e. Dyn.
1 -Textfield in a MC and
2 - embed the fonts
So here is a part of my AS
ActionScript Code:
for (child = 3; child < count; child++) {
//mc's holders for the dyn textfields
holder = _root.createEmptyMovieClip ("mcLocationHolder" + child, 10 + child);
.....
.....
.....
//here my dynamic textfields
_root.holder.createTextField (["location" + child], 200 + child, 0, (67.5 * position + 20), 301, 47.5);
with (_root.holder["location" + child]) {
//some format code
multiline = true;
wordWrap = true;
.....
....
}
//onrollover fade FX per holder
_root.holder["location" + child]._alpha = 100;
_root.holder["location" + child].onRollOver = function () {
_root.holder["location" + child]._alpha -= 5;
if (_root.holder["location" + child]._alpha <= 0) {
delete _root.holder["location" + child].onRollOver;
}
};
I have embed the font by New font and linkage.
You guessed it, it ain't working. Any tips???
PS i see my textfield react on
ActionScript Code:
_root.holder["location" + child]._alpha = 100;
when i put embedFonts = true in my with () state
But the onrollover function doesn't work ;(
Grtz,
View Replies !
View Related
MC Fade On RollOver/RollOut Problem
I'm trying to fade my mc using goto actions on the timeline of the mc. The first time you rollover and then rollout, the AS works as expected. After that it appears to not execute the rollover again, but instead jumps to the rollout code. What am I doing wrong? Any help is appreciated. Thanks
View Replies !
View Related
Horizontal Menu Fade In And Out On Rollover
Guys i have this menu that gets the number of buttons and subbuttons depending on the xml file. it attaches the buttons to an empty movie click. the same's happening to the subbuttons - they get attached to a different empty mc. everything works fine there. My question is how do make the subbutons in that mc to fade in on rollOver of a button one by one and then fade out again one by one on rollOut. I will probably need to set up some sort of a loop. just having a hard time on where to start. Can somebody sort of push me in the right direction? here are the fla and the xml files. Thanks guys.
[edit]bump..why can't we upload fla's anymore?
i know this is a lot to ask but the AS is attached in a txt file for anybody who can help
[/edit]
View Replies !
View Related
Gallery Help? Rollover And Fade In Functions...
Hey all!
I found this XML gallery a few days ago and am trying to add a few custom touches to it.
I'm trying to get these functions to work with the thumbnails and main images...
Quote:
myImage.onRollOver = function() {
setColor(this);
};
myImage.onRollOut = function() {
returnColor(this);
};
function setColor(target) {
target.onEnterFrame = function() {
target.brightness += 10;
my_color = new Color(target);
myColorTransform = new Object();
myColorTransform = {ra:'100', rb:target.brightness, ga:'100', gb:target.brightness, ba:'100', bb:target.brightness, aa:'100', ab:'0'};
my_color.setTransform(myColorTransform);
if (target.brightness>=60) {
delete target.onEnterFrame;
}
};
}
function returnColor(target) {
target.onEnterFrame = function() {
var my_color;
var myColorTransform;
target.brightness -= 10;
my_color = new Color(target);
myColorTransform = new Object();
myColorTransform = {ra:'100', rb:target.brightness, ga:'100', gb:target.brightness, ba:'100', bb:target.brightness, aa:'100', ab:'0'};
my_color.setTransform(myColorTransform);
if (target.brightness<=0) {
delete target.onEnterFrame;
}
};
}
(where myimage is the temp name of the nonexistent movieclip)
Basically, I'm just trying to get the thumbnails to execute the setcolor on rollover and the returncolor on rollout. here are the files...
www.thepixelsink.com/other/cool.zip
any help would be greatly appreciated! thanks a bunch
View Replies !
View Related
MC Fade On RollOver/RollOut Problem
I'm trying to fade my mc using goto actions on the timeline of the mc. The first time you rollover and then rollout, the AS works as expected. After that it appears to not execute the rollover again, but instead jumps to the rollout code. What am I doing wrong? Any help is appreciated. Thanks
View Replies !
View Related
Horizontal Menu Fade In And Out On Rollover
Guys i have this menu that gets the number of buttons and subbuttons depending on the xml file. it attaches the buttons to an empty movie click. the same's happening to the subbuttons - they get attached to a different empty mc. everything works fine there. My question is how do make the subbutons in that mc to fade in on rollOver of a button one by one and then fade out again one by one on rollOut. I will probably need to set up some sort of a loop. just having a hard time on where to start. Can somebody sort of push me in the right direction? here are the fla and the xml files. Thanks guys.
[edit]bump..why can't we upload fla's anymore?
i know this is a lot to ask but the AS is attached in a txt file for anybody who can help
[/edit]
View Replies !
View Related
Fade In Out With Rollover Buttons And SetInterval
guys,
Please help. I'm banging my head against a wall here and think i'm being silly.
I'm trying to fade in and fade out an image using onRollOver and onRollOut. Basically when i roll over a picture, i want the text to fade in. When i roll out, i want it to disappear. Only problem is, it'll fade in ok but not out.
The image i'm rolling over is called mc_smith_pic and i want mc_smith_info to fade in or out
Here is my code:
function fadeInImage(mcImage:MovieClip):Void {
mcImage._alpha += 10;
if(mcImage._alpha >= 100) {
clearInterval(nInterval);
}
updateAfterEvent();
}
function fadeOutImage(mcImage:MovieClip):Void {
mcImage._alpha -= 10;
if(mcImage._alpha < 100) {
clearInterval(nInterval);
}
updateAfterEvent();
}
mc_smith_info._alpha = 50;
mc_smith_pic.onRollOver = function():Void {
clearInterval(nInterval);
nInterval = setInterval(fadeInImage, 50, mc_smith_info);
updateAfterEvent();
};
mc_smith_pic.onRollOut = function():Void {
clearInterval(nInterval);
nInterval = setInterval(fadeOutImage, 50, mc_smith_info);
updateAfterEvent();
};
View Replies !
View Related
On Rollover Fade Dyn. Created Textfields?
Hi all,
Trying to make my dynamic created textfields fade with an onRollOver.
I know the basics i.e. Dyn.
1 -Textfield in a MC and
2 - embed the fonts
So here is a part of my AS
ActionScript Code:
for (child = 3; child < count; child++) {
//mc's holders for the dyn textfields
holder = _root.createEmptyMovieClip ("mcLocationHolder" + child, 10 + child);
.....
.....
.....
//here my dynamic textfields
_root.holder.createTextField (["location" + child], 200 + child, 0, (67.5 * position + 20), 301, 47.5);
with (_root.holder["location" + child]) {
//some format code
multiline = true;
wordWrap = true;
.....
....
}
//onrollover fade FX per holder
_root.holder["location" + child]._alpha = 100;
_root.holder["location" + child].onRollOver = function () {
_root.holder["location" + child]._alpha -= 5;
if (_root.holder["location" + child]._alpha <= 0) {
delete _root.holder["location" + child].onRollOver;
}
};
I have embed the font by New font and linkage.
You guessed it, it ain't working. Any tips???
PS i see my textfield react on
ActionScript Code:
_root.holder["location" + child]._alpha = 100;
when i put embedFonts = true in my with () state
But the onrollover function doesn't work ;(
Grtz,
View Replies !
View Related
Photo Slideshow - Fade Out/fade In (alpha) - Flash5
Hi all & merry Christmas
For a Photographers portfolio I want to create a fade-out/in effect for when people select one of the photos. All the photos are stored within one SWF.
So OnRelease the selected photo loads and a Var is set. The current photo is being set graduately to alpha 0% and the loaded new photo (which is a MC) is moved to the highest level while this one is being set immediately to alpha 100%.
If I think about it, what I need to code is...
- a var in which the current image is set
- a function which checks what image/mc is in the var
- a function which says something like this:
on release move new image to layer/level below current image (which is on toplevel) and set to 100% ;
set the current image (as set in var) gradually to 0% alpha
and as last move new loaded image to toplevel...
(all images would be put in an SWF which would be loaded into the main SWF)
unfortunately my AS knowledge is fairly limited, so I have no clue how to script this???
anyone an idea or possibly a tutorial which could sort me out???
thanks so much
View Replies !
View Related
Actionscript To Fade In/fade Out Picture Depending On Frame?
I've searched the board but I can't figure out the answer to my question. I just want to fade in/out a movieclip. I can do this with tweens, but I'm really interested in how this would be done with actionscript.
How could I make it so that the fade in occurs with frames 1-15, stops, and then starting with 16 fades out?
I do have some code that will import a picture into a movieclip and fade it in, but I'm not sure how to alter the code so that the pic fades out on frame 16. The code below is fairly detailed... I would not mind a basic solution!!
Thanks for your help!
PHP Code:
init = function () {
this.myContainer = this.createEmptyMovieClip("cont", 1);
cont._x = 0;
cont._y = 130;
this.myContainer._alpha = 0;
this.myContainer.loadMovie("picture.jpg");
this.preloadJpg();
};
preloadJpg = function() {
this.onEnterFrame = function() {
if (this.myContainer.getBytesLoaded()>100 && this.myContainer.getBytesLoaded()>=this.myContainer.getBytesTotal()) {
this.fadePicIn();
}
};
};
fadePicIn = function() {
if(this.myContainer._alpha < 100){
this.myContainer._alpha += 10;
} else {
this.onEnterFrame = undefined;
}
}
this.init();
View Replies !
View Related
|