ActionScript 2.0 :: Allows The Last Function To Work In Alpha?
Aug 30, 2004
I tried using this code because I need some mc to scale, others to fade, and others to move; but it won't work. It only allows the last function to work (in this case alpha).
I've used this code to apply a gradient alpha mask: bg_mc.cacheAsBitmap=true;mask_mc.cacheAsBitmap=true;bg_mc.setMask(mask_mc); Then I applied a motion tween to the mask_mc clip. But the motion tween doesn't happen? It only shows the first frame of the motion tween. It does apply the alpha mask though. Why doesn't it show the rest of the motion tween.
i'd like to make an effect with "alpha", but when i'm using a particular class to set the scrollbar on my text, the text does not respond to my alpha. You'll see that the text does not respond to the alpha 0 at the beginning of the tween.
Here's my code in the fla that imports another class, which imports the scrollbar class ;-) :
import com.greensock.*; import com.greensock.easing.*; var loader:Loader = new Loader; var url:URLRequest = new URLRequest("Rhizo.swf");
I have a papervision project and this problem has kept me from going for days. I have Text3D object in my project and I have to reduce and increase the alpha property of this object , and I do it by changing the alpha property of the ViewportLayer that contains this Object. everything works fine but when I change it's text property due to some circumstances I can't work with it's alpha property anymore.
I change it's text like this: var text1:String = "second string"; mytext3D.text = text1;
I don't (and I can't) use "useOwnContainer" and I use a defined ViewportLayer for this Text3D which I've defined like this: var textLayer1:ViewportLayer = viewport.getChildLayer(mytext3D); And I change the alpha property of this "textLayer1" in order to change the alpha of my Text3D object. Everything works fine till I change the text property and after that when I change the alpha of my "textLayer1" nothing happens!
This is really stupid.. But I can't get any DisplayObjects to take an alpha setting.. They remain full opaque no matter what- if I set alpha=.5, 0.0, etc. I'm using Sprites, but I've tried with TextFields and a couple other things.. Is there any setting, or anything about the containing object that would prevent me from setting alpha? I am really confused on this.
I installed Flash CS4 and the alpha doesn't seem to work. I follow all the instructions to the letter but get no results. I had no problems working in Flash MX
I have this actionscript which works perfectly for a little xml gallery. But What I am trying to do is get a simple alpha transition to work when you select another picture.
I have a problem with animation of TextField. I prepared an animation of MovieClip (containing TextField), that in 0.5sec gets 50% alpha. Then I used "Copy movement as ActionScript 3.0..." option.When I copied it into a class and wanted to animate TextField, nothing matters, excepting weird TF movement.Here my button class code - class works alone:
I've been trying to put together a function that I can reference through various symbols in a movie to fade their alpha properties. So far all I've found is code that forces me to reference the specific symbol in the function, however I have to do this to a BUNCH of symbols over different periods within my timeline, part of which will be triggered by a loaded movie. Any function that will fade up or down that can sit on the _root. and be referenced by any symbol whenever needed?
I have a set of Cue Points in an FLV I'm playing. It's an interactive quiz, so the idea is that flash will change a variable, theAnswer, to a different letter depending on which question it is. The answer to question 1 is B, question 2 is D, etc. Either the cue point event listener isn't working, or else it is working and Flash isn't declaring the variables. 1120: Access of undefined property theAnswer. I literally can't find a single problem with my code. I have an almost identical Event Listener further down which works.
I am new to AS3 and writing classes and keep having a hard time with these error messages I am getting. I have the following AS: public class PrevNextNav { public var back_next_nav:MovieClip; public var next_btn:SimpleButton; public function PrevNextNav() { back_next_nav.next_btn.alpha = .3 } .... etc.
The class works fine, except when I try to set the alpha to 30% in the constructor function, I get this error in the output window. TypeError: Error #1009: Cannot access a property or method of a null object reference. at _classes::PrevNextNav() at InteractivePilotDocument() If I comment that line out, all is good. What does this mean?
The below function goes through once, increments the _alpha of picture1 and then exits....wont loop until _alpha is greater or equal to 100. function delaytext() { if (picture1._alpha >= 100) { picture1._alpha = 100; trace("complete" + picture1._alpha); } else { picture1._alpha += 1; }}
I am working with AS3 to build a very simple mp3 player on my site. So far the play and pause button work fine, but when I try to move the slider then click the pause button, it doesn't pause, and then clicking the play button again causes it to play a new file.I'm assuming that for some reason when I call the playMp3 function from my MouseEvent, it's within an object or something and not at the root, so it's like loading a new sound file, but I don't know how to fix that.URL...
I have a made function to control the alpha of a few squares. The function looks like this:
[Code]....
I know that I can call that function for one mc with: [AS]fadeSq (square1, 0, 4);[/AS] But is it also posibe to call the function for let's say seven mc's at once. I mean without writing seven lines of scrip?
can someone give me an idea how I would use a function to enlarge and change the alpha of a button but make it span over a period of time like it was an animation.a long time ago on gear78.com I think he used functions to make his buttons do what they did and it was badass. if I find another site I will post a link. if you don't know what the heck I am talking about tell me and I will try and explain it more.
[URL] i want the object to fade out but in the object there's a lot of overlapping pictures and each becomes half transparent. how to make the movieclip to change the alpha as it was without objects?
I've written the function below which is called when a button is clicked. I want to change the character image being displayed and change the number_txt variable each time the button is clicked.This works in the first instance (if char 1 is visible it hides it, makes char 2 visible and changes the variable as required). But having done this it wont work the other way (hide char 2, make char 1 visible, change the variable as required)I can only assume I'm missing something in the way the Else IF function should work? If there is a better way of scrolling through 4 or 5 'character' images and updating the variable each time.[code]
When I tell Flash to go back frames the buttons cease to work, in other words, the button only works once. I've tried tracing it to find the problem and when I tell it to go back frames it won't run the function. I'm using actionscript 3 on Flash CS4.[code]
I try to get the addCallback function to work but I don't get a working result. I allways get a js error 'callback is not a function'. I tried to put it on my local-webserver, to fake a domain name (www.localhost.de in hosts file).
For some reason my TweenLite function won't work. Doesn't give any errors, but it just doesn't do anything and thus the onComplete function won't work to continue the script.
hive just started actionscripting instead of tweening so be gentle. i use mx 2004 but i cant get the trace function to work.., here is the code form a kirupa tutorial...
_global.myvar=5; trace (_global.myvar);
why does this not work?i thought it shud display 5.
By chance does anyone know if there is a way to make a set function for my class that will run regardless of what variable is being set? like if someone does..anInstanceOfMyClass.anyVariable="whatever";it will always run function X.I want my code to have a function that runs every time someone tries to set the value of a variable in my class, or create a new variable that does not even exist yet in the class.