Groups | Blog | Home
all groups > flash (macromedia) > june 2005 >

flash (macromedia) : Credits :Please help ASAP


xmcfuture
6/21/2005 9:21:16 PM
I was asked to make a flash file that would list cancer patients who have died
at a team relay this Friday. What they want me to do is take thier list and
have it roll like the credits at the end of a movie. I know how to do this with
after effects but that would take 25 years to render not to mention the size of
the file If I want high quality. Seems that I could just take my list of names
load into swishmax or flash and have it do the "credits" thing. Is this an easy
task? Or did i get in over my head. Thanks:confused;
liquidmagma
6/21/2005 9:34:31 PM
One way to do it is to use a masked layer. The way masks work is everything
behind the masked layer is visible to the user. Any content that's not beneath
the mask is not viewable. So you could copy all your credits into one big text
box, then animate them within the mask. When the text goes outside the mask,
it's no longer viewable so the text is virtually gone once it moves out of the
mask. Play around with it to get a better idea.
xmcfuture
6/21/2005 9:40:13 PM
Hmmm I was thinking I could load all the text into a "add text command" then
use a scroll effect. ?????????

like a slide in from bottom out to top kind of effect. But smooth just like
movie credits..
thanks
sly one
6/21/2005 11:35:55 PM
Sorry, there isn't a "scroll" button in Flash.
Put your text inside a movieclip and then use a motion tween for the movement.
If this sounds like a foreign language then you should complete some of the
tutorials listed under the help menu.
NSurveyor
6/21/2005 11:43:02 PM
NSurveyor
6/22/2005 12:52:53 AM
If you do want to make it dynamically, first save the list of patients in a
textfile so that it looks something like:

Bob Builder
Cedric Entertainer
Big Bird
Cookie Monster
Fishy FishFish
etc.

Save it as: patient_list.txt. Then on a frame in your Flash movie, add:

//SETTINGS
waitTime = 2000; //2 seconds
scrollJump = 1; //Number of pixels to move up on iteration
scrollRate = 1; //The rate of the iteration
file = 'patient_list.txt';
onSlideFinished = function () {
trace('Finished list!');
};
//
stop();
createEmptyMovieClip('black', 10000);
var x = Stage.width;
var y = Stage.height;
with (black) {
beginFill(0);
lineTo(0, y);
lineTo(x, y);
lineTo(x, 0);
endFill();
}
createTextField('credits', 10001, 0, 0, x, y);
my_tf = new TextFormat();
with(my_tf){
color = 0xFFFFFF;
align = 'center';
bold = true;
font = 'Arial';
}
with (credits) {
multiline = true;
wordWrap = true;
selectable = false;
autoSize = true;
setNewTextFormat(my_tf);
}
while(credits.maxscroll==1){
credits.text+='\n';
}
totalVisibleLines = credits.bottomScroll;
halfway = '';
for(var count=0;count<Math.floor(totalVisibleLines/2);count++){
halfway+='\n';
}
credits.text = halfway+'The following people died of cancer. Let us stand here
together in a moment of silence...';
startTime = getTimer();
loadText = new LoadVars();
loadText.onData = function(patient_list) {
patients = halfway + halfway+patient_list.split('\r\n').join('\n');
if (getTimer()-startTime>=waitTime) {
credits.text+= patients;
slideCredits();
} else {
waitForIt = function () {
credits.text+= patients;
slideCredits();
clearInterval(waitID);
};
waitID = setInterval(waitForIt, waitTime-(getTimer()-startTime));
}
};
loadText.load(file);
function slideCredits() {
slideIt = function (sj) {
credits._y -= sj;
if (credits._y+credits.textHeight<=0) {
credits.text = '';
clearInterval(slideID);
onSlideFinished();
}
updateAfterEvent();
};
slideID = setInterval(slideIt, scrollRate, scrollJump);
}
xmcfuture
6/22/2005 1:23:40 PM
NSurveyor
IS AWESOME>

NSurveyor
6/22/2005 9:18:04 PM
NSurveyor
6/23/2005 12:00:00 AM
Try removing the line:

updateAfterEvent();

in the last part of code. Keep the old settings. If you want it smooth,
scrollRate should be 1, and scrollJump should be fairly low. If you want to
change the size of the text... look at this part of the code:

with(my_tf){
color = 0xFFFFFF;
align = 'center';
bold = true;
font = 'Arial';
}

add: size = 14; or whatever size you want. So, it will look like this:

with(my_tf){
color = 0xFFFFFF;
align = 'center';
bold = true;
font = 'Arial';
size = 14;
}
xmcfuture
6/23/2005 1:04:41 AM
I dont see how I import the actual text file. It wont let me import it to
library. Also when I select the actual line of code that calls for the text
file there is no "folder" there indidcating I can select the text file.
Thanks :)
NSurveyor
6/23/2005 1:09:05 AM
Just save a textfile called: patient_list.txt in the same directory as your
Flash file. In the code, I have flash dynamically load it into the movie. So
whenever you show the swf, the textfile MUST be in the same directory.
xmcfuture
6/23/2005 1:28:39 AM
Darn its not working. Is there anyway you could download the text file from my
website and send it back to me? :)

www.teamhatsoff.com/patient_list.txt


this is a website I made for our relay team for the cancer walk. It's ok I'm
still learning flash. I know it could probably be better. So dont laugh lol


xmcfuture
6/23/2005 1:30:24 AM
Actually it is working I just need to speed it up and make the text bigger. You have been a great help. I hope something amazing happens for you this week!

xmcfuture
6/23/2005 1:36:51 AM
I am speeding it up and it doesnt really scroll It kind of jerks up per my
setting. Is it possible to smooth out the animation? I mean I dont see how I
would tween 1 frame. Not sure if im making since ther. I hope so
xmcfuture
6/23/2005 9:32:26 PM
Well I managed to almost get his how I want it. Everyone loves it , So thanks a
million !! I couldn't of pulled this off without you.

Here it is http://www.teamhatsoff.com/com.htm

It still jerks and i messed around with it for a long time and never was able
to make it a smooth scroll like in the movies. I bet there is some kind of blur
effect or something that needs plugged in.


NSurveyor
6/23/2005 9:49:06 PM
AddThis Social Bookmark Button