Adjusting Center
Hi, thank you for reading this. How do I adjust the center in a zooming movie if I don´t want the center in middle of the scen? What would the scripting be? It´s MX.
Thanx in advance and happy Flashing! ik.
FlashKit > Flash Help > Flash ActionScript
Posted on: 03-26-2003, 07:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Adjusting The Center Point Of A Movie Clip
This is probably really simple, but I haven`t been able to figure it out.
A lot of times I somehow end up with movie clips where the center point (where the x & y coordinates are 0) is way off. Is there a way to move the center point to the actual center of the clip? Or (with the same result) moving all of the content to the center at once.
Moving the content in each frame one by one is just too much.
Adjusting The Center Point Of A Movie Clip
This is probably really simple, but I haven`t been able to figure it out.
A lot of times I somehow end up with movie clips where the center point (where the x & y coordinates are 0) is way off. Is there a way to move the center point to the actual center of the clip? Or (with the same result) moving all of the content to the center at once.
Moving the content in each frame one by one is just too much.
Adjusting Input Text Component Box To Center Text
Hi,
I have an input text box component that I am using but have to use script to adjust the text size and position. This is the script I am using for adjusting the text size but I don't know how to make it so that the text is entered in the center.
_global.style.setStyle("fontSize",25);
Can anyone help me with this?
thanks
Keeping The Center Of The Stage In The Center Of A Web Browser
Hey,
I have a really wide flash page, but the main portion of it is in the center
of the .swf. My question is how do I make the center of my .swf in the center
of a web browser so that when the user resizes the browser, the center of the stage stays in the center of the browser? Right now it has the left side of the .swf aligned with the
left edge of the browser so the center of my .swf is usually being cut off by
the right edge of the browser and users have to scroll to the right to see the
main portion of the site...I'm sorry if that's somewhat confusing, but any help
at all would be appreciated. Thanks!
Dave
How Do I Center An External File In The Center On The Stage
I followed the tutorial for preloading external swf files, now that I have done so and it works, I notice that the swf file does not center after I preview it after it loads the external file.
I have centered the holder on the stage but after I preview the file or test movie, the loaded file is not centered and I have to play around with it for it to be centered. Is there a way to set the x and Y in the actions so this won't happen or do I have to know the size of the file that I am preloading off my server?
How Do I Scale From Center Of Stage, Not Center Of MC?
I'm building a Flash map that I'd like to be able to scale in and out of. I've added a + and - button and linked them to a 5% + or - of the main MC's x and y scale. But, on press I'd like it to scale from the center of the stage, not the center of the movie clip, so that when I zoom further into LA the whole image doesn't go shooting off to the left, since LA is on the far left of my enlarging MC. How do I do this? Am I on the right track here?:
//onPress increase x and y scale 5%. no prob.
//move the map by combining an understanding of the center point of the MC, the centerpoint of the Stage (half the width, maybe), and then maybe multiplying it by some factor of my current %scale, since a 5% increase is a varying number, depending on my current scale.
Seems like this would work, but I'm not sure what that math would be.
...or is there a better way like a built in method that deals with MC centerpoints?
Thanks,
Greg
Volume Adjusting With MX
does anyone know any tutoirals for making a basic MP3 player with a volume slider??
please let me know
Adjusting Some Code
Hey there,
I received this piece of code to help with an alpha/speed problem I was having:
on(press){
mc.onEnterFrame = function(){
var sp = Number(_root.speed)
if(mc._alpha<=0){
back = 0;
}
if(mc._alpha>=100){
back = 1;
}
back ? mc._alpha-=sp : mc._alpha+=sp;
}
}
on(release){
delete mc.onEnterFrame;
}
I may be missing something simple, but I can't seem to transform this code to reduce the alpha to 0 on "release" as opposed to onPress. I am able to remove the += statement to only have it reduce, but the statement only works onPress???
Anyone, Any help?
thank you kindly
Swish Pix Adjusting
Anybody know how to replace the swish S with another logo, or remove it from the swish pix albums?
Adjusting Volume
I am new to this whole flash thing and I am having a problem figuring out how to adjust one of the two sounds in my movie. Is there an easy way to adjust the volume or is action script involved? I would appreciate any help.
Adjusting WHOLE Volume.
Now, I've read tutorials, searched the internet, and see things like "MAKE SLIDERS" and "CREATE A FLASH MP3 AND INCREASE OR DECREASE VOLUME" in MovieClips, but nothing just says how to increase, or decrease the volume in a movie clip.
What I basically want to do, is make some sort of "commentary" for one of my flash animations, and I want to load SWF into my current animation, and lower the volume of the external .SWF
Is this possible to do?
Adjusting MC´s Hue Filter
Hi, I was wondering if there is a simple way to control the "Adjust Color: hue" - filter of a MovieClip?. Is it possible to adjust it with a single variable(with AS2)?
Can anyone help me?
Help Adjusting As File
I have an all flash webpage that features a newsletter button... It is supposed to load an external newsletter module, fairly simple in itself. While the module works great on its own, when I load it from the main swf, I get an error message:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Main/init()
at Main()
FYI, Main refers to Main.as, which is my module's document class. I have attached a link to upload a zipped file of a much simplified version of what I have right now. You guys can see what happens... I understand the error message, but I am not sure of how to tweak my code... So if you could help, it'd be much appreciated !!!
http://www.box.net/shared/eus0vupogs
Adjusting Stage
ok guys, this could be really simple or really difficult... I created a flash menu but the top of the menu wasnt flush with the top of the stage. Now I cant move the frames up without screwing up all the motion tweens and such. its only about and inch but its driving me nuts. heres a link http://users.eastlink.ca/~dbz/menu.htm (its the top grey part) the bottom is fine.
Adjusting Contrast
This code adjusts the 'brightness', how do I increase the 'contrast'?
var myElements_array:Array = [1, 0, 0, 0, 100,
0, 1, 0, 0, 100,
0, 0, 1, 0, 100,
0, 0, 0, 1, 0];
var myColorMatrix_filter:ColorMatrixFilter = new ColorMatrixFilter(myElements_array);
mclip.filters = [myColorMatrix_filter];
Adjusting Brightness
Having trouble understanding how to adjust the brightness of an object (in this case
a symbol from an imported Illustrator file). I've read the help sections on it but remain
clueless. Any help much appreciated!!
Edited: 05/15/2008 at 09:08:33 AM by vivaretro
Adjusting MC´s Hue Filter
Hi, I was wondering if there is a simple way to control the "Adjust Color: hue" - filter of a MovieClip?. Is it possible to adjust it with a single variable(with AS2)?
Can anyone help me?
Adjusting To AS3 - How Difficult Is It?
Now that Flash 9/AS 3 has been out for awhile, how easily have users found the transition from AS2 to AS3? What sort of gotchas should I look for, once I convince my boss it's worth the upgrade price?
Help Adjusting As File
I have an all flash webpage that features a newsletter button... It is supposed to load an external newsletter module, fairly simple in itself. While the module works great on its own, when I load it from the main swf, I get an error message:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Main/init()
at Main()
FYI, Main refers to Main.as, which is my module's document class. I have attached a link to upload a zipped file of a much simplified version of what I have right now. You guys can see what happens... I understand the error message, but I am not sure of how to tweak my code... So if you could help, it'd be much appreciated !!!
http://www.box.net/shared/eus0vupogs
Adjusting To Resolution
I was wondering how can you make a flash movie adjust to your sreen resolution? I am creating a site where I have a pop up (that takes up the whole screen) with a flash movie in it. What size do I make the flash movie and how do I get it to adjust to the resolution?
Thanks
[help] Adjusting This Code To Include...
hi there... i'm looking to make a simple countdown using simple actioscript, that i can alter + update easily...
i found this tutorial, which sets a countdown to 12am (midnight) the code is as follows :
myDate = new Date();
seconds = myDate.getSeconds();
minutes = myDate.getMinutes();
hours = myDate.getHours();
seconds2 = 59-seconds;
minutes2 = 59-minutes;
hours2 = 23-hours;if (length(minutes2) == 1) {
minutes2 = "0" + minutes2;
}
if (length(seconds2) == 1) {
seconds2 = "0" + seconds2;
}
timetil12 = (hours2+":"+minutes2+":"+seconds2+" left until 12AM");
now the thing is, i'm really going to be wanting to have a countdown that includes days/months, rather than hours minutes seconds. so for example a countdown to 27th october...so in other words...1 month and 7 days to go...
get it? well i hope someone can help me out here
thanx
parodius
Adjusting Play Speed
Is there a way for me to adjust the play speed of a movie to make it speed up or slow down?
Adjusting Sounds Volume.
Hello,
I've recorder some things but some words are not loud enough, can I adjust the volume with Flash or do I have to do that with my soundprogram?
Tnx & greetz,
Big_Boss_Man
Adjusting Frame Rates Or Something
Hi. I'm trying to make a "time lapse" camera. I'm going to have a bunch of images that are going to play back to back to back etc...
I want to be able to set the delay between each image dynamically via a slide bar or just a field with a number in it. Is there any way to adjust the frame rate of the movie via action script? or a way to set delay between each frame?
If anyone can help, I would appreciate it.
Thanks,
Scott
Adjusting Distance Between The Mouse And The Mc
Hey Heres my script for a mc, I can see in the notes which one is the distance from the mouse pointer to the mc but there is no value, am I missing somthing?
// following two lines capture the mouse coordinates
mousex = getProperty("/dragsquare", _x)+10;
mousey = getProperty("/dragsquare", _y)+10;
// following two lines capture the movie coordinates
ringx = getProperty("/drag_menu_clip", _x);
ringy = getProperty("/drag_menu_clip", _y);
// following two lines capture the distance between the mouse and the movie
difx = mousex-ringx;
dify = mousey-ringy;
// this variable will be used to create acceleration and deceleration
incx = difx/30;
incy = dify/800;
// making sure the variable is positive
if (Number(incx)<0) {
incx = -(incx);
}
incy = dify/10;
if (Number(incy)<0) {
incy = -(incy);
}
// these if statements avoid a "jumping" effect that occurs
// when the movie gets to close to the mouse
if (Number(difx)>Number(-8) and Number(difx)<8) {
} else if (Number(difx)<0) {
setProperty("/drag_menu_clip", _x, ringx-1-incx);
} else {
setProperty("/drag_menu_clip", _x, Number(Number(ringx)+1)+Number(incx));
}
if (Number(dify)>Number(-8) and Number(dify)<8) {
} else if (Number(dify)<0) {
setProperty("/drag_menu_clip", _y, ringy-1-incy);
} else {
setProperty("/drag_menu_clip", _y, Number(Number(ringy)+1)+Number(incy));
}
gotoAndPlay("start");
Adjusting Hit Size On Buttons.
I would like to adjust the HIT region of my text, which I have converted to a button.
When I place my pointer over it in development it is surrounded my a small transparent rectangle, which I would like to be the hit region.
I have already set a sound for a roll over, but since my hit region is so small is plays the sound each time you pass over a single line of a single letter!!!
So basically it ends up sounding like a machine gun.
How do I change it?
LoadMovie() / Jpg / Adjusting MC Size
hey folks,
i'm making a flash photo gallery, displaying 2 dynamically loaded jpgs (via loadMovie(filename+".jpg")) at a time next to each other.
i'm loading these jpgs into 2 different MCs created by attachMovie();
so far so good...
problem is: jpgs have different sizes which i do not know in advance. i can't seem to find out the size of the loaded pics; getBounds() only returns the size of the MC i have loaded 'em into which is no use for me since it is not the size of the actual jpg.
i would like to resize the respective MC by getting the actual size of the pic, but i can't even resize the MCs at all after the jpgs have loaded.
any ideas ?
Adjusting DateChooser Component
Hi,
I have DateChooser component (MX 2004)on the stage.
Is it possible to make some of the days bold? ie the number 5 in february should be bold, when there's data in a database for Feb, 5th ?
I can do the serverscripting. The only thing I want to know is how make the 5 in February bold...
thanks in advance
Genius
Adjusting The Volume Of A Level
Hey guys n gals. I was wondering if it is possible to adjust the volume of music playing on a seperate level in flash mx?
heres what I mean.
on the first frame of a site I have music start playing in level 15
loadMovieNum("music.swf", 15);
The music is esentialy the only sound I have on the site. But when a user clicks the ABOUT button I want the music thats playing on level 15 to lower significantly in order for them to hear a Welcome video. Is this possible?
im using flash MX
-Thanks alot
Adjusting Brightness Via Actionscript
Hi,
I've attached a file with a really nice actionscript rollover effect effect.
I'm trying to figure out a way to set the brightness of each rectangle to 50% in the actionscript so that when a user rolls over a square, the brightness increases to 100% ... on rollout, the brightness returns to 50%.
Also, there are four links on top. How can I apply this rollover action to so that it occurs on rolling over the links rather than the images?
Any takers?
cheers!!
jen
Adjusting Movie Size...
Is it possible to adjust the size of the movie canvas equally on all sides? I don't see an option for that in modify>document.
Width Adjusting Nav Slider
Alright, first off I am using Flash 5 and I have the slider moving to different links when the mouse rolls over them. When the user rolls off of the link, the slider goes either back off of the screen or to another link that the mouse has been moved to. The words for the links are different lengths, thus I want to have the slider adjust its width to that of the length of the link when it is moving. Any help will be appreciated, thanks in advance.
Adjusting Alpha Using Actionscript
i want to have a layer in my movie that contains static text, shapes, and symbols, to fade in. what is the code i need in order to make all the objects on the layer fade in together?
thanks in advance
Problem With Adjusting _x And _y To An Object.
i have 3 objects on screen, I'll call them HOW, W, HP.
HP must be connected to HOW, i mean, on the a certain frame i've done:
HP._x=HOW._x+5;
HP._y=HOW._y-15;
it was all fun and games, but when i tried to put HOW, into the object W, and tried to do:
HP._x=W.HOW._x+5;
HP._y=W.HOW._y-15;
it didn't work. I used it before, and it work, but now it doesnt.
Please, tell me what's wrong with it. Thanks alot.
Adjusting Mp3 Sound Level
I have an mp3 looping in my background, but it is a bit too loud... is there a way to have it play at a lower level?
Thanks in advance!
Adjusting Alpha Using Actionscript
Hi,
I have a series of eight thumbnails in my flash movie.
I want them to display at 50% alpha. When the user rolls over the image, the alpha fades in to 100%.
Also, they need to be buttons since they'll be linking to urls.
Any suggestions?????
Cheers!
Jenny
Adjusting New Broswer Windows
ok im not even sure if this is an actionscript thing but, how do I adjust the size and position of a new window. Is that possible using the getURL() or is that part of the new broswer windows properties. For example I have a button that when you click i want to launch a new window with its own size and position so it dosent tottaly overlap the original site. Im assuming this is like a HTML or PHP newb question
Adjusting Swf Into The Middle Of Html1 Plz Help
hi need help soon plz. actually when i publish my flash site into html then flash appears to be on the corner instead of middle. i tried to do it by aligning into the middle in the html page and as well by the publish setting but nothing is working. its not loading into the middle of html page
Adjusting Movie Tint With AS
how do I adjust the tint of a MC?
is it the same as _alpha but with _tint
I tried something like this this.fs1._tint = 0x805600;
didn't do the job..
any ideas?
Can Someone Help Me Adjusting A Script To My Server?
can some one help me?
i have the program on .fla form but i dont know how to adjust it to my server
can some one help me through the msn or icq?
pls! p.m me!
i am sorry if im passing any rules i read the rules and i didnt saw that its not allow...
Auto Adjusting Resolution?
Hi. I was under the impression that flash creates a movie file at a fixed size (600x400px, etc). On this site http://www.ptit-nathan-baume.com/ , the flash page spans the entire window and it seems to adjust itself when the resolution is changed. I had the side opened with my monitor at 1280x800, and I switched it to 800x600 and the site seemed fine. Any ideas how they did this? Maybe it's a new function on the newer flash versions, but I thought scroll bars are suppose to pop up if the site exceeds the window. Thanks!!
Help Adjusting Function Code
Hi everyone,
At the end of this post I've listed the code I have on frame 1 of the main timeline. The code between the comment "Category list fades in" causes the movieclip on the main timeline called categoryIndex_mc to fade in, then causes the small animation inside categoryIndex_mc to start playing on frame 30.
Once categoryIndex_mc has reached full opacity and the animation within it has played, a button appears - cat_btn - which when pressed should fade categoryIndex_mc back to 0 opacity and at the same time fade in a movie clip called garmentSlides_mc. When I test it, garmentSlides_mc does fade in but categoryIndex_mc doesn't fade out. The code used is as follows:
Code:
cat_btn.onRelease = function ():Void {
oIntervalIDs[categoryIndex_mc._name] = setInterval(fadeMovieClip, 0, categoryIndex_mc, 5);
oIntervalIDs[garmentSlides_mc._name] = setInterval(fadeMovieClip, 100, garmentSlides_mc, 5);
}
Just wondered if someone could tell what might be wrong with the code?
Appreciate any help offered.
Code:
//-----------Initialization---------\
this.categoryIndex_mc._alpha = 0;
this.garmentSlides_mc._alpha = 0;
//-----------------------------------\
intro_mc.onEnterFrame = function () {
this.play();
delete intro_mc.onEnterFrame;
}
//-----------Category list fades in---------\
var oIntervalIDs:Object = new Object();
function fadeMovieClip (mClip:MovieClip, nRate:Number):Void {
if(mClip._alpha >= 0 && mClip._alpha < 100) {
var nAlpha:Number = mClip._alpha;
mClip._alpha = nAlpha + nRate;
updateAfterEvent();
}
else {
clearInterval(oIntervalIDs[mClip._name]);
}
}
oIntervalIDs[categoryIndex_mc._name] = setInterval(fadeMovieClip, 100, categoryIndex_mc, 5);
categoryIndex_mc.onEnterFrame = function () {
if(categoryIndex_mc._alpha > 90) {
this.gotoAndPlay(30);
delete categoryIndex_mc.onEnterFrame;
}
}
//-----------------------------------\
cat_btn.onRelease = function ():Void {
oIntervalIDs[categoryIndex_mc._name] = setInterval(fadeMovieClip, 0, categoryIndex_mc, 5);
oIntervalIDs[garmentSlides_mc._name] = setInterval(fadeMovieClip, 100, garmentSlides_mc, 5);
}
Adjusting Brightness Of Object
Having trouble understanding how to adjust the brightness of an object (in this case
a symbol from an imported Illustrator file). I've read the help sections on it but remain
clueless. Any help much appreciated!
[F8] Adjusting Width Problem
what this is is a jpg loader i got off of "http://flash-creations.com/notes/dynamic_loadjpg.php"
what i want to do is adjust the width of the picture previewer so that it stays a fixed width but every time i add these two lines to adjust the width of pic_mc it doesn't work (it does not show the pictures)
pic_mc._width+=30;
pic_mc._height+=30;
however when i remove the two lines it does work (display's the picture), however it displays the pictures with their original size.
how can i solve this? any help would be greatly appreciated. here is the code
Code:
/********* DECLARE AND INITIALIZE VARIABLES **************************/
// names of folder and pictures, in the order to put them into the thumbnails holder
var picnames:Array = [
"1",
"2",
"3",
"4",
"5"];
// constants
var PICPATH:String = "q/";// folder with jpgs
var NPICS:Number = picnames.length;// number of pictures to load
var PICX:Number = 10; // x loc of big picture
var PICY:Number = 10; // y loc
var THUMBHOLDERX:Number = 0; // x location of thumbnail holder movieclip
var THUMBHOLDERY:Number = 230; // y location
var THUMBW:Number = 72; // width of each thumbnail
var THUMBH:Number = 40; // height
var MARGIN:Number = 10; // margin between thumbnails
var TOTALBYTES:Number = 106000; // approx sum of bytes in all jpgs
var totalloaded:Number = 0; // running tally of bytes loaded from all pics
// index into pictures array, used for loading
var ipic:Number;
// set up loader, an instance of MovieClipLoader
var loader:MovieClipLoader = new MovieClipLoader();
// use the main timeline to listen to and respond to loader's broadcast events
loader.addListener(this);
/********* DEFINE FUNCTIONS, INCLUDING INIT FOR MOVIE SETUP **********/
// thumbnail rollover handler
function grow() {
this.onEnterFrame = function() {
if (this._width < THUMBW * 1.2) {
this._x -= this._width * .025;
this._y -= this._height * .025;
this._width *= 1.05;
this._height *= 1.05;
} else delete this.onEnterFrame;
};
}
// thumbnail rollout handler
function shrink() {
this.onEnterFrame = function() {
if (this._width > THUMBW) {
this._width /= 1.05;
this._height /= 1.05;
this._x += this._width * .025;
this._y += this._height * .025;
} else delete this.onEnterFrame;
};
}
// thumbnail click (onrelease) handler
function openPic() {
pic_mc.loadMovie(PICPATH + picnames[this.i] + ".jpg");
}
// assign event handlers (called when all jpgs are loaded)
function setupHandlers() {
pct_txt.removeTextField();// don't need loading indicator any more
for (var i:Number = 0; i < NPICS; i++) {
thumbs_mc["mc"+i].onRollOver = grow;
thumbs_mc["mc"+i].onRollOut = shrink;
thumbs_mc["mc"+i].onRelease = openPic;
}
}
// listener function for broadcast 'done' message (for each pic)
// onLoadInit gets executed when the movieclip has been loaded into _mc AND
// its width and height data are available.
// (_mc = the movieclip being loaded into)
// this routine sets the size and position of each thumbnail clip as its jpg
// is loaded and starts the next one loading. When all have been loaded,
// a random picture is loaded into pic_mc and setupHandlers is called to
// assign handlers to each thumbnail movieclip
function onLoadInit(_mc:MovieClip) {
// this gets done when the jpg is completely loaded:
_mc._width = THUMBW;
_mc._height = THUMBH;
// give the movieclip a property to remind it who it is
// (used by openPic to know which big picture to open)
_mc.i = ipic;
// add picture size to totalloaded variable
totalloaded += loader.getProgress(_mc).bytesTotal;
// now load the next one (if there are more) or set up handlers if done
ipic++;
if (ipic == NPICS) {
// start with a random photo displayed
pic_mc.loadMovie(PICPATH + picnames[Math.floor(Math.random()*5)] + ".jpg");
pic_mc._width+=30;
pic_mc._height+=30;
setupHandlers();
} else {
loader.loadClip(PICPATH + picnames[ipic] + ".jpg", thumbs_mc["mc"+ipic]);
}
};
// listener function to handle broadcast progress messages
// make pct_txt show cumulative loading progress
function onLoadProgress(_mc:MovieClip, loaded:Number) {
var loadedsofar:Number = totalloaded + loaded;
pct_txt.text = Math.floor(loadedsofar / TOTALBYTES * 100) + "%";
};
// things to do to set up the stage and start the movie:
// create holders for the pictures and thumbnails
// create and format progress-indicating textfield
// create individual holder movieclips for each thumbnail within the thumbnail holder
// start the pictures loading with loadClip
function init() {
// create holder for pictures
createEmptyMovieClip("pic_mc", 1);
pic_mc._x = PICX;
pic_mc._y = PICY;
// create (and draw) holder for thumbnails
createEmptyMovieClip("thumbs_mc", 2);
thumbs_mc.beginFill(0, 100);
thumbs_mc.moveTo(0, 0);
thumbs_mc.lineTo((MARGIN + THUMBW) * NPICS, 0);
thumbs_mc.lineTo((MARGIN + THUMBW) * NPICS, THUMBH + 2 * MARGIN);
thumbs_mc.lineTo(0, THUMBH + 2 * MARGIN);
thumbs_mc.endFill();
thumbs_mc._x = THUMBHOLDERX;
thumbs_mc._y = THUMBHOLDERY;
// create loading textfield indicator
createTextField("pct_txt", 3, 200, 100, 40, 100);
var tf:TextFormat = new TextFormat();
tf.align = "center";
tf.size = 12;
tf.font = "Verdana";
tf.color = 0xFFFF00;
pct_txt.setNewTextFormat(tf);
// make empty movieclips in thumbs_mc for each pic to go into
for (var i:Number = 0; i < NPICS; i++) {
var mc:MovieClip = thumbs_mc.createEmptyMovieClip("mc"+i, i+1);
mc._x = MARGIN + i*(MARGIN + THUMBW);
mc._y = MARGIN;
}
// set the pointer to the first jpg in the array picnames
ipic = 0;
// start loading jpgs
loader.loadClip(PICPATH + picnames[ipic] + ".jpg", thumbs_mc["mc"+ipic]);
}
/********* CALL THE INIT FUNCTION TO START THE MOVIE *****************/
init();
Adjusting Brightness Tween
import flash.filters.ColorMatrixFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
System.security.allowDomain("http://www.helpexamples.com");
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip):Void {
// center movie clip instance on Stage
target_mc._x = (Stage.width - target_mc._width) / 2;
target_mc._y = (Stage.height - target_mc._height) / 2;
target_mc.watch("brightness", brightnessWatcher, target_mc);
// animate the target_mc movie clip between -100 and +100 brightness
var t:Object = new Tween(target_mc, "brightness", Strong.easeOut, 400, 0, 2, true);
};
this.createEmptyMovieClip("img_mc", 10);
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", img_mc);
function brightnessWatcher(prop:String, oldVal:Number, newVal:Number, target_mc:MovieClip):Number {
var brightness_array:Array = [1, 0, 0, 0, newVal,
0, 1, 0, 0, newVal,
0, 0, 1, 0, newVal,
0, 0, 0, 1, 0];
target_mc.filters = [new ColorMatrixFilter(brightness_array)];
return newVal;
};
Adjusting JPEG Quality
Hey all,
I havent been here in a dreadfully time, but I have an important question.
I'm currently working a photography website, and I know how to load JPEG files dynamically into movie clips. The one problem is I want to have small thumbnails of the JPEGs. Well, this sounds cool and all, but It will cause the SWF file to fun terribly slow. So i want to ajdust the JPEG quality. Is there a simple code to do this? Am I missing something. Thanks!
Adjusting The HELP Actionscript Dictionary
hello;
I have recently gotten the MX2004 Pro;
when I go to HELP --> AS Dictionary, Flash opens it in a panel within my already crowded workspace;
formerly ( MX2002 ) Flash would open the HELP in a nice roomy browser window;
can I tell MX2004 to do that?
thanks
dsdsdsdsd
|