I Need TV STATIC
I've made a TV screen for the backgrounds of my site,
Do you have a solution for making good TV Static.
I thought maybe to make a grey rectangle the size of the TV screen in Photoshop, then add a noise filter, and keep adding for different versions to put on a timeline in Flash.?
Is that how you'd tackle it??
uhmmm
FlashKit > Flash Help > Flash General Help
Posted on: 12-02-2003, 11:19 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Are Static Classes Not Always So Static?
I've had two different problems, that I suspect are related, and they both involve static classes that exhibit not so static behavior (or perhaps too static).
The first problem:
I wanted to create a class that behaved like a Dictionary in .NET, to assist me in dealing with some name/value pair. Here is a simplified version:
Code:
class Dictionary
{
private var _dictionary:Object = new Object();
public function Get(key:String):Object
{
if( _dictionary[key] == undefined) throw new Error(key + " does not exist in dictionary!");
return _dictionary[key];
}
public function Add(key:String, value:Object)
{
_dictionary[key] = value;
}
public function get keys():/*String*/Array
{
var myKeys:/*String*/Array = [];
for(var key:String in _dictionary)
{
myKeys.push(key);
}
return myKeys;
}
}
Okay, it worked well until I created a static class with a static member of type Dictionary.
Something like this:
Code:
class Config
{
private function Config() { /*it's static, don't instantiate!*/ }
private static var _dictionary:Object = new Object();
private static function getFromDictionary(key:String):Object
{
Assert.IsNotNull( _dictionary[key], "'" + key + "' is missing from the config file");
return _dictionary[key];
}
/*
* Config Properties
* to cut down on typos...
*/
public static function get SomeInterestingValue():String
{
return String(getFromDictionary("SomeInterestingValue"));
}
}
Now after creating the Config class (which works fine by itself), every member of type Dictionary in instances of other (non-static) classes is referenced to the static instance in Config.
I mean, anytime I instance a class that has a member of type Dictionary:
Code:
class SomeCoolClass
{
var mything:Dictionary = new Dictionary();
}
The member instance is pointed to the private static member _dictionary in Config! (I hope this seems odd to other people and not just me. )
Okay, now, the problem I really care about:
I have a helper class (let's call it Storyboard) for playing a sequence of Tweens. I can add instances of Tween to an Array and the Storyboard will play each one using the onMotionFinished of the previous Tween.
Well, I realized that sometime I need multiple tweens to occur simultaneously. For example, I need the mc to slide in and fade in at the same time.
I extend Storyboard to accept an array of tweens to start simultaneously. So now Storyboard has an array of an array of tweens. Are you with me still?
Now, eventually I call playStoryboard() and everything plays back nicely and in sequence and I no longer have a large set of nasty methods chained by onMotionFinished callbacks. Well, this only works if I am using different easing equations for each tween (in the simulataneous set).
Example, code (this works as expected):
Code:
var twSlide:Tween = new Tween(clip,"_x",Quint.easeIn,0,100,1,true);
twSlide.start();
var twAlpha:Tween = new Tween(clip,"_alpha",Quint.easeIn,0,100,3,true);
twAlpha.start();
Both tweens start together and the fade takes 3 times longer than the slide. Both are using the same easing equation: Quint.easeIn.
When I add them to my Storyboard, twAlpha behaves as if it had the values from twSlide. If I change either easing equation then, it behaves as expected.
How is this related the Dictionary example? Because the easing functions are static functions, but it appears as if an "instance" of the function is being shared between the tweens.
I suspect everyone will want the full code. I will post it later (I need to remove some client-specific stuff, and I'm in a rush; so I posted hoping this is problem that someone can identify quickly).
Please feel free to ask for clarification on any point.
Static Text | Variable | Static Text
i'm thinking i need a simple actionscript to do this but i'm not exactly sure. i have a dynamic text field that is loading a variable named count. however i would like to place static text on either side of the value of the variable. since the variable is an integer that will only increase, it's horizontal width will also increase as well. i can't very well place two strings of static text on either side of a variable that will grow in width over time. does that make sense?
essentially, i want to have a dynamic text box display a string of text, then the value of a variable (that will change in length), then another string of text, but i would like it to all be seamless, looking as if i just typed the whole sentence in a word processor. thanks for your time!
Looking For Tv Static
Hi,
I'm looking for the tv static animation in flash. You know, when we switch on tv but there is no channel working, so there is this black & white chaos on screen, with the irritating noise just like the radio.
I tried searching for it but it's not anywhere, i tried making it but i couldn't. Please someone can help me. I have to build a tv station type thingy...
Thanks,
Rahul
Static
How is static or "TV interference" made like in http://www.dform1shiftfunc.net/ OR http://www.mjau-mjau.com ?
TV Static
I am trying to create 5 TVs with static and only 1 gets hear the event listener and I can figure out what I'm doing wrong can anyone help me ?
here is the code:
ActionScript Code:
var bmd:BitmapData;
var bmp:Bitmap;
var static_mc:MovieClip;
for(var i:int = 0; i <5; i++){
static_mc = new MovieClip();
bmd = new BitmapData(100, 74);
bmp = new Bitmap(bmd);
bmp.x = (bmp.width + 5) * i;
bmp.addEventListener(Event.ENTER_FRAME, addNoise);
static_mc.addChild(bmp);
addChild(static_mc);
}
function addNoise(event:Event) {
bmd.noise(Math.floor(1000*Math.random()), 0, 255, 1|2|4, true);
}
Static?
i am trying to create the effect of static. i have no found the turorial for it yet. any help will be appriciated.
TV Static [as3]
Here is senoculars TV Static converted to AS3
original as2 link
Code:
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BitmapDataChannel;
// create a new movie clip for the static
var static_mc:MovieClip = new MovieClip();
this.addChild(static_mc);
// position the static movie clip with the mask
static_mc.x = mask_mc.x;
static_mc.y = mask_mc.y;
// create a bitmap data instance the size of the mask
// that will be used to draw static in
var _bitmapData = new BitmapData(mask_mc.width, mask_mc.height);
var _bitmap = new Bitmap(_bitmapData)
// attach the bitmap to the static movie clip
static_mc.addChild(_bitmap);
// apply the mask
static_mc.mask = mask_mc;
static_mc.addEventListener(Event.ENTER_FRAME, _static);
// every frame draw static
function _static(e:Event):void
{
var seed:int = int(Math.random() * int.MAX_VALUE);
_bitmapData.noise(seed, 0, 0xFFFFFF, BitmapDataChannel.RED, true);
}
Static
How is static or "TV interference" made like in http://www.dform1shiftfunc.net/ OR http://www.mjau-mjau.com ?
Static Movement
im using this code to move an object but it looks to static
can u help
onClipEvent (keyDown) {
if (Key.isDown( key.LEFT)) {
_x-=10;
}
}
onClipEvent (keyDown) {
if (Key.isDown( key.RIGHT)) {
_x+=10;
}
}
onClipEvent (keyDown) {
if (Key.isDown( key.UP )) {
_y-=10;
}
}
onClipEvent (keyDown) {
if (Key.isDown( key.DOWN )) {
_y+=10;
}
}
Static Effect
Is their anyway to create a static effect or "white snow" effect using actionscript?
Static Layer
Hell,
Does any one know how to make a static layer?
Kind of permanant 'background' layer with different coulors in it. Is it actually possible?
Is it possible to make a transparent flash?? So that it will show the actual HTML background??
-devank
Sticky & Static
The rollovers on buttons are a little sticky (response to the mouseover is slow or absent) and I sometimes get this message appear on screen next to the mouse: STATIC. What's happening?
--------
My environment: Flash MX, Mac OS10.1.5.
Static Effect
does anyone know how to get a kind of... animated tv static effect on an image?
not snowy, but kinda... like when you see those horizontal lines moving up and down across the picture, distorting it a bit
I dunno if anyone has any idea what I'm talking about but if you do, please help
Dynamic Vs Static ?
why is there static text option in Flash if dynamic text looks nice and crisp ?? what's static text for then ?? thx
TV Static In Flash?
Does anyone know how to make TV static in flash? And how I can make it fast loading?
Thanks
Heck, Might As Well In Here.. Static IP?
I am looking at going with a new webhost. And they have an option for a static IP. It costs some more, but does that mean I can host as many domains as I want off that? If so, how hard is that to set up?
Tv Static Effect
does anyone know how to make a tv static effect or have alink to a tv static avi/mpg?
i spose' another name for it is snow.. ya' know tv static like they have on the hbo intro's....
anyone?
Tv Static Effect
Hi everyone!
I am looking for a way to make the actual television set somehow static in. I am not sure if you know what I mean.
Does Anyone Know The Best Way To Make Tv Static
I am trying to create an effect that looks like static from a tv set, like a channel that isnt tuned in, hope you know the effect I am talking about, just lots of black and white dots randomly appearing on the screen.
Also if not that a o****er that you sea at the start of movies sometimes that counts down from say 6 inside that circle thingy.
Please Help
Static Menus
I'm trying to learn how to make static menus in Flash. Meaning that I would like to create a menu that remains in place as everything around it changes. I've figured out how menus work by reading a Flash book that I have and I came up with the following simple menu system on the following site.
http://www.mentatmm.com/flash/mydesigns.html
How would I go about making this menu static instead of having it reload for each scene? The site above is more of a test site than anything, but I don't want to start working on something bigger until I understand the concept behind static menus, and I can't seem to find any tutorials online on the subject.
Oh, and I'm using Flash MX 2004. Thanks!
Static Header
I am looking for a tutorial that explains to me how to make a static header for my web page so the header doesnt reload everytime i visit a new page(movie) of my flash website.
I can't understand the tutorials ive found... And on top of that, I'm afraid I'm going to have to throw away the last 3 weeks of making this website because i didn't make this static header first
If anyone can help, or knows of a good tutorial... please help...
Thanks
Static Or Final ?
Hi,
How is it possible to make a variable constant or final in actionscript ?
Static Animations...
I'm just trying to make a basic stick figure movie, but all of my stick figures are too stiff and stactic-y. Can you guys give me some tips on how to make the animations more fluid?
Static Effect
I've been using this TV static effect as a theme for my site. It recently came to my attention that it demands a lot of processor power. If you view the static and look at processor usage it will be very high, close the swf and the processor usage drops. This is apparently causing some browsers or possibly computers to freeze. I don't want to throw away my static but I can't seem to figure out a fix. As it is now the static is created by spinning a bitmap using action script. I've also tried versions with framed animations of static, ie I have 8 or so images of static that each reside on a keyframe. Both methods cause the high processor usage. Any ideas?
Grr this whole attachment limit, while very understandable, is quite the pain. I have a feeling old post are going to lose some of their files so that new post can be made. Too bad because I troll old post for tips all the time.
Create TV Static
I am trying to figure out how to create a tv static effect with both visual and audio effect. Does anyone have any suggestion or tutorial that they could direct me to? Thanks!
Static Textfields
I have 9 movieclips on my stage, each one having an onEnterFrame function that moves the clip to a new _x. They all move at the same time and it runs nice and smooth - until I add a static textfield to each of them.
This slows down the movie in a way that makes it look like it's to much for my computer.
Is there anything I can do with the textfields that will make the movie go faster? I tried to use "break apart" to convert the text into shapes but that didn't help.
Any ideas?
Static Var Conflict
When a class is not static, I can use reference both the parameter of a method as well as its instance variable:
Code:
function thing(url){
this.url = url;
}
But what if it is a static class, and i had a parameter called url and a static var called url? How do i assign the static var the value of the parameter?
Static Text
Hello, I know that you can execute a URL from static text, I was wondering if you could just as easily execute a line of code in some fashion or another, like:
Obviously this isn't working, so if any one knows a super easy shortcut let's have it!
Static Methods
i made a public static function in my class so i can call it from the timeline, in it i make a instance of a class. but then the instance is counted as static apparently and won't let me run addChild or my methods
Static Functions
What exactly are these? This is part of the script that it's being used in-
static function setLanguage(langIs)
{
lang.LanguageParse._listeners = [];
lang.LanguageParse.addListener(lang.LanguageParse) ;
lang.LanguageParse.Language = langIs;
mx.lang.Locale.setLoadCallback(lang.LanguageParse. storeContent);
mx.lang.Locale.loadLanguageXML(lang.LanguageParse. Language);
lang.LanguageParse.checkInt = setInterval(lang.LanguageParse.checkLocaleStatus, 10);
}
How Do You Use The Tab Key In Static Text?
Does the tab key not work the same as in other text-based programs? I want to indent a few lines of text, and I thought the Tab key could be used to line up everything. Is there some kind of key combination for this to work, or do I just have to keep hitting the space bar until it lines up?
Flash And Static .gif
Hi all,
I've noticed on many web sites that if a Flash movie doesn't load, a static .gif is loaded instead.
Does anyone know how this is done?
Thanks!
Dynamic Txt And Static Txt
How come their look is different when I export to swf? It looks very strange when you actually use dynamic txt comparing with static txt with same font and size. Do anyone have same problems?
### Static Text
Is it possible to get static text to make a call. ie.
Static Text
on (release){gotoAndStop(11);}
I would like to place static text in an application. Then be able to tell it to goto a frame. Can that be done?
Static Vars
Hey everybody,
I've read through Kirupa's explanation regarding static variables, but I just can't get my head around it. Could anybody be so kind to explain to me why and in what cases I should use static variables in classes?
Thanks in advance..
- Ruben
Static Text On The Fly
I want to do some alpha tweening on dynamically created text built with mc.createTextField(). But it doesn't work. I think that only static text fields in a movie clip support the _alpha property. createTextField() doesn't create static text fields, only dynamic and input, right?
Is the only way to set the _alpha property of a text field to have it in the library in a movieclip where the text can't be dynamically updated?
Or is there another way?
Edit: I suppose that I could bitmap characters in a given font and build the movieclip out of those chars on a dynamic basis, then tween the alpha channel that way. My question stands, though, if there's a better way.
Static Vs. Private
Okay, I feel like a total Newbie for having to ask this, but I've gotta do it.
What exactly is the difference between Static and Private (for both Functions and Variables)?
I've been searching around online and in these forums for a good hour or two now, and just can't seem to find the "easy" answer I'm looking for.
Thanks in advance,
Mother
Static Variable ...
this is probably a noob question, so please bear with me.
I have a dynamic textbox, converted into a movieclip. I have added the following code (which describes the angle of the mouse) to the clip. I need to however keep track of the number of times the mouse moves, and the only possible way I can think of is a static variable, but im not sure how to use it here ...
In short, i need a counter inside onClipEvent (mouseMove) {} that dosent reset each time it is called.
onClipEvent (mouseMove) {
if (((Math.sqrt((Math.pow(_root._xmouse-_root.origin._x, 2) + Math.pow(_root._ymouse-_root.origin._y, 2)))) <= 88.3) && ((Math.sqrt((Math.pow(_root._xmouse-_root.origin._x, 2) + Math.pow(_root._ymouse-_root.origin._y, 2)))) >= 38.2))
{
adjside = _root._xmouse-_root.origin._x;
oppside = -1*(_root._ymouse-_root.origin._y);
angle = Math.atan2(oppside, adjside);
angle = ((Math.round(angle/Math.PI*180))-90)*-1;
if (angle < 0)
{angle += 360;}
}
}
thx!
CS3 Static Textfield Bug?
I have just noticed a possible Flash CS3 bug when dynamic text fields and components are scripted via AS3 and combined with manually-authored static textfields.
The problem I get is that the static text fields seem to inherit the text formatting of the AS textfields and/or components. For instance, I have several static text fields that are authored in full-justified text and include superscript formatting. Before I included AS3 textfields in a main document .as file, the static textfields rendered properly (as long as all components and dynamic textfields were also manually-authored). However, once I scripted the components and dynamic textfields in AS3, leaving just the static textfields manually-authored, the formatting of the static textfields is corrupted. It seems as though a static textfield will format using a component's text formatting.
So, the full-justified text is left-justified, the superscript is gone, and even the "Arial" font looks like it has been replaced with "_sans" (although this is difficult to determine, since they are very similar in appearance).
I first noticed this problem after I introduced the main document .as file. When everything was coded in CS3, everything worked fine. Has anyone else experienced this problem?
I am fairly frustrated, because I can't code a superscript dynamically.
Static Functions In As 3
I want to use a simple static function in as3 like used to in as2.
So I can call it like in a one liner such as
(after declaring in class ; private var D :Sprite;
D.create("eeee");
I get the following error
Code:
Call to a possibly undefined method create through a reference with static type flash.display:Sprite.
D.create("eeee");
the class is here
ActionScript Code:
public static function create(s:String):void {
//tf.text = s;
//tf.setTextFormat(tFormat);
}
I dont see how I can declare the above any more than it is ??? thanks for any help, its really holding me back. Wont even get into singletons until I get this basic down.
Change Static Var's Value, Possible?
hey guys, is it possible to change the value of a static variable through a static function?
let say I have something like this:
ActionScript Code:
class myclass {
static var myvar:Number = 1;
function myclass() {
}
static function changeMyvar():Number {
myvar++;
return myvar;
}
}
this does not work, it returns the original value "1"...
thanks
Preloader For Static Map?
I've recently built an interactive map for a ski resort. It has approx 40 layers and is 24 frames long.
Not being an actual movie, can I still use a preloader with this? If I can, will I have to move all the layers three (or whatever) frames forward on the timeline to accommodate the preloader? This would be a major undertaking as the numerical script placement for all the buttons would have to be adjusted accordingly.
Am I missing something here? Is there an easier way?
Thx ~ Tuen
Change A Static TF With AS
Hi - Is there any way to address a static textfield in a movieClip with AS? I want to change the color and selecability of the text using Actionscript (because I have about 50 of them and don't want to open each mc to get at the textfield.) The mc has an instance name but, natuarally, the textfield doesn't.
I used static text because there are less problems with the font displaying on different computers. Now, down the road I have to make these changes. Am I screwed?
TIA some expertise.
JL
Static Class
May be simple question, but...
I've create a static Class. I call it on the main timeline. If I create a second instance anywhere else in the same movie, those two instance refer to the same object. I ceate instance usign MyClass.getInstance();.
Well What I try to understand is the scope of that kind of Class. ie If I load a new swf in my main movie, in that new swf, on the first frame, there is MyClass.getInstance();. But it does not seem to refer to the same object. It's like that new instance, because it is not on the same file, is now a new object???
Does it mean that Static Class Scope is only valid to the same swf file?
If I remove an swf, does it means that all instances of Static Class in a swf is also cleared of the memory at the same time. So when reloaded, all the instance are new???
I thought that static Class was create once in the memory and staying there
Tanx to helping me understand better!
Static Spectrum
I'm exploring the computespectrum method and trying to make it compute faster than realtime.
Is it possible to fastforward sound and still compute it.. Or might there be another way around?
Input the file as raw data and use some algorythm to compute..?
Any ideas on the subject matter is greatly appreciated..
Thank you
Static Sound
Hi everyone ive got a small problem with the sound class Im trying to make my projects more modular and I have a class “button” which includes a rollover sound using the following code
var mysound:mylibarysound = new mylibarysound ();
now im using several instances of my button class and im concerned that im creating unnecessary instances of mylibarysound, so i figured on making the sound static as follows
static var mysound:mylibarysound = new mylibarysound ();
but when I run it I get this error
Error #2068: Invalid sound.
How do I make sure that I get only one instance of the sound no matter how many times I instantiate the button but still keep my code modular ie declaring the sound in the button class
Help? Static Classes In AS2.0
Hi ! There
can anybody tell me about static and dynmaic classes...i want to know whether we can add our own functions to a static class
flash savvy
TV Static Effect
I searched the forum and didn't see what I need, so I figure I'd put this up for someone to take a stab at.
Is there any other way to create the "TV static" effect besides importing a handful of noise bitmaps into Flash and creating a movie?
I know how to make static that way, but I'm looking to create and effect that is a bit more complicated...and possibly lighter in .swf size.
If you've seen the latest E-trade commercial or heck really any show or movie, I want to have an image that is inturrupted intermittenly (sp?) with static (bad reception).
Any suggestions?
I'm not really good with AS2.0, but if someone has a suggestion that calls for it, I'm willing to burn some midnight oil.
Thanks.
Static Photoviewer
Hi,
I am building a static photoviewer.
The point is that it will show 4 pictures in box placed boxes. Making it dynamic is to hard for me. :s
I load the picutres thru XML. All this works just fine... except for the following problems.
The boxes where the images should be shown in are 128*96, and the picutres are much bigger. I don't know how to resize the JPG's. I searched with google for a hint how to get the size of a JPG image loaded with loadMovie in flash, but didn't got no good answer.
This is my actionscript:
PHP Code:
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("http://www.kazamwebdesign.com/new2/images/pics/img.xml");
p = 0;
this.onEnterFrame = function() {
picsize1 = picture1.getBytesTotal();
picsize2 = picture2.getBytesTotal();
picsize3 = picture3.getBytesTotal();
picsize4 = picture4.getBytesTotal();
picload1 = picture1.getBytesLoaded();
picload2 = picture2.getBytesLoaded();
picload3 = picture3.getBytesLoaded();
picload4 = picture4.getBytesLoaded();
var filesize = picsize1+picsize2+picsize3+picsize4;
var loaded = picload1+picload2+picload3+picload4;
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture1._alpha<100) {
picture1._alpha += 10;
}
if (picture2._alpha<100) {
picture2._alpha += 10;
}
if (picture3._alpha<100) {
picture3._alpha += 10;
}
if (picture4._alpha<100) {
picture4._alpha += 10;
}
}
};
function firstImage() {
if (loaded == filesize) {
picture1._alpha = 0;
picture2._alpha = 0;
picture3._alpha = 0;
picture4._alpha = 0;
picture1.loadMovie(image[0], 1);
picture2.loadMovie(image[1], 1);
picture3.loadMovie(image[2], 1);
picture4.loadMovie(image[3], 1);
}
}
The next problem I have is that I want to use a mouseover (rollover) on the images, se when I roll over image 1.. the size of the image will be 256*192 and will move the over 3 images to the side. On rollout it will go back to 128*96. I can't apply this either to my image... I don't know how to resize the mask to.
I uploaded my script here:
- The images:
- - http://www.malakapower.com/~paul/ope...lash/photo.zip
- The test script I made for testing how to resize movieclips:
- - http://www.malakapower.com/~paul/ope...esize_test.zip
Can somebody please help me with this, and explain to my how I should do this. Please remember that I am defenitly no flash expert.
Thanks a bunch!
Best regards,
Paul Peelen
|