PDA

View Full Version : variables affecting movieclips


flashcdog
03-06-2007, 02:48 PM
Ok.

Using PHP and MySQL, I am passing some variables to flash. Simple enough.

I have a movieclip that is looping in the background.

Depending on whether or not there is data in the database, I want it to affect the movieclip.

In other words, if there is no text to place in the text fields, the movie plays as normal. However, if data is entered into the database and is passed to flash, I want the looping video to blur and/or fade a bit.

I am passing the information to flash just fine, but the affecting the movieclip is giving me trouble. Not really sure how to handle it.

I have the fading and blurring part figured:

import flash.filters.BlurFilter;

var totalBlur:Number = 8;
var noBlur :Number = 0;
var blur:BlurFilter = new BlurFilter(totalBlur, totalBlur, 50);
video_mc.filters = new Array(blur);

video_mc._alpha = 50;

What function would I create to in order to make the movieclip do the above mentioned effects?

Does any of that make sense?

Thank you in advance.

WhidbeyTomas
03-13-2007, 12:22 AM
Ok, continuing my mission to force someone to answer my own question, I am attempting to respond to questions written by people who know much more than I. This victim has been chosen because it is a childless post (I must appologise, I've been calling these posts orphaned).

OK Mr. flashcdog, you seem to know much more than me. After all, I don't know php and I don't mess with server side stuff. I would like to, but I'm scared. Still, if I understand your question, the answer seems pretty simple. You must create a function that enables an mc when your string variable value is not null.

A simple way to do this is to create an mc that is a mask. This mask could use an alpha attribute to cause your mc to seem blurry. This mask mc would only play if the condition is met.

So does this answer your question? Or have over-simplified the problem.