Bulk Loading Filter Settings
You'all have inspired me to try to do this with script rather than frame animation.
The commented out loop doesn't work;
but the 'long way' of scripting below does work.
Code:
// Tried to load filter settings by loop;
//gives warning about script making computer run slow etc.:
/*var gfVar:Array= [gf0, gf1, gf2, gf3, gf4];
for (var i = 0; 4; i++){
var gfChoice = gfVar[i];
var gfChoice:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
}*/
//Trying to automate this below with above loop(this works, loop doesn't)
var gf0:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
var gf1:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
var gf2:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
var gf3:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
var gf4:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
var gf5:GlowFilter = new GlowFilter
(0x00ff00,.50,67,54,50,1,true,false);
i also then tried to loop through loading RollOver/Out functions on matching buttons. But, once again found myself having to do it in 'longhand' rather than looping to make it work.
i'll post that later if i don't get it figured out with help on loop here.
Thanx,
-KC
General Flash
Posted on: Tue May 08, 2007 3:23 pm
View Complete Forum Thread with Replies
Sponsored Links:
Dynamic Filter Settings
I have dynamically created a drop shadow for an mc in my project. That's no big deal. The settings are not difficult, either. This is the frustrating part - I cannot get the settings to change on the fly and react to input. In this instance, I am using a couple of equations to determine the distance between the mouse and the mc and the resultant angle. I am trying to get the drop shadow filter to use this data and alter its distance and angle settings to react. So far, no dice. Any ideas?
Attach Code
myDropFilter = new flash.filters.DropShadowFilter();
var myFilters:Array = mc01.filters;
myFilters.push(myDropFilter);
mc01.filters = myFilters;
_root.onEnterFrame = function () {
distX = _root._xmouse - mc01._x;
distY = _root._ymouse - mc01._y;
shadowDist = Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2));
trace(shadowDist);
rad = Math.atan2(distY, distX);
angle = rad*(180/Math.PI);
trace(angle);
}
View Replies !
View Related
Bulk Publish?
Ok, I will try to tell the short version of this story.
I have a ton of .fla's in a version control system. My client now wants to place the swf files on a CD for use by people who either don't have an internet connection or a really slow one.
Here is the problem. I have to download all fo the fla's, then open each one and publish it. Is there anyway or freeware program out there that anyone knows of that will bulk publish a bunch of fla's to swf's.
THANKS!
View Replies !
View Related
Bulk Preloader
I am trying to preload a bunch of external assets (jpg and swf) in the background during an intro. Does anyone know of a way to monitor the bytesTotal and bytesLoaded for all assets combined and not just one at a time?
View Replies !
View Related
Theory7.com, Flashstore Bulk Self Off
Theory7 is now selling all below for $99
- Theory7 forum basic
- Theory7 forum pro
- Guestbook
- Guestbook pro
- Theory7 v6.5 complete site
- Interface disc slecetor
- Interface vertical nav
- Interface horizontal nav
- Game - T7 fighter
- Vector 3D pack 1
- Vector 3D pack 2
- Vector 3D pack 3
- Music loop - drum & bass piano
- Music loop - deep house piano
- Music loop - piano string beat
I think for anyone wanting to look at how a dynamic site is built this is a must.
The only draw back and reason for sell-off is there is no support for any of the products.
To find out more please visit www.theory7.com
Thanks
Paul
View Replies !
View Related
[F8] Preload Bulk Images...Possible?
I'm trying to find a script that will allow me to bulk preload a group of images. Let's say there is a group of 10 images that equal to be about 1MB...how can I load them as a group rather than individually? I want to have a preloader go from 0 to 100 percent for the entire load...not individual loads.
Can it be done?
View Replies !
View Related
Bulk Conversion To .png Format
Hi all,
i'm using Quarbon viewlet builder to take screen grabs which i then import into a library, however when i want to use these images i need to convert them to .png format as this reduces the file size....does anyone know if i can bulk convert the bitmaps in the library to .png or another high quality small size format?
thanks,
duffi
View Replies !
View Related
Bitmapdata, Apply Filter To One Channel? Realease A Filter
Hi there, I have two question:
Is it possible to apply a filter only to one channel or to access only one channel?
I've found somewhere:
Display.BitmapData.Channel.ALPHA
Is it something we can access at runtime?
When I appply a filter to a Bitmapdata, the Bitmapdata isn't really modified but just filtered, so if for example I copy one of its channel to another bitmapdata, I copy the source bitmap without the filter...
What I'd like to do is "release" the filter so it definetely modify the image. Is it a function to do so or can I only perform this by doing a screenshot of my MovieClip?
Thank you inadvance for your help.
View Replies !
View Related
Help Loading Image With Some Filter Effects
Hi
I'm quite new to as3 coding, and right now I stumbled uppon some code that I can't make work the way I wish. Its simple ripple effect wich works with plain background color, but I'm trying to put some image behind that.. I'm right now out of ideas so any help is appritiated.
The efect itself is conteined in 2 as classes.
Ripples.as (main document class)
ActionScript Code:
package
{
import flash.display.Sprite;
import flash.events.*;
import RippleCanvas;
public class Ripples extends Sprite {
private var subobj:RippleCanvas;
public function Ripples() {
trace("Ripples started..");
var subobj = new RippleCanvas();
this.addChild(subobj);
}
}
}
RippleCanvas.as (subclass of Ripple)
ActionScript Code:
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
public class RippleCanvas extends Sprite
{
internal var sourceBmp:BitmapData;
internal var paintBmpData:BitmapData;
internal var paintBmpData2:BitmapData;
private var buffer:BitmapData;
private var paintBmp:Bitmap;
private var output:Bitmap;
private var brush:Sprite;
private var logo:Sprite;
private var filter:BitmapFilter;
private var filter2:BitmapFilter;
//public var Mis:Boolean;
private var dispFilt:BitmapFilter;
private var outputBmpData:BitmapData;
private var surface:BitmapData;
internal var pt = new Point(0,0);
internal var matrix1 = new Matrix();
public function RippleCanvas()
{
paintBmpData = new BitmapData(128, 98, false, 0x40);
paintBmpData2 = new BitmapData(128, 98, false, 0x40);
logo = new Sprite();
brush = new Sprite();
brush.graphics.beginFill(0xFFFFFF,1);
brush.graphics.drawCircle(0,0,4);
trace ("RIppleCanvas started..");
surface = new BitmapData(128, 98, true, 0x000000);
surface.draw(logo);
//var ty:picture = new picture();
//var sourceBmp:Bitmap = new Bitmap(picture);
//addChild(sourceBmp);
sourceBmp = new BitmapData(128, 98, false, 0x40);
buffer = paintBmpData.clone();
outputBmpData = new BitmapData(128, 98, false, 0x40);
scaleX = 8.0;
scaleY = 8.0;
//this.addEventListener(MouseEvent.MOUSE_MOVE, this.moveHandler, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_DOWN, this.downEvent, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, this.upEvent, false, 0, true);
this.addEventListener(Event.ENTER_FRAME, this.update, false, 0, true);
paintBmp = new Bitmap(paintBmpData);
var cmat:Array = [ 1, 1, 1,
1, 1, 1,
1, 1, 1 ] ;
filter = new ConvolutionFilter(3, 3, cmat, 9, 0);
filter2 = new BlurFilter(4,4);
output = new Bitmap(outputBmpData);
// output.blendMode = BlendMode.ADD;
//paintBmp.blendMode = BlendMode.ADD;
addChild(output);
addChild(paintBmp);
// var tf = new TextField();
// tf.text = "testing123";
// addChild(tf);
disp = new DisplacementMapFilter(paintBmpData2, new Point(), 4, 4, 48, 48, DisplacementMapFilterMode.IGNORE );
this.filters = new Array(new BlurFilter(16, 16));
}
function update(e:Event)
{
if(parent!=null) {
//&& Mis==true){
var localPt:Point = parent.globalToLocal(new Point(parent.mouseX*0.125, parent.mouseY*0.125));
var m:Matrix = new Matrix();
m.translate(localPt.x, localPt.y);
sourceBmp.draw(brush, m, null, 'invert');
}
//trace (localPt,Mis);
paintBmpData.applyFilter(sourceBmp, paintBmpData.rect, pt, filter);
paintBmpData.draw(paintBmpData, matrix1, null, 'add');
paintBmpData.draw(buffer, matrix1, null, 'difference');
paintBmpData.draw(paintBmpData, matrix1, new ColorTransform(0, 0, 0.98609374, 1, 0, 0, 2, 0));
paintBmpData2.draw(paintBmpData, matrix1);
outputBmpData.applyFilter(surface, outputBmpData.rect, pt, disp);
buffer = sourceBmp;
sourceBmp = paintBmpData.clone();
}
public function downEvent(e:Event)
{
if(e.stageX == 0 && e.stageY == 0)
return;
//trace("ok",Mis);
var curPt:Point = parent.globalToLocal(new Point(e.stageX, e.stageY));
//var Mis=true;
e.stopPropagation();
}
public function upEvent(e:Event)
{
//var Mis=false;
e.stopPropagation();
}
}
}
View Replies !
View Related
Anyone Know How To Bulk Rename Library Items?
is there a jsfl out there or some other way I can rename a few hundred mcs in my library and take out the last four characters?
I have thousands of buttons with " - C" as the last four characters that due to another code I'm using now, I need to do away with
I've found various .mpx files and some jsfl that enable me to completely rename library items and add the prefix/suffix of my choice - but what I need is a find/replace type of renaming tool that will let me just take off the last four characters so that when I run my other jsfl file - the one that creates instance names - the instance names won't all have " - C" at the end - rendering an otherwise brilliant piece of code by Mooska completely useless.
View Replies !
View Related
Paypal Button Bulk Order Problems
i want to make this button code have an order of ten of my items at once (bulk order)
the "add script has the numer of items, but when i enter say, 10, paypal only adds 1 item still...
any suggestions on how to change the number of items to more than one added to the cart at once?
on (release) {
var formData = new LoadVars();
formData["add"] = "1";
formData.cmd = "_cart";
formData.business = "email@email.com";
formData.item_name = "Product Name";
formData.amount = "13.00";
formData.page_style = "Paypal Page Style";
formData.shipping = "5.00";
formData["return"] = "http://www.website.com";
formData.currency_code = "USD";
formData.lc = "US"
formData.bn = "PP-ShopCartBF"
formData.shopping_url = "http://www.website.com/shopping.html";
formData.send("https://www.paypal.com/cgi-bin/webscr", "_self", "GET");
}
View Replies !
View Related
Colormatrix Filter And Blur Filter Tween
Last edited by sks447 : 2006-10-17 at 15:11.
I want to have a picture fade from blurry and grayscale to sharp and colorized. I have the blur to sharp part working ok. I have the grayscale to color to working ok. The only thing is the filters dont work together. Ive tried to push one into another with no luck yet. You can see the comments in the code below. Thanks.
ActionScript Code:
function blurFunction(myVar) {
// init what movieclip to blur
if (myVar == undefined) {
myVar = promoContainer.p1;
}
// BLUR FILTER
import flash.filters.BlurFilter;
import flash.filters.BitmapFilter;
import flash.filters.ColorMatrixFilter;
var blurFilter:BlurFilter = new BlurFilter(0, 0, 3);
desaturation = 1;
var filterArray:Array = new Array();
filterArray.push(blurFilter);
var blurX:Number = 100;
var blurY:Number = 100;
onEnterFrame = function () {
prevPromo._visible = false;
nextPromo._visible = true;
if (desaturation>=1) {
des = -0.03;
} else if (desaturation<=0) {
des = 0;
delete (onEnterFrame);
}
desaturation += des;
// color matrix
//myVar.filters = new Array(getDesaturationFilter(desaturation)); <---- I can have this....
blurX -= 10;
blurY -= 10;
blurFilter.blurX = blurX;
blurFilter.blurY = blurY;
// blur filter
//myVar.filters = filterArray; <---- Or I can have this but not both.......
if (blurY<=0) {
blurY=0;
blurX=0;
//delete (onEnterFrame);
}
};
}
function getDesaturationFilter(t:Number):BitmapFilter {
t = t != undefined ? t : 1;
var r = 0.212671;
var g = 0.715160;
var b = 0.072169;
trace("colormatrixfilter called");
return new ColorMatrixFilter([t*r+1-t, t*g, t*b, 0, 0, t*r, t*g+1-t, t*b, 0, 0, t*r, t*g, t*b+1-t, 0, 0, 0, 0, 0, 1, 0]);
}
View Replies !
View Related
[noob Filter] Reloading A Movie After Loading A Random Mc...
Hi, I have the following problem. Probably it´s very easy to solve.
I have a 1 frame flash movie that loads random movies into a movieClip.
What I want is that at the end of each loaded movie, the movie will unload itself (its already working) and reload the main movie so another random movie is loaded instead.
The code to load the random movie is as following:
filename = ["hipotecarios_1.swf", "hipotecarios_2.swf", "hipotecarios_3.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);
What I dont have is the code to put at the end of each loaded movie to make the "randomization" happen again. Anyone can help?
Thanks a lot in advance.
View Replies !
View Related
Loading Config Settings From XML
So I have some code that needs a bunch of configuration settings to be set first before it executes.
Since I want the settings to be enviroment-specific and easily customizable I put them all in an XML file. The problem is that I need to ensure that the settings have completed loading into my class variables BEFORE any functions are invoked on the object (because otherwise it will break since the settings aren't done being 'set').
How can I accomplish this? Its like I need a preloader or initializer for my class?
View Replies !
View Related
Export Frame For Classes In Publish Settings Flash Action Script Settings
My preloader doesn't load until 100KB into the movie
and I figured out it's because it's loading my components
(I'm using 3 instances of a Media Display and of a Media Controller)
in the first frame.
So I changed the Flash ActionScript Settings (in the Publish Settings)
to Export Frame for Classes 2
which made the first frame much lighter -
an acceptable 10K
BUT that made my components act very badly.
Please help!
Thanks!
View Replies !
View Related
Loading Image To Movieclip - Security Settings?
Hi,
I'm loading jpg to videoclip and it works on Flash IDE preview, but not in published .swf (IE)(It doesnt load images)
How to make it work?
I have tried adding
System.security.allowInsecureDomain("*");
System.security.allowDomain("*");
But no difference..
*edit: I'm viewing the published swf in network drive, the images would be loaded from intranet http, is that a problem?
View Replies !
View Related
Bulk Import Statments Vs. Specific Import Statements...any Performance Difference?
Lets say I have 20 classes located at nl/amsterdam/simulation/model/. Now I'm writing another class that is going to use some of those 20 classes. Is there any performance difference in the compiled swf if I import them all using a wildcard:
Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.*
...
versus importing each specific one that I need?:
Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.model.Tulip;
import nl.amsterdam.simulation.model.Canal;
import nl.amsterdam.simulation.model.Prostitute;
import nl.amsterdam.simulation.model.StonedTourist;
import nl.amsterdam.simulation.model.BuisnessMan;
import nl.amsterdam.simulation.model.Windmill;
import nl.amsterdam.simulation.model.CoffeeShop;
import nl.amsterdam.simulation.model.SkinnyBuilding;
...
Or is there only a difference in the time it takes to compile, not the time it takes to execute?
View Replies !
View Related
Hue Filter And AS?
Hi guys,
I'm trying to get to grips with adjusting filters on the fly with actionscript. However I am simply lost..... Specifically I am trying to adjust the hue of a movieclip called box_mc which is on the root of the movie. I have no idea how to do this, and the help in flash has further confused me even more.
Despite my embarassment I am asking for any useful tips or advice.
Any help would be appreciated,
Steven.
View Replies !
View Related
XML Filter
I have a photogallery that initially loads all of my images with thumbnails. What I want is to have a checkbox next to my thumbnails that filter out certain images as well as their thumbnails. I'm not sure how to do this.
Do I have to reload the XML and with the function loading each thumbnail or is there a way to do this that simply hides/shows those images and thumbnails? I'm guessing that I have rerun through the xml so that my thumbnails are evenly spaced apart. What's the fastest way to go through the images and filter out the ones I don't want to show?
Help Kirupa!
View Replies !
View Related
Filter
Hi
I want to dynamicaly change the filters
For example imagine we have a picture and we want to blur it or drop shadow and etc... BUT not in our work space... I want to have a dynamic one and change the filters in my swf file.something like scrolling and changing the filters from our swf file.
Please help me
Best regards
Ali
View Replies !
View Related
Filter?
how can i do this:
I have 2 text boxes, original and filtered.
original is an input text box and when u type for example "what the hell" in it, and u want "hell" to be filtered,, it will come up as "what the bleep" in the filtered text box...?
thanks.
View Replies !
View Related
[AS3] Filter Bug
I have just run into a bug when using filters in AS3. I'm not sure if this is just related to the DropShadowFilter class or not but you can see it here. Drag 'n' drop the blocks and you will see that the drop shadow isn't cleared from the screen until the bounding box of another display object is moved over it.
I was just adding some extra 'spice' to my drag manager class when I ran into the problem. What the drag manager does is remove a component from it's original display list and add it to the stage, this allows the component to be freely dragged around from display list to display list.
However, it seems that Flash is getting confused when a display object is moved from one display list to another. Does anyone else know about this problem, or does anyone know how to 'fix' it?
View Replies !
View Related
Language Filter
Hi actionscript gurus... I'm lost again.
Pretty easy I hope. How can you (and is it possible to) filter an input text form in flash.
I currently have something like this:
Code:
} else if (comment eq "***" or comment eq "***" or comment... etc...){
status = "Please no - bad words !";
But this only seems to work if I type "***" in the text field, and only "***". So if I type "you're such a ***" It won't recognise it.
I there a way to make it search the whole text field for a certain word?
Thanks,
-Laz-
View Replies !
View Related
Flash IP Filter
Hello
i am trying fo make an IP filter but i have bumped into some difficulties
at my movie at the first frame i have code loadVariablesNum("ip.php",1);
_level1.onData=function(){
gotoAndPlay(this.myvar);
}
and at my ip.php
<?php
$CheckIP = $_SERVER["REMOTE_ADDR"];
if ($CheckIP =='217.11.238.194') { $myvar="3"; }
else{ $myvar="500"; }
?>
but unfortunatlz i have some mistakes here so this system does't work i need some help on this one
Any advices are welcome
Thanks!
View Replies !
View Related
Filter Effects
Any help would be very, very welcome,
I'm a bit new to this fangled flash thingy. My background is PhotoShop and photography, video and still.
I've notice in flash there are some that apply "shimmer" and "ripple" effects to photos..
How is this done, it looks like a photoshop plugin, but then exported to flash...
Can anyone shed some light on this?
Thanks......
View Replies !
View Related
Filter Funk
I'm trying to filter a v2 dataset with the following function:
Code:
function selectCoverage( option:String ):Void {
trace( "Coverage option selected: " + option );
xmlDataSet.filtered = false;
if( dataFilter == option ) {
dataFilter = "";
} else {
xmlDataSet.filtered = true;
xmlDataSet.filterFunc = function( item:Object ) {
trace( item.coverage.attributes.type == option );
return( item.coverage.attributes.type == option );
}
dataFilter = option;
}
ListBox.refreshFromSources();
}
The idea is that the user clicks on one of three buttons, and the data is than filtered to show only the fields with a particular attribute set to that value (passed to the function as the variable "option"). A listbox (called, imaginatively enough, "ListBox") is then refreshed with the name of each record. Both the dataset and the list are sorted alphabetically.
That's the theory, anyway. What actually happens is that all the records remain visible, but the sorting in the list gets toggled on and off each time you press one of the three buttons. I know the function is returning the trues and falses correctly, because I had trace statements in there to test it.
If anyone has any thoughts on this, it would be very helpful.
Rys
View Replies !
View Related
Filter Transitions
Hello, can anyone give me a code example of transitioning the filters? is there a way to work with the filters using transition codes similar to the mx.transitions of mx 2004? it would be great if you could give a start value and end value for the parimeters of the filters such as blur/glow, and a time value. if there is examples of this, please post here! thanks.
quentin
View Replies !
View Related
Blur Filter
Hey everyone,
I am trying to get my file so that when I click a button named "button 2" the instance named "big" gets a blur filter, slides to the right 100 pixels, and then the blur filter turns off....... Can anyone PLEASE help? I've been trying to do it all night... Thanks in advanced!
-Joe
View Replies !
View Related
PLEASE HELP Trying To Filter XML List Box?
I am using Flash MX Pro 2004 and I am trying to populate a list box with XML data using the standard XMLConnector etc - of which I am having
no problems.
The problem I'm having is trying to filter this data. It's driving me round the bend. I've tried all the "use path expression" variations i can think of still
with no joy.
I have attached a sample "trips" application which I built from a tutorial. It is not the application that i'm working on but the principles are exactly the same (i.e need to filter an XML list box).
In the sample that I have attached I would like to filter the Trip list box to only contain the trips where the travel xml field = "boat".
Anyone have any Ideas I'm really struggling?
I had to rar then zip the file because the max size is 300Kb and winzip only managed 450Kb and rar was an invalid file upload format.
Or there is a link here..XMLFilterHelp.zip
Thanks in advance people!
View Replies !
View Related
Blur Filter
Hi,
i am trying to use the blur filter.. myMc is blurred fine untill i load a new swf into it, than the blur filter is removed.. is there any way to avoid this?
PHP Code:
import flash.filters.BlurFilter;
var filterArray:Array = new Array();
var filter:BlurFilter = new BlurFilter(100, 100, 2);
filterArray[0] = filter;
myMC.filters = filterArray;
many thanks,
Gareth
View Replies !
View Related
Filter Button
Got a list of MCs being populated from an XML file. Basically a list of two different types of information. Some are type A, some are type B.
Want to have a couple buttons that filter based on type (so if I push the button for type A (called "typeAbtn" below), only those MCs appear, type B MCs go to _alpha = 0 or something).
Can't seem to come up with a function to do it.
terrible attempt:
Code:
function showMCs() {
for (var j = 0; j<stuff.length; j++) {
MC = timeline_mc["MC"+j];
MC.type = xml.blahblah.attribute.type;
...
typeAbtn.onPress = function() {
if ( MC.type == "B" ) {
MC[?].alpha = 0;
}
}
View Replies !
View Related
Easing On A Filter
playing with filters today...i totaly get the concept, adding, removing, different kinds, etc. However, can i get a lead on how to gradually add a filter? I.E> click a button, and a filter will easeOut/easeIn (depending)....right now, i can't think outside of the "instant on/off" process! I came up with this, but i am sure how to add in the ease...
Code:
import flash.filters.BlurFilter;
var afFilter:Array = [];
var xO = 0;
var y0 = 0;
function addBlur(targetBlur) {
xO++;
yO++;
var blr:BlurFilter = new BlurFilter(xO, yO, 2);
afFilter.push(blr);
mc.filters = afFilter;
if (xO>=targetBlur) {
clearInterval(nBlur);
}
updateAfterEvent();
}
nBlur = setInterval(addBlur, 15, 14);
View Replies !
View Related
[F8] Filter Dataset (XML)
I'm trying te load tour-dates from an XML-file into Flash using XMLConnector and a DataSet. So far...no problems. Now I want to filter out all dates prior to the current date. A Zip-file with the currnet .fla and .xml is included.
Any suggestions?
View Replies !
View Related
[F8] Glow Filter Help
Hi,
I have an earth glowing this is the action script i used to do that...
Code:
var Glow:Number=150
import flash.filters.GlowFilter;
color=0x0066FF;
alpha=20;
blur_X=Glow;
blur_Y=Glow;
s=2;
q=2;
ig=false;
k=false;
var filter:GlowFilter = new GlowFilter(color,alpha,blur_X,blur_Y,s,q,ig,k);
var filterss:Array = new Array();
filterss.push(filter);
r.filters = filterss;
So with the glow i want it so that if the user presses a button it decreases the blur_X and blur_Y value, so i have used a variable called glow.
Now what i have on a button is
Code:
on (release) {
Glow-=100
}
To test wether the value is decreasing i have used a dynamic text box (and it is going down) but the problem is that the glow still remains the same
How do i make it so that when the button is pressed the glow decreases, does it need to loop the frame somehow so it reloads the script?
View Replies !
View Related
Filter Vs Texture
I'm trying to add some effects to some text to spas the text up. I have 3 different effects that I want put on. 2 of them are flash filters and the other one is a texture. I'm using the perlinNoise function to create the texture and then I'm using a mask to apply it. My problem is when I try to apply the mask to add the texture, the filters disappear and the only thing that is remaining is the texture.
With filters: http://www.typhoonent.com/genesislogo.swf
With texture: http://www.typhoonent.com/genesislogotextured.swf
The filters: I'm using a glow filter to color it but since the texture colors it then I remove it.
code: var counter:Number = 1;
var nDec:Number = 0;
var gf:GlowFilter = new GlowFilter(0x01A954, 100, 100, 100, 400, 0, true, false);
onEnterFrame = function () {
if (--counter == 0) {
var dsf:DropShadowFilter = new DropShadowFilter(10, nDec, 0x000000, 100, 10, 10, 1, 3, false, false, false);
var bf:BevelFilter = new BevelFilter(5, nDec, 0xFFFFFF, 100, 0x000000, 100, 10, 10, 1, 1, "inner", false);
holder.filters = [gf, bf, dsf];
delete bf;
counter = 4;
nDec += 4;
if (nDec>359) {
nDec = 0;
}
}
};
This code attaches each letter and places them and then applies the texture
letterArray is pointing at each individual letter.
code: var bitSource:BitmapData = new BitmapData(sWidth, sHeight, true, 0xFFFFFF);
for (i=0; i<letterArray.length; i++) {
holder.attachMovie(letterArray[i],letterArray[i],++d);
holder[letterArray[i]]._xscale = holder[letterArray[i]]._yscale=scale;
if (i<1) {
holder[letterArray[i]]._x = xPos[i];
holder[letterArray[i]]._y = yPos[i]+stageBorder/2;
} else {
holder[letterArray[i]]._x = holder[letterArray[i-1]]._x+holder[letterArray[i-1]]._width+xPos[i]*scale/100;
holder[letterArray[i]]._y = yPos[i]+stageBorder/2;
}
//Texture
_root.createEmptyMovieClip("sourceClip"+i,++d);
bitSource.perlinNoise(random(30)+20,random(30)+20, random(23)+1,1,true,true,2,false);
this["sourceClip"+i].attachBitmap(bitSource,10,"auto",true);
this["sourceClip"+i]._width = holder[letterArray[i]]._width;
this["sourceClip"+i]._height = holder[letterArray[i]]._height;
this["sourceClip"+i]._x = holder[letterArray[i]]._x;
this["sourceClip"+i]._y = holder[letterArray[i]]._y;
this["sourceClip"+i].setMask(holder[letterArray[i]]);
}
Any ideas on how to fix this?
View Replies !
View Related
Displacement Map Filter HELP
Hi! I want to make a movieclip look like a sphere, and then paste an image (like the earth) onto it, and then rotate, giving the effect of a rotating planet. I want to be able to rotate it in all directions. I've heard about Displacement Map Filter, and I have no idea on how to use it. I've already checked Flashkit for info, and all the links...but I still can't get a hang of it.
Can someone PLEASE explain it to me, and maybe provide a bit of source code so I have something to work with? This is really slowing down my big game project!!! Please help!
View Replies !
View Related
[F8] Filter An Array
I have an array that looks like this:
100_0061.JPG,100_0064.JPG,100_0068.JPG,100_0069.JP G,test.swf,test.fla
and the code that is building it:
//jpgs to load
basePath = mdm.Application.path + "presFiles/"
var myFiles:Array = mdm.FileSystem.getFileList(basePath, "*.*");
numberOfFiles = myFiles.length
How can I remove the swf and fla files and update the length of the array.
Thanks in advance!
View Replies !
View Related
Filter XML Attributes
Hey,
I'm working on an site with XML driven data. I have some actionscript that returns attributes from a childnode in the xml file. This pulls attributes from many different entries, and some are duplicates. I am trying to create a filter that will return each entry only once and reject it if it already exists in the list. Any suggestions on this? Hopefully my description isnt too vague. I can attach an example if needed. Thanks!
View Replies !
View Related
Blur Filter.....
I came across a web site and am wondering how they blurred the whole screen. I have Flash 8 and I can blur each MC but I don't know how to do a full blur effect that covers all images, text, mc's, and layers of the Flash file. Any help?
www.firstbornmultimedia.com and the effect I am referring to is in the portfolio section then click on a thumbnail and then click to see the project and the portfolio is screened and blurred out of focus.
Thanks for the help!!!!
View Replies !
View Related
Filter Failure
well, I encountered a problem when I tried to apply the filter effecct on one image. But, suddenly there is this debug problem that came out. I tried the same thing on a lower sized picture but the same problem occur while processing the image. How can I deal with this problem
View Replies !
View Related
Filter Years
Hi,
Basically i'm trying to filter dates from a database via asp into flash. Initially It works by getting the current date and month from flash and passing everything through, but if I try and dynamically change the year and month by pressing a button (see last piece of code) nothing happens,
Any ideas
Code:
function newsload(thismonth,thisyear){
newsData = new LoadVars();
newsData.load("getdetails.asp?Year=" + thisyear + "&Month=" + thismonth );
newsData.onLoad = function (success)
{
if (success == true)
{
_root.info.text = unescape(this.thetitle) + unescape(this.Name);
} // end if
};
}
else
{
info.text = "Cannot load data...";
} // end if
};
};
newsload(firstthismonth,firstthisyear);
Code:
on(press){
_root.newsload("4","2006")
}
View Replies !
View Related
Blur Filter Help
I am trying to apply a blur to a movie clip and 'unblur' it on a RollOver of the macro_btn, It is blurred at first but doesnt unblur.
Im not sure what's wrong with my code:
Code:
import flash.filters.BlurFilter;
var blurred:BlurFilter = new BlurFilter(5, 5, 4);
var storedBlur:Array = [blurred];
bug_mc1.filters = bug_mc2.filters = storedBlur;
macro_btn.onRollOver = function() {
_root.bug_mc1.filters = null;
}
macro_btn.onRollOut = function() {
bug_mc1.filters = storedBlur;
}
any ideas?
many thanks
View Replies !
View Related
Blur Filter Help
Hi,
I want to put on a blur filter using actionscript.
Here is the code i used
Code:
//BLUR FILTER
var windowBlur = new flash.filters.BlurFilter();
window_mc.filters = windowBlur
var myTempFilters = window_mc.filters;
myTempFilters.push(windowBlur);
window_mc.filters = myTempFilters;
windowBlur.blurX = 50;
windowBlur.blurY = 50;
does anyone know why this is not working?
thanks
dan
View Replies !
View Related
E4X XML Filter + Switch
Hi,
this is my first positing here..
I found a strange behaving of E4X when filtering:
ActionScript Code:
var novel:XML = <BOOKS>
<BOOK ISBN="01234">
<TITLE>Ulysses</TITLE>
<AUTHOR>
<NAME>Joyce, James</NAME>
<BIRTHDATE>February 2 1882</BIRTHDATE>
</AUTHOR>
<PUBLISHER>Penguin Books Ltd</PUBLISHER>
</BOOK>
<BOOK ISBN="987">
<TITLE>The Bible</TITLE>
<AUTHOR>
<NAME>God</NAME>
<BIRTHDATE>December 24 0000</BIRTHDATE>
</AUTHOR>
<PUBLISHER>good question...</PUBLISHER>
</BOOK>
</BOOKS>;
var filterA:XMLList = novel.*.(@ISBN == "01234");
trace ("filterA: " + filterA); // filterA: <BOOK ISBN="01234">...
var test:String = "test";
if (test == "test") {
var filterB:XMLList = novel.*.(@ISBN == "01234");
trace ("filterB: " + filterB); // filterA: <BOOK ISBN="01234">...
}
switch (test) {
default:
var filterC:XMLList = novel.*.(@ISBN == "01234");
trace ("filterC: " + filterC); // filterC: null !!
}
switch (test) {
case "test":
var filterD:XMLList = novel.*.(@ISBN == "01234");
trace ("filterD: " + filterD); // filterD: null
break;
}
I didn't know if this has already been known, so I decided to post this.
Funny thing, that the filters won't work in switch-statements.
cheers
han
View Replies !
View Related
Depth Of Filter
how would I change the depth of this?
I want it to appear underneath my existing layers
ActionScript Code:
import flash.display.BitmapData;
import flash.geom.Point;
import flash.filters.DisplacementMapFilter;
import flash.filters.DropShadowFilter;
Stage.scaleMode="noScale";
var baseX :Number = 90;
var baseY :Number = 90;
var nOctaves :Number = 4;
var randomSeed :Number = Math.random()*10;
var bStitch :Boolean = false;
var bFractalNoise :Boolean = true;
var nChannels :Number = 1;
var bGreyScale :Boolean= true;
var p1 = new Point(45, 34);
var p2 = new Point(50, 60);
var p3 = new Point(55, 34);
var p4 = new Point(10, 50);
perlinOffset = new Array(p1, p2, p3, p4);
bmp = new flash.display.BitmapData(300,250,true,0x000000);
_root.createEmptyMovieClip("perlin", 100);
perlin.attachBitmap(bmp, 1, "auto", true);
perlin._alpha = 60;
onEnterFrame = function (){
perlinOffset[0].y+=0.125;
perlinOffset[0].x+=0;
perlinOffset[1].y+=.25;
perlinOffset[1].x-=0;
perlinOffset[2].y+=.5;
perlinOffset[2].x+=.0;
perlinOffset[3].y+=1;
perlinOffset[3].x+=.0;
bmp.perlinNoise(baseX, baseY, nOctaves, randomSeed, bStitch, bFractalNoise, nChannels, bGreyScale, perlinOffset);
}
View Replies !
View Related
|