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




Scribble Effect/duplicate Mc



I've seen an effect used on quite a few sites that looks as if someone has used the brush tool in flash and filled an area by almost manually scribbling the area until it is filled. if you havent got a clue what i mean check out this site: http://www.inarms.net/site/index.html

Its used on that link as a mask effect, i would guess it is just one mc of a brushstroke line that is duplicated, rotated and maybe scaled until the chosen area is full. I havent really played much with duplicatemovieclip, what interests me most is how its possible to contstrain all the duplicated clips within the mc and how to recognise when the mc is full so that you know to stop duplicating, or would it just be done to stop after a set amount of duplicates, during which you would hope the area had been filled.

i've quickly mocked up and .fla that is my first thoughts on how to do it, two problems with it though. firstly the duplicates dont seem to remain on the screen and also i cant constrain them.

thanks.



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-27-2004, 01:14 PM


View Complete Forum Thread with Replies

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

Drawing Scribble Effect
Hi,
i wonder if someone can help.

I want to create a scribble effect. Imagine a screen filled with a scribbled line which carries on untill the screen is blanked out with the line colour.

anyone have any ideas


qamar

[F8] Scribble Animation?
Im looking to make an animation where a scribble is drawn out(like if you wrote the wrong thing in pen - kind of scribble). However i cant think of any other way to do this than making each frame by hand.

If anyone has a tip/trick (or can just make me one ) I would love you forever.

Self Drawing Scribble Script?
Hi guys,

I hope someone can help me. Basically, I'm looking to create a scribble pattern that draws itself out in a quick and expedient manner.

I found an fla file on another site, and the author essentially created a distorted elliptical path and had a ball follow that path. He then used Drawing API and dynamically drew a circle which followed that ball, and since he didn't use the clear() action, the previous circles remained, thus forming a line.

However, it was slow because it relied on an onEnterFrame event, and you need a lot of circles to make a convincing line.

Anyways, can anyone help me out and make this scribble quickly draw itself out in flash?

Cheers,

Rupert

Making A Scribble Animation
Hi there sorry to repost but i have another task!

imtrying to recreate a scribble motion ie like a child has written somthing ..
for example i wanted a link to be animated in a child like scribbley way ( any idieas i gues its all masking )

please help

Louis

Self Drawing Scribble Script?
Hi guys,

I hope someone can help me. Basically, I'm looking to create a scribble pattern that draws itself out in a quick and expedient manner.

I found an fla file on another site, and the author essentially created a distorted elliptical path and had a ball follow that path. He then used Drawing API and dynamically drew a circle which followed that ball, and since he didn't use the clear() action, the previous circles remained, thus forming a line.

However, it was slow because it relied on an onEnterFrame event, and you need a lot of circles to make a convincing line.

Anyways, can anyone help me out and make this scribble quickly draw itself out in flash?

Cheers,

Rupert

Duplicate This Effect?
Well I know that this might be some 1337 code but I want to learn how to do some of the effect here at:
http://surface.yugop.com

The first dot in particular has a tree menu that centers itself whenever one of the boxes is clicked on. The phat part is the fact that there seems to be elastic on the whole thing.

So if any of you can shed light or point me towards an FLA or Tutorial covering DRAGGABLE elastic actionscript (like I can drag an object and it moves around a bit when released) or even a close dupe of the effect I mentioned, I'd appreciate it. Thanks!

How To Duplicate This Effect
I would like to build a flash modual like this one.

http://www.wavehill.org/map

When you mouse over the images appear and when you click on them you go to the pages.

Any idea how to make that mouse over effect and then make it stay so you have time to click it?

Duplicate Effect
I'd like to dublicate this effect here:
http://www.nuguy.com/experiments/analyze.html

but have the object only trail in the y axis. Does anyone have any ideas?Thanks in advance!

How Can I Duplicate This Effect?
Please have a look at this tutorial

http://www.actionscript.org/tutorial...I/index2.shtml

I am trying to create a similar effect (without the alpha fade) to this as an intro to a movie (client request).

I can't use this exact technique as once the API mask has been drawn, it continues throughout the movie (I am using scenes) and also my action script is not good enough to use it as a preloader.

If I use a mask drawing extra squares on each frame - the file size is enormous due to the complex shape.

So what can I do???

Help please

One more thing - using Flash MX (6)

Help With Duplicate Mcs In Text Effect
Hi everyone, please help me with this!

I am making a text effect which works out nicely, duplicating a movie clip with another movieclip inside which holds dynamic text which is replaced by the text I need to use. Everything works ok up to here. This is the script I use on the movie clip, located in the main timeline, 't' is the name given to the mc holding the other mc and the script, then 'letra' is the name of the mc within 't', holding the dynamic text, which is given the variable name 'letra':

onClipEvent (load) {
texto = "The text I need to use is this one";
nL = length(texto);
e = 8;
xI = -(nL/2)*e;
z = 0;
for (i=1; i<=nL; i++) {
letra.duplicateMovieClip("l"+i, i);
l = this["l"+i];
l.xF = xI+(e*(i-1));
l.xT = random(150)-75;
l.yT = random(100)-50;
l.letra = substring(texto, i, 1);
}
letra._visible = 0;
d1 = 150;
d2 = 100;
}
onClipEvent (enterFrame) {
for (i=1; i<=nL; i++) {
l = this["l"+i];
l._x += (l.xT-l._x)/10;
l._y += (l.yT-l._y)/10;
if (l._x<1 || l._x>-1) {
l.xT = random(d1)-(d1/2)+(l.xF*z);
l.yT = random(d2)-(d2/2)+(l.yF*z);
}
}
}


This works out perfect. Now my question. How do I make each of these duplicated movie clips, change its properties one at a time ( I want each one to grow in scale and fade slowly, one after the other)?? I've tried targeting the duplicated mc's from within the main timeline, by using a for loop, and it works, but I can't make the properties change progressivley (size and alpha change in one step in every mc at the same time, not slowly one after the other)...... PLEASE HELP ME!!!!!!!!!!!!!! Thanks guys!

Jerome

Help Me Please...duplicate Mc Text Effect
Hi everyone, please help me with this!

I am making a text effect which works out nicely, duplicating a movie clip with another movieclip inside which holds dynamic text which is replaced by the text I need to use. Everything works ok up to here. This is the script I use on the movie clip, located in the main timeline, 't' is the name given to the mc holding the other mc and the script, then 'letra' is the name of the mc within 't', holding the dynamic text, which is given the variable name 'letra':

onClipEvent (load) {
texto = "The text I need to use is this one";
nL = length(texto);
e = 8;
xI = -(nL/2)*e;
z = 0;
for (i=1; i<=nL; i++) {
letra.duplicateMovieClip("l"+i, i);
l = this["l"+i];
l.xF = xI+(e*(i-1));
l.xT = random(150)-75;
l.yT = random(100)-50;
l.letra = substring(texto, i, 1);
}
letra._visible = 0;
d1 = 150;
d2 = 100;
}
onClipEvent (enterFrame) {
for (i=1; i<=nL; i++) {
l = this["l"+i];
l._x += (l.xT-l._x)/10;
l._y += (l.yT-l._y)/10;
if (l._x<1 || l._x>-1) {
l.xT = random(d1)-(d1/2)+(l.xF*z);
l.yT = random(d2)-(d2/2)+(l.yF*z);
}
}
}


This works out perfect. Now my question. How do I make each of these duplicated movie clips, change its properties one at a time ( I want each one to grow in scale and fade slowly, one after the other)?? I've tried targeting the duplicated mc's from within the main timeline, by using a for loop, and it works, but I can't make the properties change progressivley (size and alpha change in one step in every mc at the same time, not slowly one after the other)...... PLEASE HELP ME!!!!!!!!!!!!!! Thanks guys!

Jerome

How Can I Duplicate With Ease Effect?
Hi, I want to duplicate a grid of 6 x 6 boxes but I want them to individually ease into position one after the other, not all at once, can someone advise me how best to achieve this? Thank you.

I'm Trying To Duplicate This Effect From The Saint
I'm trying to duplicate this effect from the Saints and Solidiers site...
http://www.saintsandsoldiers.com/

The way that elements on the screen move left and right based on where the cursor is. In particular, the way that elements in the foreground move faster, and the background moves slower....creating a nice 3d effect.

How can I achieve this? Or could you point me in the right direction?

Thanks.

Can Anyone Tell Me Where To Find A Tutorial On How To Duplicate This Effect
can anyone tell me where to find a tutorial on how to duplicate this effect
The effect is located here:
http://www.skydivegeorgia.com

it is the swirling effect that goes over the skydiver on the right. Can anyone tell me how to do it or suggest a tutorial on how to do it? Also, does that effect have a name? Thanks, Dvl

Duplicate Movie Blurr Effect
Hi there

I was wondering if anyone here would know where I could find a tutorial for this:
http://www.qstuning.co.uk
Its the banner a the top and its been created using script, I cant seem to find anything on it though.

Any help would be great, thanks

Gary

Nice Simple Effect Trying To Duplicate
I am trying to duplicate a movement seen here http://www.marvyndt.com/v2/ with his audio component. I really like how you are able to reveal it when you roll over it and hide it when you roll out. I have been trying for most of the day to replicate what is seen here. However I seem to be having some issues. In the attached file audio_kirupa2.fla the revealing is being done by the following actionscript on a transparent button on the word audio.
on (rollOver) {
gotoAndPlay(2);
}

Please note I am also using the flashloaded audioplayer component. If I were to add a button that gave the rollout command, where the user clicks out the audio window area....it conflicts with the buttons for the audio. I guess if you were to see the one on http://www.marvyndt.com/v2/ you would understand what I am trying to accomplish. The files I have been working can be found here www.bredwinners.com/kirupa/audio_kirupa1.fla and www.bredwinners.com/kirupa/audio_kirupa2.fla where on kirupa1 the movement works fine, however I have no control over the audio buttons. Any help would be greatly appreciated.

Thanks In Advance
Bonafide

Is This An Easy Lighting Effect To Duplicate?
This seems like it should be easy to do, but I can't figure it out with the masking that I've been doing... maybe I'm way off.

http://sapphirecustomhomes.com/

I'm not so much interested in the page curl, but the shimmer/shine effect on "Sapphire"...

Any ideas? Thanks guys!
-heather

Losing 'duplicate Movie' Effect
I have attempted to load the Create Falling Snow into another movie.

Once I do, the duplicate effect goes away and I only have one image repeating at a time.

Any ideas on how to make a movie with 'duplicate movie' script work inside another swf?

Nice Simple Effect Trying To Duplicate
I am trying to duplicate a movement seen here http://www.marvyndt.com/v2/ with his audio component. I really like how you are able to reveal it when you roll over it and hide it when you roll out. I have been trying for most of the day to replicate what is seen here. However I seem to be having some issues. In the attached file audio_kirupa2.fla the revealing is being done by the following actionscript on a transparent button on the word audio.
on (rollOver) {
gotoAndPlay(2);
}

Please note I am also using the flashloaded audioplayer component. If I were to add a button that gave the rollout command, where the user clicks out the audio window area....it conflicts with the buttons for the audio. I guess if you were to see the one on http://www.marvyndt.com/v2/ you would understand what I am trying to accomplish. The files I have been working can be found here www.bredwinners.com/kirupa/audio_kirupa1.fla and www.bredwinners.com/kirupa/audio_kirupa2.fla where on kirupa1 the movement works fine, however I have no control over the audio buttons. Any help would be greatly appreciated.

Thanks In Advance
Bonafide

I'm Trying To Duplicate This Effect From The Saints And Solidiers Site...
http://www.saintsandsoldiers.com/

The way that elements on the screen move left and right based on where the cursor is. In particular, the way that elements in the foreground move faster, and the background moves slower....creating a nice 3d effect.

How can I achieve this? Or could you point me in the right direction?

Thanks.

I'm Trying To Duplicate This Effect From The Saints And Solidiers Site...
I'm trying to duplicate this effect from the Saints and Solidiers site...
http://www.saintsandsoldiers.com/

The way that elements on the screen move left and right based on where the cursor is. In particular, the way that elements in the foreground move faster, and the background moves slower....creating a nice 3d effect.

How can I achieve this? Or could you point me in the right direction?

Thanks.

I'm Trying To Duplicate This Effect From The Saints And Solidiers Site...
I'm trying to duplicate this effect from the Saints and Solidiers site... http://www.saintsandsoldiers.com/

The way that elements on the screen move left and right based on where the cursor is. In particular, the way that elements in the foreground move faster, and the background moves slower....creating a nice 3d effect.

How can I achieve this? Or could you point me in the right direction?

Thanks.

Kaleidoscope-effect Duplicate Movie Clips
can anyone create a swf file like the one in this site?

please help me, i'm fairly new to flash.

a version without the toggle setting will do.
thanks.

I'm Trying To Duplicate This Effect From The Saints And Solidiers Site...
I'm trying to duplicate this effect from the Saints and Solidiers site... http://www.saintsandsoldiers.com/

The way that elements on the screen move left and right based on where the cursor is. In particular, the way that elements in the foreground move faster, and the background moves slower....creating a nice 3d effect.

How can I achieve this? Or could you point me in the right direction?

Thanks.

Duplicate Movie Clip "leaf Effect"
hiya all,

i am trying to create a scripted leaf effect. Take a look at this image:

http://www.doyoudream.co.uk/Untitled-10.jpg

What i would like is to have the leaves start at the top and spiral down like in the pic above, kinda like following a path, which i know how to do but is there a way of duplicating the movie clip and getting it to follow the path with a teenie bit of randomness over how close to the line the leaves fall and how rotated they are/how many/how fast?

basically so it looks like wind has blown the leaves into this shape,

any help would be greatly appreciated as this is beyond my actionscript skills,

cheers for taking the time to look,

9114

Duplicate Movieclip, Drag Duplicate, Leave Original Behind
Hello all,

I have been searching frantically for an answer to this. I know it has to be easy....

I want to duplicate a movieclip on press and also drag the duplicate, leaving the original behind. I've attached a sample of what I'm doing. Does anyone have any ideas? Is there a way to target the duplicated movieclip to drag that? And leave the original in it's original location?

Any help, guidance, nudging would be greatly appreciated. I've been trying to figure this out for hours.

Thanks,
jessicuh

"Duplicate Scene" Does NOT Duplicate
I just erased a month's worth of work because Macromedia has a funny definition for "duplicate."

I have different scenes which will make up my movie. I build one. it has certain characteristics I want the other scenes to include. So I duplicate the first one, rename it, then make my changes. Straightforward, right? Only, duplicate actually seems to duplicate and link or attach the original and the copy. It does not make a copy, a separate and distinct scene!!!! SO I go back to my first scene, and everything is gone, because it's mysteriously linked or a clone or something of the one I just created (the copy). It's like you have two instances of the scene, and editing either one affects the other. It wasn't so in F5.

What the #$@$*%?!!
Can anyone explain?

Moving Clouds/Object Outline Effect/Buttons Effect - Please Help Me Help My Friend
I've neglected flash for years, mainly because it seems extremely confusing. I've tried to get into it, but it's confusing with 50 different objects in the flash project going on at once, how do you work with all that?

Anyway, I'm doing a website for a friend of mine, and I had this really cool idea that I've seen around and would like to add on to this and give him a nice surprise.

Basically I would like to add a moving clouds loop in the background, similar to this: http://www.templatemonster.com/websi...ates/9630.html

then have an outline effect of the house like this: http://www.templatemonster.com/websi...ates/5488.html

and finally add an effect to the buttons like this: http://www.templatemonster.com/websi...ates/6361.html
(actually I'd be fine with any button effect )

And I'd be happy with just the cloud effect lol. I looked around for tutorials but none of them seem to be what I'm looking for.

This is the header I'm working with, it is layered in Photoshop: http://tecmosuperbowl.net/header.jpg

I would like the clouds to blend in with the blue background gradient, but I don't know how to do this, in Photoshop it's Overlay. I've tried Alpha in flash, but all that does is change the opacity.

I'm not sure where to start, I doubt I could get this in for him in time, but it'd be great. (Sunday is when the site goes live ) Thanks for helping!

How Do I Change The TextArea Component OnFocus Green Outline Effect? I Can See The Same Effect On This Text Input Box
Hi All,

I have a textArea. When I click on the tab key, the focus shifts to the textArea. And along with this a green outline comes around the textArea. How can I avoid the textArea outline color? IS there any way I can modify this?

I had once modified the checkBox component styles by editing a swf. Later I loaded this swf to the flash library. Can i do it something like that?
Will I have to use some AS code for this?

Can anyone help me out.

Thanks in advance:

Roshan

Timeline Effect Same Effect Multiple Images Layout
I'm trying to use the timeline effect on some transparent .png or gif file's...
All I want to do is create say a 100 frame effect... have it fade in at the beginning and out at the end for .png 1.
Then be able to re-use the effect without having to step back through the timeline effects creator dialogue for .png 2 and so on...
In other words I want to create multiple movie clips all w/ the same animation timeline... and then have them easy to edit on the main timeline maybe overlapping a little etc.
Also the client will probably want to tinker w/ adding new images and suggesting which one's should go first in the fade in and out string of animation's which take place simply one at a time on the stage.
Here's a basic link for what I've got.... the machine images should be easily changed maybe even loaded as a seperate .swf or something:
MLS Machines flash intro


The main priority being the main movie timeline should be easy to edit w/ the movieclips... this is prolly a newbie question, but I'm having trouble keeping this simple, for editing in the long run...
Help please.
Thanks.

Sparkle Image Effect And Button Sound Effect
Im trying to figure out how to make sparkle effects to images. Im new to this let me say first off but im not new to web design and htmls.
I also wanna know the button sound effect code. On 50 cent.com everytime you move over a link there is a gun cocking sound and then when you click the link it makes a gun shot noise. How was this achieved?

The Effect Where A Movieclip Is Effect By The Position Of Your Mouse (ill Explain)
Does anyone know how to make the effect found on this site :
http://www.pleymo.net/

where you look around a room by moving your mouse. I think it someone how controls the x and y coordinates with the position of your mouse. If anyone had a source code or fla I would be VERY grateful. Thanks

Mike

The Effect Where A Movieclip Is Effect By The Position Of Your Mouse (ill Explain)
Does anyone know how to make the effect found on this site :
http://www.pleymo.net/

where you look around a room by moving your mouse. I think it someone how controls the x and y coordinates with the position of your mouse. If anyone had a source code or fla I would be VERY grateful. Thanks

Mike

Ripple Effect Or Browser Shake Effect (?HOW?)
Hi all,

Once again I'm stumped !!

I have a movieclip, that contains information about a clients web site(to be used on our company site in the portfolio).
I built a timer to fade the movie clip in.
As it fades in I would like to create a ripple effect.
I've looked at the java applet "Lake" and found I didn't want to use it.
Is there anyway I can build it in flash with AS ?
Also, if it looks awful, How do I create the browser shake effect, but only put it on a specific movie clip ?

Many Thanks,

vglcrew

P.S. Cheers Lucifer_morning_star for all your help last time.

Starlight Effect And Zoom Into Jpeg Effect
Greetings!
I am interested in creating two effects:
One is the starlight that runs across the top of text or objects like what you see for Dolby Surround Sound, the Alliance (film) logo also ends with a similar effect.

Two, is I'd like a movie where the viewer "goes into a jpeg" al la zoom on a gradual basis then fade out. The effect of course would be as if the viewer was entering a scene (but of course the pixelation would obviously obscure the closer you got in).
Thanks!

Blur Effect? And Mouse Trail Effect?
does anyone know how to do similar effect as on this website: http://ladyinthewater.warnerbros.com/ ??? if u go to cast and crew part of the website and move cursor over the picture it looks like someone was touching the screen. any ideas plz?

[CS3] Please Help Lightbox Effect+Trunami Effect=trouble [CS3]
Hello, I've been working on this for awhile and just can't figure this out. On my old portfolio site I, on the portfolio page, I have a column on links using the tsunami effect to project the selected project JPG into the space beside it, then clicks the JPG to display a SWF via a lightbox effect. The problem is that if anyone using it doesn't click the close button to close the lightbox effect and simply clicks another project from the list the dimensions of the SWFs get messed up. I have tried to figure this out for a long time and just am not able to do this. An example of my problem is at http://www.pwmulder.com/index-old.html and I would greatly appreciate ANY help with the matter. I have brought my concern to other flash developers and they're as stumped as I am, and I'm starting to think that there is no way to resolve this. Another minor concern is the changing framerates of the flash shell versus the individual SWFs but that is secondary. Can anyone please help me?

Special Effect Tutorial (Magic Effect)
So this is my first ever tutorial, I think.... It definatly is my first video tutorial. Hope it helps somone. I REALLY plan on the next one being alot better.

http://www.youtube.com/watch?v=IqxV8j86wMc
http://www.youtube.com/watch?v=SkvlMvrLEoQ

The second part is without audio sorry. But it is also the part that shows the code that makes it work.

Any Tutorial On Fizzy Tv Effect Or Bad Tv Reception Effect?
Hi !!
Anyone know of a bad tv reception effect tutorial?
Thanks

Liz

Flag Effect Or Cloths Effect
does anyone here how to make a flag effect or a cloth effect?
what i mean is an animation effect of a cloth or a flag being blown by a wind. I am a newbie in flash MX and actionscript. hope you could help me with this.
and also it would be much better if you could give a link for actionscript tutorials for flash.
thanks

Can't Figure Out This Effect...corner Lay Down Effect
The top flash area

I can't figure out how to accomplish the effect used when the images come in. It appears to be something with either the alpha of the image or alpha gradient overlay...but I just can't figure it out.

Any ideas?

HELP About Alpha Effect/ Tint Effect
please go to this link to download my file first:
http://www.geocities.com/linhm01/help.fla






I am doing on a project by doing a flash and now I am having a big big problem that I have no idea how to deal with. I hope someone here can help me.

Let me tell you what do I expect to see in my flash first.

I seperated some objects (ie. trees, recycle bin, light) by turning them into buttons. For each botton, later I would like to have some descriptions nearby.

I would like when people "mouseover" a button, everything (except the button) will be alpha or tint. That is to let people concentrate on the object that their mouses are over on.

I have made three buttons with the same alpha/tint effect in the .swf file attached. They are (trees), (light), and the (recycle bins).

Here are the procedures:
1: I made the trees into one button, and add effect

2: I made the light into one button, and add effect

3: I made the recycle bins into one button and add effect




but the outcome is that:

when i mouseover the tree: (i made this button 1st)


it turns out that all the buttons (3 buttons) can be seen clearly, while i expect that only TREE can be seen clearly and all others (including the buttons= recycle bins and the light) should be covered with "alpha" effect.

when i mouseover the light: (i made this button 2nd)

it turns out that 2 buttons can be seen clearly (while the 1st button i made, tree, is with alpha effect)

when i mouseover the recycle bin: (i made this button the last)

it is what i expected. that all buttons and everything are with alpha effect, except the recycle bin




i hope someone here can tell me the solution to solve it, thank you very much.

Text Effect - Masking Effect
Hello; I was on the site when I spotted a tutorial on a text effect, here.

I followed the tutorial and I got the desired effect and it worked perfectly! I then used the same effect on a project as it was perfect for what I wanted... I then tried to publish the flash (.swf) file and load it (just for a quick test) and to my surprise instead of having nice faded text, instead I got a huge white block that was used in the layer below the text for the masking. I couldn't see the scrolling text at all! It works perfectly fine if I go "Control -> Play".

Is there a publish setting I've got to enable? Another observation is that I get the same incorrect display when asking "Test Movie".

Please help!

Thanks in advance.

Cursor Effect To Object Effect
Hi
in a nut shell I have found this wicked piece of open source actionscript.

It responds to the cursor and was wondering if it is posible to modify the x_position and y_position actions and make the action respond to a moving object???? (a movieclip with a variable name)


is this to complicated to attempt or is it doable??


THANKS FOR ANY COMMENTS




ACTIONSCRIPT

Code:
//
var rows, colm:Number;
//
function setQuality(thisSpeed:Number):Void {
if (thisSpeed == 1) {
rows = 9;
colm = 18;
} else if (thisSpeed == 2) {
rows = 13;
colm = 22;
} else {
rows = 17;
colm = 28;
}
}
setQuality(_global.speed);
//
// p = point :: t = target :: d = distance :: c = constant :: v = velocity :: f = friction
function flex(p:Number, t:Number, d:Number, c:Number, v:Number, f:Number):Object {
var obj:Object = {d:(((t-p)/c)*v)+(d*f), p:p+d};
return (obj);
}
//
function createBackground():Void {
// start depth
var dep:Number = 1;
// create a background
this.createEmptyMovieClip("bk", dep++);
var bk:MovieClip = this["bk"];
var colors:Array = [0x297396, 0x0B1F28];
var alphas:Array = [100, 100];
var ratios:Array = [0, 255];
var matrix:Object = {matrixType:"box", x:left, y:top-90, w:right-left, h:bottom-top, r:Math.PI/2};
bk.beginGradientFill("linear", colors, alphas, ratios, matrix);
bk.moveTo(left, top);
bk.lineTo(right, top);
bk.lineTo(right, bottom);
bk.lineTo(left, bottom);
bk.lineTo(left, top);
bk.endFill();
// create mask for background
this.createEmptyMovieClip("ele", dep++);
var ele:MovieClip = this["ele"];
this.createEmptyMovieClip("mask", dep++);
var mask:MovieClip = this["mask"];
mask.beginFill(0x000000, 100);
mask.moveTo(left, top);
mask.lineTo(right, top);
mask.lineTo(right, bottom);
mask.lineTo(left, bottom);
mask.lineTo(left, top);
mask.endFill();
ele.setMask(mask);
ele.createEmptyMovieClip("dot", 10000);
}
//
function clearAll():Void {
removeMovieClip("ele");
removeMovieClip("bk");
removeMovieClip("mask");
}
//
function createForce(rws:Number, clms:Number):Void {
createBackground();
var ele:MovieClip = this["ele"];
ele.obj_array = new Array();
var maxn:Number = rws*clms;
var cnt:Number = 0;
// find the distance between the objects
var tween_w:Number = (right-left-100)/clms;
var tween_h:Number = (bottom-top-100)/rws;
// set the starting position for the first object
var start_x:Number = left+(tween_w/2)+50;
var start_y:Number = top+(tween_h/2)+50;
var pos_x:Number = start_x;
var pos_y:Number = start_y;
for (var i:Number = 0; i<rws; i++) {
for (var j:Number = 0; j<clms; j++) {
var obj:Object = {x:pos_x, y:pos_y, baseX:pos_x, baseY:pos_y, speedX:1, speedY:1};
ele.obj_array.push(obj);
/////////////////////////// increment x
pos_x += tween_w;
cnt++;
}
/////////////////////////// increment y
pos_x = start_x;
pos_y += tween_h;
}
///////////////////////////////////////set up force
// motion variables
ele.maxD = 100;
ele.power = 7;
ele.friction = .8;
ele.ratio = .25;
ele.maxD2 = ele.maxD*ele.maxD;
ele.a = ele.power/ele.maxD2;
ele.targx = _xmouse;
ele.targy = _ymouse;
ele.dx = 0;
ele.dy = 0;
////////////////////////////////////// extra forces
ele.onMouseDown = function():Void {
this.power = this.power*3;
this.maxD = this.maxD*1.5;
this.maxD2 = this.maxD*this.maxD;
this.a = this.power/this.maxD2;
};
ele.onMouseUp = function():Void {
this.power = this.power/3;
this.maxD = this.maxD/1.5;
this.maxD2 = this.maxD*this.maxD;
this.a = this.power/this.maxD2;
};
////////////////////////////////////////
ele.onEnterFrame = function():Void {
this.clear();
var objx:Object = flex(this.targx, _xmouse, this.dx, 9, 0.8, 0.85);
this.targx = objx.p;
this.dx = objx.d;
var objy:Object = flex(this.targy, _ymouse, this.dy, 12, 0.8, 0.85);
this.targy = objy.p;
this.dy = objy.d;
// force field
for (var i:Number = 0; i<maxn; i++) {
var obj:MovieClip = this.obj_array[i];
var disX:Number = this.targx-obj.x;
var disY:Number = this.targy-obj.y;
if (disX>0) {
var signX:Number = -1;
} else {
var signX:Number = 1;
}
if (disY>0) {
var signY:Number = -1;
} else {
var signY:Number = 1;
}
var forceX:Number = 0;
var forceY:Number = 0;
var dis:Number = (disX*disX)+(disY*disY);
if (dis<this.maxD2) {
var force:Number = (-1*this.a*dis)+this.power;
forceX = (disX*disX)/dis*signX*force;
forceY = (disY*disY)/dis*signY*force;
}
obj.speedX = (obj.speedX*this.friction)+((obj.baseX-obj.x)*this.ratio)-forceX;
obj.speedY = (obj.speedY*this.friction)+((obj.baseY-obj.y)*this.ratio)-forceY;
var nx:Number = obj.x+obj.speedX;
var ny:Number = obj.y+obj.speedY;
if (nx<left) {
obj.x = left;
} else if (nx>right) {
obj.x = right;
} else {
obj.x = nx;
}
if (ny<top) {
obj.y = top;
} else if (ny>bottom) {
obj.y = bottom;
} else {
obj.y = ny;
}
this.lineStyle(0, 0xCCFFFF, 40);
this.moveTo(obj.baseX, obj.baseY);
this.lineTo(obj.x, obj.y);
}
};
}
//
createForce(rows, colm);
//
stop();

Yugop Effect(no Text Effect)
sorry by my english its very poor , i am spanish

hi to all. firstly i would like to say that I am charmed with this forum.i have learned greatly with. My question is the following one:
you know how to make the effect of the initial page of the last version of yugop? I refer to the effect in which there fall down balls of different sizes that hit between(among) them elastically and are disappearing random.
i will be very grateful if you could help me

Thank you very much

Regards

Smoke Effect, Hmm, More Like Dust Effect
well, I'm trying to make a shape feels like it's drops down on the floor in Flash MX, and want some dust flying out when the shape drops on the floor, I don't want to do it by animaiton,

I know there's some way to make the smoke(dust) effect by coding,
like radomly moving thin lines in circle or duplicate mc to make it liiks like smoke coming out, is there any code examples?...

thank you for your time...

Text Effect - Masking Effect
I've followed a tutorial on a nice text effect that caught my eye, that I found here.

It works fine if I go "Control -> Play"; but if I try to publish it, instead of nice faded text effect, I just see the huge white block with the alpha linar gradient top and no text scrolling whatsoever! It's not only when I publish it, but also when I ask it to "Test Movie"... The only time it works is when I ask Flash 8 to Play the animation. I'm guessing I've missed something simple like a publish setting... But I'm a real n00b and need some help!

Thanks in advance.

Duplicate Mc
I want to run two duplicate MC actions followed by one another. The first creates a pattern of dots (for a chart) and the next joins then together with lines. The problem is that I can run only one - not both.

Any help would be appreciated!


Code:
// set value of dots
for (i=1; i<total; ++i) {
// duplicateMovieClip ("dot", "dot_1_"+i, i); // problem line here!
setProperty ("dot_1_"+i, _x, 0+(i*9));
setProperty ("dot_1_"+i, _y, myYPos_2_[i]); //eh! what happened to the square brackets! array here
}
// like praystation connect lines
for (j=1; j<(total); ++j) {
duplicateMovieClip ("line", "newLine"+j, j);
setProperty ("newLine"+j, _x, getProperty("dot_1_"+j, _x));
setProperty ("newLine"+j, _y, getProperty("dot_1_"+j, _y));
setProperty ("newLine"+j, _xscale, getProperty("dot_1_"+(j+1), _x)-getProperty("dot_1_"+j, _x));
setProperty ("newLine"+j, _yscale, getProperty("dot_1_"+(j+1), _y)-getProperty("dot_1_"+j, _y));
}

[Edited by BIG jolt on 06-18-2001 at 08:02 AM]

Duplicate MC
Hey guys, I am having touble with the duplicate movie action. I can only seem to duplicate the same one once. I want to duplicate the same movie several times, and have it go in an array (rotation). This is the code I made:

number = "Number (number)+1";
duplicateMovieClip ("bluesphere", "bluesphere2", number);
setProperty ("bluesphere2", _rotation, "10");
number = "Number (number)+1";
duplicateMovieClip ("bluesphere2", "bluesphere3", number);
setProperty ("bluesphere3", _rotation, "20");

...and it doesn't work, it only duplicates it once instead of twice. Can you tell me why, and how to fix it.

Thank you,
Patrick Johnson

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