Almost done, but needs some outside help!

Hi! So, I have this client that is a church. their logo is a hot air balloon. I am trying to make it randomly move (continuously) behind some words. I got it to work with someone else’s code, which I was greatful for. Now, I want it to stay in bounds and I want it to not be as choppy as it is. I tried this on my own but I can’t get it to work.

Anyway, when you look at it, I am warning you now that It looks really crappy but he seems to like it. If anyone can help me with the code… that would be SO GREAT!

I couldn’t upload the flash file…but here is the swf file…just so you can see what it looks like right now. If anyone can help, I can send you the flash file directly…THANKS!

I think this is what you’re looking for: http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23693&highlight=random+movement. Check mlk’s second post.

Later,
–Elios

Hi, thanks for replying! I don’t want it to bounce off the walls though. I want it to move like a real balloon in the air, not straight across. Know what I mean?

I also don’t want it to stop and go either…

:alien:
Then I suggest doing a long motion tween. You know, very detailed? I’d go about that by making a mc with your balloon mc in it and have it tweened along a motion guide. Design it in a way that the mc can just loop, you know? Adding to that, you can have the balloon rise and enter and then follow the motion guide. At the very last frame of the mc, have it loop to the frame where it starts following the motion guide…Or! you can have it ride the motion guide forward then backward and then loop back to the frame when it first follows the motion guide (a frame ahead of that if you don’t want it to lag because you’ll have a duplicate frame). Sorry, that’s confusing, but I’d do it with a motion tween if you don’t like the previous method.

Later,
–Elios

oh my gosh…how funny, I didn’t even think of that! That will totally work. Way easier! Thanks!!

So, I tried the motion tween and because I want it to move smoothly up and down across, it looks really choppy and the balloon ends up falling on its side when going down. Anyone know what to do? Thanks again!

Yeah, turn automatic rotation off. It’s an option in the properties menu if you click on a frame of the tween in the timeline.

Later,
–Elios

have you tried raising the frame rate? change it from 12 to 24 if you havn’t already. The human eye sees at 15 fps. Anything above that will appear smooth.

i think there is a check-box called ‘orient to path’ that might prevent your balloon from turning on its side while traveling on the motion guide.

I’m just throwing out suggestions, i could be wrong.

wow you guys are good and have helped me too!

you could try something like this…

MovieClip.prototype.funnyMove = function(xmin, ymin, xmax, ymax, speed) {
	var xrad = ((xmax-this._width/2)-(xmin+this._width/2))/2, xctrl = xmin+(xmax-xmin)/2, xpos = Math.PI;
	var yrad = ((ymax-this._height/2)-(ymin+this._height/2))/2, yctrl = ymin+(ymax-ymin)/2, ypos = Math.PI;
	this.onEnterFrame = function() {
		xpos += speed;
		ypos += speed*4;
		this._x = Math.cos(xpos)*xrad+xctrl;
		this._y = Math.sin(ypos)*yrad+yctrl;
	};
};
ASSetPropFlags(MovieClip.prototype, "funnyMove", 7);
myMovieClip.funnyMove(0, 0, 480, 120, .02);

note. the registration point must be in the very middle of the movieclip.

:wink:

Hi guys! So, I tried increasing the frame rate, however, it just goes way too fast.

I tried the code too…where would that code go? I don’t think I am doing it right.

Thanks for all of your help! If you have any more suggestions, I would love to hear them!

a quick example would help? =)

WOW! That is perfect! THANKS SO MUCH!!! that is EXACTLY what I want.

:wink:

you’re welcome. =)