Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Colour Shifting



Howdy all,I have these beautiful images in Photoshop! Vibrant, Compelling , Beautiful! Then I bring them into flash as png or jpegs or whatever and all the colours flatten out and basically look like absolute crap. I have no idea what the issue is. I have tried export various different file types tried export from illustrator as an swf I even tried editing the photo in Flash all have similar results and lead me to the same end product .Crappy desaturated images. If anyone has a suggestion that would be great.Thanks to all involvedCheers-Graphic Graeme



Adobe > Flash General Discussion
Posted on: 05/03/2007 01:56:42 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Smooth Dynamic Colour Shifting
This is my first post so if I ask something I shouldnt let me know.
Basically, I would like the background of my document to shift colour according to vertical mouse position.
Not the entire spectrum but between 3 or four colours.
I realize I'm going to have to get the y position of the cursor and form some kind of mathematical equation to translate it to color codes.

Or would this be smarter, if I just have the colours change according to vertical movements not position. If it moves up the colours go in one direction and down in the other, which could create a smoother effect instead of position because it could jump around awfully fast and look bad.
Any direction on this? Anyone?
Thanks
derrick

Creating A Colour Dialogue Box For User To Select A Colour For Background.
Hi,
Any ideas how to create a colour dialogue box so the user can select their own pereference of background colour?
thx
shaf
(I mean inside the SWF as its running......)

16 Bit Colour Mode Problem With Alpha Fades On Colour
Please help me out. I have tried many other forums and people, but no one can give me an answer. Hopefully you can.

Have a look at a site I designed for a school.

http://www.brineleas.co.uk in 32-bit mode this is great, now try 16 bit colour mode and you will see my problem.

Please help if you know how

Trev:

Flash Colour/ Javascript Colour
Can anyone over here help with the following...

http://www.were-here.com/forums/show...hreadid=148509

Colour Picker / Colour Transform
Hi...

This query has been bugging me for a little while, and it may be easy to answer, I don't know.

I'm using a fairly simple colour transform script to change the tint of a mc...
code:
myColor = new Color(_root.bgdvideo);
if(!ccc){_root.bgdvideo.setRGB(0x990000);
}else{
myColor.setRGB(ccc);
}
MovieClip.prototype.beginFade = function(dstX, durationOfFade) {
this.myColor = new Color(this);
this.srcX = this.myColor.getTransform();
this.dstX = dstX;
this.startOfFade = getTimer();
this.durationOfFade = durationOfFade;
this.onEnterFrame = function() {
var r = (getTimer()-this.startOfFade)/this.durationOfFade;
if (r>1) {
r = 1;
this.onEnterFrame = null;
}
var tX = {ra:this.srcX.ra*(1-r)+this.dstX.ra*r, rb:this.srcX.rb*(1-r)+this.dstX.rb*r, ga:this.srcX.ga*(1-r)+this.dstX.ga*r, gb:this.srcX.gb*(1-r)+this.dstX.gb*r, ba:this.srcX.ba*(1-r)+this.dstX.ba*r, bb:this.srcX.bb*(1-r)+this.dstX.bb*r, aa:this.srcX.aa*(1-r)+this.dstX.aa*r, ab:this.srcX.ab*(1-r)+this.dstX.ab*r};
this.myColor.setTransform(tX);
ccc = this.myColor.getRGB();
};
};

I know you have to change the ra, rb, (etc) values to alter the colour which you get (as in)...
code:
_root.bgdvideo.beginFade({ra:50, rb:204, ga:0, gb:0, ba:50, bb:255, aa:100, ab:100}, 1000);
...but I wondered if anyone knows a trick / way to find out the values you'd put in for (ra, rb, etc) to get a particular colour, rather than just aimlessly playing around with different values until you get the desired colour fade you want (which takes some time for me!)

Cheers
Jeff
*sorry if this is a dumb question...

A Colour Palette For Colour Matching
I'm new to actionscript and trying to creating a pretty simple colour palette which can let users to choose up to 8 different colours. First of all users will be presented with a range of different shades, and each time they choose a colour it can be saved to a movie clip, so finally they will have all 8 movie clips showing all the colours they've chosen.

The way I do is create a movie clip that contain all the colour shades in the palette in different frames. Then make 8 copies of it and give them different instance names. When the user come to select a colour then the movie clip will change to that colour, keep it, then the other colour will go to the second movie clip... and so on... I've tried different ways to simulate the saving function but it still doesn't work (one of them is using if / else statement on the button and declare different Number value on the movie clips)

Pls bare with me if my explaination is not clear... but any help will be greatly appreciated!! Pls tell me if you got idea how to do it or any similar work that you've done. I can also email / msn the file if you wanna have a look. Thanks in advance!! vinkc@hotmail.com

Everything Keeps Shifting
Hello all. I am having a problem here and don't know how to fix it.

I am building a flash movie using screens (not sure if that is the problem) I am very careful to keep all my elements on whole pixel values. But it seems everytime I test the movie everything gets shifted. If something is positioned at 30 pixels, after I test the clip then return to edit some more it has shifted to 30.3. This is happening with everything on the stage. This is driving me insane.

Any Idea why this is happening?

Thanks in advance

Hue Shifting
Hi guys.


Does anyone have a function that can shift the hue of a colour? (ie, shiftHue(0xFF0000, 180))

I've been doing googles but loads of people keep going on about the setTransform() function, but that's not what I'm after.


Thanks,
Si ++

Bitmap Shifting
Ok, so I just finished doing a photoshop template for a flash website.

I saved the background, and then isolated an element that is over the background and saved it in another file.
When I try to put them on top of eachother in Flash, I've realised that the images shifted and aren't the same anymore, they don't merge like they should. They seem stretched even though they have the same width and height. I tried to save/import in bmp, png, jpg, copy merged/paste in flash, nothing works.

The only way I've found was to retouch one of the two images in photoshop until everything fitted.

I honestly hope there is a better way to solve this.. (maybe saving it in swf in Fireworks?)

thanks for your help guys

Shifting Bitmap
Has anyone had the problem of a shifting bitmap after you tween the alpha state?
For some reason it shifts one pixel, but only on certain computers. Agh!

Thanks!

::Shifting Menus::
I really need to know this...

What is the script and how do i modify it so when i press a button it will scroll to a certain picture in a line of them?

Like on this site (click portfolio) http://www.geocities.com/puttskins/

thanks
n

Shifting Backgrounds
hey folks, just another noob question for you all to shake your heads at

i've seen this done in other movies and was just wondering how it works: on my movie i have a background layer as usual with a background drawn and everything, but at a specific moment in my movie i would like the background to sort of "fade to black" as it were i tried making two seperate instances of the backgrounds, one of the norm and one of the black bg and tried to tween them but it dosen't seem to be working out the way i planned, thanks for the help!

-mcc

Pixel Shifting
I'm having serious problems trying to fix the pixel-shifting in my flash movie. I've done extensive searching of these boards on how to eliminate pixel-shifting, and tried as many approaches as I could, including megatoon's 6-step pixel-shifting eliminating plan, and doing the "break/group" thing. I've looked at the Macromedia trouble-shooting advice on pixel shifting and tried those approaches. And still my movie is shifted by a pixel or so.

The ONLY thing I have found that works is setting the View quality to Low in the testing screen. At low setting, everything appears perfect. At medium or high, there is pixel shift. So I've tried publishing the movie with the quality setting to low in the html tab, yet the resulting file still has the pixel shift. In Dreamweaver MX, I've tried importing the swf and html and put the Quality setting at Low in the property inspector, and it still pixel shifts in the dreamweaver preview AND in the browser preview.

What to do, what to do?? Any help would be greatly appreciated. Thanks in advance...

Shifting Movie
I too am having this problem. I am using MX, and after publishing I sometimes get a strange effect that occurs at different moments in the movie.

Basically, when viewing it in a browser all will look fine, until a slight shift occurs of the entire swf, throwing off all of my pixel fonts and fine linework.

I am embedding the swf in a layer in html for optimal placement if that means anything.

Does using the following help at all????

fscommand("fullscreen", "false");
fscommand("allowscale", "false");

Problem With A Shifting SWF....
I have created an SWF and embedded it into both a layer and a table in html. Both methods seem to create the same problem which is as follows:

Following no specific time pattern, the SWF will shift a few pixels while it is being viewed. Sometimes it happens while the movie is running, other times when it is at rest. The shift lands the SWF on a 1/2 pixel and as such destroys legibility of all of my typefaces since they are pixel based.

Has anyone else had this problem? I am desperate. There is no documentation on this problem at macromedia...

Shifting Panel
Hello all,

Attached is a fla I'm working on. I need the panels to display in a masked window w671xh315. I have reworked all the symbols to the proper size. However I can't seem to find whether in the action script or where it is telling the mc how much to shift. Therefore I can't adjust the amount the panel shifts from the original 400x300. So I assume it must be something in the action script I am missing. Feel free to pick it apart all you want.


Thanks in advance

-Twizz

Shape Shifting
Simple, simple question here.

I have a four point polygon, which in the span of 15 frames or so needs to shapeshift into a new four point polygon. Now, my question is how to do this. I tried converting the initial shape into a symbol, but then when I try and change the shape, it changes the initial shape of the symbol as well.

I'm sure there is an easy answer, but if someone can point me to the answer or at least to a tutorial, i would be appreciated. Thanks!

Shifting Jpgs
I've run into this more times than I can remember. Sometimes, in this case while I'm fading out a .jpg, half of the image shifts over a pixel. What kind of workarounds are there for this? Thanks ;p

Shifting Images
Let me begin by saying that my knowledge of Flash is pretty limited. Very limited actually. But I figured I would try to put together a little animation for a friend of mine. In the process I hoped I'd learn something.

Check this little movie out.

Not bad for a first stab at Flash, huh? But something is bugging me. As the images begin to fade in or out, the images shift a bit. It's very slight, but very annoying. I looked at it in IE6/Win and Firebird/Win and it worked fine. No shifts. In Safari, it shifts. When I was putting the movie together in Flash 5 as a .fla, it shifted.

Any Flash experts have any idea why the images shift ever so slightly? Thanks in advance.

Shifting Buttons
Hi peeps.

I made this music-box-thingy in flash and it worked well, but when I converted the whole movie to a movie clip everything got phugged up, have a look: Click
The song titles shouldn't change position when the mouse is over them and the play button for the first song isn't in the same position as the others (in the .fla file everything is fine, it's only when I test the movie or export it that things go wrong) .
All buttons are gifs, no smoothing. I know I could use buttons made in flash but they wouldn't fit in with the rest of the page.
This doesn't seem to be the regular 1-pixel bug, as I've tried all things that normally work but nothing helps.

Any suggestions?

Shape Shifting - Why?
Can anyone please tell me why this flips over halfway through? - it's been driving me around the bend all night.
Any help would be greatly appreciated.
LexyCon.

Shifting Button
I have five buttons on my interface but am having trouble with two of them shifting on rollover. They behave fine in author mode, with Simple buttons enabled, and they also look fine in the button instance, but if I test scene, they shift on rollover. It's the "Select Scope" and "Run Baseline" buttons, if anyone wants to check out the file. Thank you.

Shifting Movie
I created a movie as a temporary holding page for a clients web site to be.

I now want to get on and build his site - all in flash, though I will site in in an html file so that I can but some description in for the Google.

It seems from my 'Total Training DVD' that it is best to create the site in Flash slide presentation format. As I like the initial movie I made I thought that it would make a nice 'lead-in' to the site. Now where this was done on training video he started that part of the course telling us, the students, that he had copied the earlier created movie into the initial presentation window. Bit like Blue Peter - 'here's one I prepared earlier'! Using all the info I had cleaned from the course I assumed that the way to do this would be to copy and paste the frames into the new time line. It worked upto a point except that it seemed to centre it around to top right corner instead of the middle. I tried pasting the frames into a regular movie timeline and it landed exactly where it should have done.

Any ideas as to why it pastes differently into a slide presentation movie than a regular flash movie and what I can do to reslove it?

Many thanks

Ralph

About Bitwise Shifting
Is bitwise shifting quicker than regular division in flash?
In CC++ it is very fast way to divide a number by 2^n number. But flash has do some conversions first so I am not sure if this operator is faster than regular division.
So, is this:

MyNumber >> 2;

faster than:

Math.floor(MyNumber / 4);

And by the way how fast are math and function calls when compared with CC++ and Java. I know that flash is much slower than C, but how slower? Can it be compared with Java? I know that drawing in flash is abominably slow becouse of vector graphic and stuff, but I do not know about very language.

thank you

Pixel Shifting
Hi

I have full screen flash site with the content floating in the center, I am experiencing shifting with text when the window is resized. Does anyone know the solutions to fix the problem? Thank you!!

http://www.stevenlin.net

Pixels Shifting?
Hello!
I am in the middle of working on a site for a friend of mine. Within his site you can click on Samples and then on an icon that appears, which opens a "window." On his computer, he says pixels are shifting slightly after they load, but only in the center of the image. It doesn't do it on my computer at home, and I don't think it has anything to do with flash...but I have no idea! Does anyone know what it is?
Here's the link to the site:
www.tinyk.com/firecracker

Attached is a screen shot he sent me with the problem circled!

Any help would be greatly appreciated!!!
Thanks!!

Shifting Layers
I am not by any means a fluent flash user. My issue is that I have decided to combine several flash movies into one. I exported a movie and pasted it into an existing new layer of a flash document that already has several layers. What I need to do is to make the flash document bigger from the top of the original scene up so that I can keyframe in some text from the top. When I add more height, the blank area appears at the bottom. So it would seem that I need to shift everything down after enlarging the height, to make room for my new layer to function. If I select all and shift it, it works but all of the keyframes and tweens are messed up and do exactly as they are told.....they shift back at the 2nd frame. Please advise as to how to properly do this and please be very explicit. Thanks!

Shifting Images?
Hi again! I feel REALLY stupid for this one, but in working in my flash file, i made a movie clip. In it, i have a series of images that fade in from one to the next (one shows at a time). I cant for the life of me figure out just WHY the images, when i click on publish preview (once the movie clip is in the flash file), that the series of images in the movie clip actually seem to, not sure how to describe this, shift (each one does it!) to the right or left. I've checked all x and y coordinates in every spot, keyframes and all. I've checked the widths and heights to make sure they somehow didnt get altered and ive even taken out and put back in the images to see if they just didnt want to cooperate for some reason the first time, but still it does this weird thing (its almost like i had say a x coordinate of 56 for the first keyframe but then an x coordinate of 57 for the second keyframe of the image but i dont!). Anyone have ANY sort of ideas as to why this might be happening?! Thanks yet again in advance, any help would be greatly appreciated!!
Jen

Bitmap Shifting
Hi,

very odd but when i move my movieclip of frame one and on to say frame 5 all my images turn nasty and start pixel shifting. anyone know anything about this???

if there is no fix does anyone know if there is a way to make a preloader on just one frame.

cheers,
Gareth

Color Shifting
ok, what Im trying to do is create a function that takes any color you give it and shifts it lighter or darker and returns the new value.

Ex:

function receives 0x0000FF. It should then seperate it into its three colors, add a specified amount to each and retun it back in the same form. Any ideas on how I can do that?

Images Shifting
I have a small flash swf on a web page that is a series of images fading in and out using the alpha effect. Some of the relatively static images shift or crunch when the movie is played. I have only been able to see it happen on a machine running WinXP. Can anyone tell me why this is happenening and how I can fix it. Thanks in advance.

http://www.geocities.com/bk_flag/fsoFlashModel.htm

Brian Kelleher

Visibility Shifting....
PROBLEM...

I have 2 mc's i would like to be able to turn off and on by clicking a button (_visible = false/true).
But how is this done by using only one button for both commands???

The mc's start out being invisible.
When the button is pressed i use : (_visible = true)

Any help is greatly appreciated

Pixel Shifting.... Grr
I have pixel shifting in one of my work, actually I always have pixel shifting in my work.
What can I do to rid of this?
Its such a bother and I can make great quality sites with it.

I notice this site (Ultrashock), pixel ranger, and bigger sites dont have it. Whats the secret?

If you take a look at http://www.joystickadventures.com/digitalblueprints
You will see a splash page I was just fooling around with, trying to make something look crisp. It seems the background bar is fine (or moreso) but the 'db' logo isnt. I tried turning off the smoothing, breaking it apart and all that but im not getting the quality that I get when viewing in photoshop.
I saved as png always when I work in Flash.

What can help me?
Must I pray for a miracle?
Im interested in knowing how some more experienced Flash users have dealth (and possibly rid) of this problem.

How do you do it 'pixelrangr'!?

How Do I Stop A SWF From Shifting?
Greetz,

I'm working on a totally flash-based site. I'm in the middle of all the work and I'm testing my results every now and then.

What I've noticed is that my SFW's seem to shift one pixel to the right each time they're loaded or when I move my mouse on buttons located in the SWF's.

I remember this from when I was using Flash 3 when I first tried to make something with flash, but I can't believe this is a bug since I'm using Flash MX now (the programmers must have noticed it, right?). So I guess I'm doing something wrong.

Can somebody tell me what I'm doing wrong?

Shifting Images During Alpha Changes
On the home page of a site I'm working on I have a number of MCs with images that transition with alpha tweens. It's at http://www.sonic.net/~jkanuch/bw/bWinters.html .

PROBLEM: The images "shift" left to right during the transition. This happens if both change in alpha, and also if one is at 100% and the old one changes to 0.

Does anyone know what causes this problem? It's viewable on various flavors of PCs that I've checked it on, and on some Macs (OS X). For some reason it's not visible on my mac powerbook (lcd display).

Any help is appreciated

Shifting Panel Problem...
Hello all,

Attached is a fla I'm working on. I need the panels to display in a masked window w671xh315. I have reworked all the symbols to the proper size, however I can't seem to find where in the action script it is telling the mc to shift. Therefore I can't adjust the amount the panel shifts from the original 400x300. So I assume it must be something in the action script I am missing. Feel free to pick it apart all you want.


Thanks in advance

-Twizz

Shifting Buttons When Exporting...
This is making me go mad! Flash MX is behaving like Netscape Navigator. I created a MC for navigation, then placed that on the stage. Nothing fancy. Everything looks fine, but when I test it or export it, it shifts all my buttons. I've never had this before. I don't know what to do. Please help!!

Position Shifting Menu
i am trying to make a menu where the menu items all shift down after one moves up...in a loop...example is :
http://www.deluxeinc.com/

can someone please helP??? just a little tip maybe???...my mind cannot figure this out...

Shape Shifting Buttons
Im triying to make a menubar, i made lines of text as buttons, and in the over state i added a movie for an image on the background to move, but it is really dificult to "hit" the button, because of the nature of text, i tried to sove this by adding a background to the button, so the active zone would be bigger, but by doing this, the images on the background get lost behind the button background.. is there a way to make an invisible active zone to fill the spaces betwen letters in the texts?

I attach the .fla file

hope you can help me!

thanks

L.J.

Type Shifting Within Text Box
I seem to be running into some character shifting issues. Let me try and explain further. Type within a text box is set, saved, looks good, ready to go. Then two weeks later I open the file to edit the text and the actual type within the text box has shifted, 5 pixels to be exact. Sometimes this happens even while working in the file. You will click into a text box, and boom, the text shifts right before your eyes. And even when you click out of the box or revert to saved version, the text is now in a new position. I have had to manually then "move" the entire box to make up the 5 pixel difference. Does this make sense, any ideas, thoughts?

Type Shifting Within Text Box
I seem to be running into some character shifting issues. Let me try and explain further. Type within a text box is set, saved, looks good, ready to go. Then two weeks later I open the file to edit the text and the actual type within the text box has shifted, 5 pixels to be exact. Sometimes this happens even while working in the file. You will click into a text box, and boom, the text shifts right before your eyes. And even when you click out of the box or revert to saved version, the text is now in a new position. I have had to manually then "move" the entire box to make up the 5 pixel difference. Does this make sense, any ideas, thoughts?

Shape Shifting Transitions
hello, i have seen a morphing technique mostly used for porfolios and photo gallerys, where a picture frame changes shape in a transition to fit the incoming image. I know you could do this through tweening but obviously A.S would be better. Does anyone know what I'm on about? and if you do do you have any idea how this works? cheers people

So.....pixel Shifting Fixed Yet ?
I was just wondering how do Flash MX users get around
the pixel shifting bug on bitmaps when tried all the
fixes published here in FK and nothing works ?

Has Macromedia fixed this already in a new Flash version ?

I've tried every single fix: the 99%alpha, the 99% scaling,
the xy absolute coords, the bmp braking, the smothing off,
the "best image" publishing setting..... did I left any other
behind..... oh, I'm about to try the "bullet in the head" fix
or the "close my eyes" so I don't see the bug which I think
is less drastic he he

If somebody knows a new solution, please share it, I'm begging.
It's driving me nuts !!

Thanks.
-Waltman

Shifting Menus (complicated)
I've been having a problem. Say I make a website that, when you click to go the "gallery", a box opens up and displays the content. And if you clicked on "e-mail", the box would change/morph/move and display new content.

I can do this... BUT... I can't figure out how to make it go from one "form" to the other in any order. When I make it, the animation always reverts back to a basic, neutral frame, and then moves to the next.

Then I saw the Minority Report website and was blown away. As they were doing what I couldn't figure out (the boxes shifting from place to place)

Does anybody know how this is done? You can either reply here or e-mail me at my website e-mail. Thank you all so much!

Shifting Or Expanding Menu
Yeah!!! I found a site that's doing what I want to do!!!! http://www.detremmerie.be/

Problem...don't know how!!

My efforts are not at all as smooth. I've tried multiple frames for each button, changing hit-state sizes...what a mess.

Anyone know of a tutorial that would cover this nav bar????

Thanks
Blue

Frame Shifting Question
Hi,

I am currently working a flash project that contains a sequence of frames, and each frame contains a list of buttons. Frame could be moved to next by either clicking a button or by a frame having being displayed for a specific time, i.e., 2 seconds. I have tried some coding and could not work out. Here is part of my code.
code:
//In Frame actionscript
ifFrameIsLoaded()
{
stop();
startTime = getTimer();
currentTime = getTimer();
while(currentTime - startTime < 2000)
{
currentTime = getTimer();
}
nextFrame();
}

//In button actionscript
on(release)
{
nextFrame();
}



After testing movie, the frame with this script is not shown. I guess it is because of nextFrame() command. I did try to remove stop() and nextFrame() and now the frame is shifted by every 2 seconds but I could click the button.

Another way I tried was I did not put any actionscript in frame action and just set movie play time at 0.5 fps. The problem I have found was that after clicking button the time counter did not function properly, i.e., next frame right aftering button clicking may have less than 2 seconds to shift to the following frame.

I would appreciate any suggestion! Great thanks in advance!

--CY

Shifting Color Gradients
Does anyone know how to make a shifting color gradient in actionscript 3, simulating clouds of moving color.

I have this one created in actionscript 1.0 but am struggling making it in actionscript 3.

To view this create an actionscript 1 file and paste into first frame:


Code:

R = Math.sqrt(300*300+300*300)*2;
Rh = R/2;
degToRad = Math.PI/180;
sqrt2 = Math.sqrt(2);

++initCtr;
if (initCtr > 1)
trace("Script called twice");

function drawArc(mc, x,y,radius,bA,eA)
{
var r = radius;
var theta = 45*degToRad;
var cr = radius/Math.cos(theta/2);
var angle = (ba+45)*degToRad;
var cangle = angle-theta/2;
var n = (ea-ba)/45;

for (var i=0;i < n;i++,angle += theta,cangle += theta)
{
var endX = r*Math.cos (angle);
var endY = r*Math.sin (angle);
var cX = cr*Math.cos (cangle);
var cY = cr*Math.sin (cangle);
mc.curveTo(cX+x,cY+y, endX+x,endY+y);
}
}

function drawNegArc(mc, x,y,radius,bA,eA)
{
var r = radius;
var theta = 45*degToRad;
var cr = radius/Math.cos(theta/2);
var angle = (ba+45)*degToRad;
var cangle = angle-theta/2;
var n = (ea-ba)/45;

for (var i=0;i < n;i++,angle += theta,cangle += theta)
{
var endX = r*Math.cos (angle);
var endY = r*Math.sin (angle);
var cX = cr*Math.cos (cangle);
var cY = cr*Math.sin (cangle);
mc.curveTo(x+cX,y-cY, x+endX,y-endY);
}
}

var g_alphas = [100,0];
var g_ratios = [0x0,0xFF];
var radians = 0;
// build our matrix using the "box" method
var g_matrix = { matrixType:"box", x:-R, y:-R, w:R*2, h:R*2, r: radians }

function drawGradCircle(mc, x,y,radius, fC)
{
var colors = [fC,fC];

mc.moveTo(x+radius,y); // same as x+cos(0)*r, y+sin(0)*r
mc.beginGradientFill("radial",colors,g_alphas,g_ratios,g_matrix);
// mc.beginFill(fC,0x1000000 - fC);
drawArc(mc, x, y, radius, 0, 360);
mc.endFill()
}

function drawSprite()
{
var t = getTimer() * .05;
// t = 0;
var red = 128 + 127 * Math.sin((0 + this.cphase + t) * degToRad);
var grn = 128 + 127 * Math.sin((120 + this.cphase + t) * degToRad);
var blu = 128 + 127 * Math.sin((240 + this.cphase + t) * degToRad);
var tint = (red << 16) | (grn << 8) | blu;

this.clear();
drawGradCircle(this,0,0,R,tint);// cicle within Yin
}

function updateFrame()
{
this._rotation += 1;
}

function init()
{
trace("Init 1");
if (inited != undefined)
return;
// var h = this.attachMovie("dummy", "yin", 0);
var nbrSprites = 3;
var cont = this.createEmptyMovieClip("container", 0);
cont._x = 150;
cont._y = 150;
// cont._width = 300;
// cont._height = 300;
cont.onEnterFrame = updateFrame;
for (var n = 0; n < nbrSprites; ++n) {
var mc = cont.createEmptyMovieClip("sprite", n);
mc.cphase = (n*360/nbrSprites);
mc._x = Math.sin(mc.cphase * degToRad) * R/2;
mc._y = Math.cos(mc.cphase * degToRad) * R/2;
mc.onEnterFrame = drawSprite;
}
}

init();

Shifting The Registration Point
Hello. Is it possible to move an MC's Registration Point? I have a MC that needs to rotate around a point off centre, but can't figure out how to move it's point. Is this possible?

Ta, A.

Pitch Shifting, Popforge?
Anyone seen any good examples of pitch shifting in AS3?

I found the popforge library http://code.google.com/p/popforge/ but the site is a bit bare bones for me to figure out how to get the pitch shifting working.

Anyone got a small example of this playing a wav/mp3 file shifted? or perhaps even better Mic input?

Cheers, I'm terrible at figuring out how libraries work just from peoples source.

Copyright © 2005-08 www.BigResource.com, All rights reserved