EKG/ECG monitor effect

Hi all,

Does anybody know how to create EKG/ECG monitor effect on flash mx?

maybe you could be more specific… what do you mean exactly?

Syko, i think he is trying to make an electrocardiograms monitor…:-\

here’s something to start…

this.createEmptyMovieClip("line", 0);
line.lineStyle(1, 0, 100);
this.onEnterFrame = function() {
	x += 10;
	line._x -= 10;
	!Math.floor(Math.random()*10) ? line.lineTo(x, Math.round(-40+Math.random()*80)) : line.lineTo(x, 0);
}

now i’m leaving… i have a lot of work :hair: :-\

Hi Kax,

I tried to understand your code but I couldnt. I need a little more explanation on that. Is _x property of “line” set to some value as a default?

Originally posted by KazchiX
Is _x property of “line” set to some value as a default?

when you create or attach a movie clip is positioned at x:0 y:0 by default, if that’s what you meant… :slight_smile:

Thanks Kax,

I initialized variables to some other numbers to fit my movie and it all worked fine. is there any way to make the line just created a symbol by scripting? for examble, duplicate the line.

ehmm… the line already is a symbol? :stuck_out_tongue:

seriously, i think i’m not getting you question… ? :-
do you want to duplicate all the lines or just a section?

Hi Kax,

I want to use this as a transition. ECG line go from left to right and once it reaches the right edge it will devide underneath symbol into two separate symbols. So I want to make the exact same line combine with underneath symbol then separate top and buttom symbols.

and you need scripted? why don’t you simply animate it frame by frame? i think it would be way easier… :-\

Hi!

I read your post earlier today. I tried making a EKG thingy using a green dot and duplicateMC. I couldn’t get it to work. It’s actually been bugging me all day. Hahaha. I will get it eventually, because now it’s bugging me.

However, why not make a MC that does what you want using tweens instead of AS and it will repeat just like an AS. Unless you want it randomized - but then that would be an abnormal EKG -right?

I’ll keep trying. Might want to check out this site that has a lot of examples of AS movement:
http://www.bit-101.com

…Love that site!
(-:

Yes, I’ve watched EKG monitor all day today and still couldnt figure out how I set up using AS. It really bugged me. Now I’m working on different effects. I could make a normal ekg line using either AS or MC but mines not reusable. Once I change the underneath symbol, its useless. and random line doesnt create a normal ekg line. I think I have to come up with the versatile code correspond to the underneath symbols height and width. and I suppose its very difficult.

Okay, sounds good. You totally lost me.
Anyhow, I think I’m going to put this out there as a start even though you are working on something else. This is as close as I can get to it. I wanted to duplicate it so the main dot would have a trailer that fades out - no such luck. I also told that original MC to remove himself, about five different ways that I know of, but he’s not listening to me.

So, here you go, good luck!!