Animated Blood Flow
Hi, I have created a small animation much like a psycho movie.
Basically at the end I was looking to do an animated blood flow from the top of the page to eventually fill the screen with red.
Has anybody done this or know of anywhere i can get it
cheers
lee
FlashKit > Flash Help > Flash General Help
Posted on: 06-15-2007, 10:05 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Blood Flow
I am trying to make it look like blood cels flowing through a vein.
I have the movieclip of the blood cell but how do I make it come at random speeds and random times, to look real?
Thanks
This is kinda urgent too.
Blood
I have a question..
Probably is this not really hard to do, but anyway..
http://www.thebloodbrothers.com
If you look at this site, when you roll over for example a textfield the background gets in the background so you can read the text... still its not a buttonlayer on the top because you can still mark the text, so there is not a invisible button layer..
do you got any idea how they did that?
/andreas
Blood
I've been testing everything i can think of but i cant figure out how to make blood in Flash MX. can anyone help?!
Blood
Hello everybody,
I'm working on this movie where someone begins to bleed. But I didn't have much succes. I tried to do it with masks and stuff but I ended up having a million movieclips inside eachother.
Is it possible to have 2 masks on 1 masked layer??
- Ruben
PS. Samples are VERY welcome
Splashing Blood
For a really intellectual flash, I need to splash a lot of blood over the stage. Anyone any pointers to make it look realistic?
Many thanks.
Blood Effect
Is there anyway to make a realistic blood splatter? I was also thinking about making font drip...how would you do that? I am guessing with a shape tween.
Blood Effect
Is there any way to create some blood flow from the upper to bottom from the wall. (like something real)
Another problem is that when I want to change from one frame to the other frame, can flash do the ripple effect to do it?
Blood Effect?
Does anyone know a good place to find a blood effect, or just a good image with REAL looking blood?
I want to put a bloodstain on my site but i cant find any
thanks
Blood Placement
hi all,
im making a shoot-em-up and i was just wondering whether you can put a patch of blood on the bit of the body that you shoot at or do you have to have blood in the same place each time.
thx bye
Blood Bath And Beyond
Been a while since I posted. Here's a little script I've been working on. It's a handy little effect. here's the code, paste on frame 1.
////////////VARIABLES//
density = 35; //Density, default 35
speedA = 2.8; //Speed of low points, default 2.8
speedB = 3.6; //Speed of high points, default 3.6
speedZ = 200; // Time until it stops, default 250
thewidth = 250; //Width of file, default 250
trans = 50; //Alpha, default 50
fade = true; //Fade when stopped, default true
//
//////////////DO NOT MODIFY BELOW//
_root.createEmptyMovieClip("blankz", 0);
theY = new Array();
why = new Array();
blankz.onEnterFrame = function() {
speedZ--;
if (speedZ >= 0) {
blankz.clear();
speedP = speedA * (speedZ / 100);
if (speedP > .1) {
for (i = 0; i < density; i++) {
theY[i] += (Math.random() * speedP);
}
}
speedQ = speedB * (speedZ / 100);
for (i = 0; i < density; i++) {
why[i] += (Math.random() * speedQ);
}
with (blankz) {
beginFill(0xFF0000, trans);
lineStyle(0, 0xFF0000, trans);
moveTo(0, why[5]);
yPoint = _root.thewidth / density;
curvePoint = yPoint / 2;
change = yPoint;
for (i = 0; i < density; i++) {
curveTo(curvePoint, theY[i], yPoint, why[i]);
curvePoint += change;
yPoint += change;
}
lineTo(_root.thewidth, -100);
lineTo(0, -100);
endFill();
}
}
if (speedZ <= 0 && fade && _root.blankz._alpha > 0) {
_root.blankz._alpha -= 1;
}
};
Feel free to use the code
Oozing Blood
I am trying to figure out how to take this picture and add a flash image of blood starting out small and then oozing outwards.
Can someone assist with this? Any help appreciated
Scripted Blood
Ok. I know trhis ios alot to ask, but I need to know how to actionscript blood for a game. I want the blod to be in a big cluster in the middle and then decrease in size and alpha as it spreads out in all directions.
How Do I Do Decent Blood
Ive made (this animation/game thing, but im having problems with the blood on it.
Basically i used frame by frame animation for it, but the problems with this is:
1) it takes up loads of space. Eg. the blood for the chainsaw scene is 1mb of keyframes :S
2)It slows the animation down, as it keeps having to redraw the frames with the blood in.
So has anyone got a good way of drawing cartoony/realistic blood which looks good, but doesnt take up loads of space or slow the animation down?
Your help would be appriciated!!!
Scripted Blood
Ok. I know trhis ios alot to ask, but I need to know how to actionscript blood for a game. I want the blod to be in a big cluster in the middle and then decrease in size and alpha as it spreads out in all directions.
BLOOD Text Effect
Hi, Im currently doing a title page for a 'vampire' short film and i really want to do a blood dripping effect...i.e hopefully a blood droplet falls from either the top of screen or front of screen and falls into a splay then turns into a letter/s any examples hint tips would be grealty appreciated
thanks heaps
BLOOD Text Effect
Hi, Im currently doing a title page for a 'vampire' short film and i really want to do a blood dripping effect...i.e hopefully a blood droplet falls from either the top of screen or front of screen and falls into a splay then turns into a letter/s any examples hint tips would be grealty appreciated
thanks heaps
Red Mist And Thoughts Of Blood...
...have been swimming through my head for the last 45 minutes.
Flash MX is all jolly nice but what's happened to the dynamic textboxes?
I've got a movieclip called myclip
which contains a textbox called mytextbox
it's a dynamic textbox, and I've given it an instancename (mytextinstance) and a variable name (mytextvariable)
now I'm duplicating the movieclip and placing a different bit of text in each clip, or at least thats the theory....
myclip1.mytextbox.text = "think nice thoughts";
doesn't seem to work, neither does
myclip1.mytextbox = "type using fists";
myclip1.mytextbox.mytextinstance = "consider career change";
or
myclip1.mytextbox.mytextvariable = "drink whiskey and weep";
what am I doing wrong? please help.
Blood Cells Video
I know this is kind of extreem but I was wondering if you could help me. I was looking for a screen shot of blood cells shooting past the screen. Just simple cells with the plasma all around it. I just wanted to know if there was a kind of technique that I should use to approach this. Any help would be appriciated. Thanks.
Dripping Blood Effect.
Hey! I'm looking for someone to help me code a dripping blood effect for my logo im trying to make for my guild.
All help is welcomed. Thanks in advance
P.S The logo so far has been attached, please refer to this in making the code .
Effect: Splash Ink Or Blood. How? Please Help
Hi,
Has anybody an idea about the spalsh of ink or blod on the screen?
There are some good photoshop brushes to make realistic splash, but how can we animate this to look real in Flash?
Thanks.
Blood Cells Video
I know this is kind of extreem but I was wondering if you could help me. I was looking for a screen shot of blood cells shooting past the screen. Just simple cells with the plasma all around it. I just wanted to know if there was a kind of technique that I should use to approach this. Any help would be appriciated. Thanks.
Dripping Blood Effect.
Hey! I'm looking for someone to help me code a dripping blood effect for my logo im trying to make for my guild.
All help is welcomed. Thanks in advance
P.S The logo so far has been attached, please refer to this in making the code .
Dots Floating On A Wave Of Blood
Hi pals! :-D
Hey I'm trying to make these dots float on this wave script I found. If I can get them too then I'm going to turn them into ships! i also put two buttons in there that increase and decrease the wave height. Eventually I wanna make the ships be drag n drop able or shoot cannons at each other or something. Here is what I got so far.
Code:
kNbrControlPoints = 20;
kStartX = 0;
kEndX = Stage.width;
kBottomY = Stage.height;
kWaterLevel = Stage.height/2;
kWaveHeight = random(30);
kWaveSpeed = .001;
_root.onEnterFrame = function()
{
this.clear();
this.beginFill(0x480000, 100);
this.moveTo(kStartX, kBottomY);
for (x = 0; x < kNbrControlPoints; ++x)
{
var r = x/(kNbrControlPoints-1);
px = kStartX + r*(kEndX-kStartX);
py = kWaterLevel + kWaveHeight*Math.sin(r*Math.PI*1.1 + getTimer()*kWaveSpeed);
this.lineTo(px,py);
}
this.lineTo(kEndX, kBottomY);
this.lineTo(kStartX, kBottomY);
this.endFill();
_root.ship0._y = kWaterLevel + kWaveHeight*Math.sin(r*Math.PI*1.1 + getTimer()*kWaveSpeed + _root.ship0._x);
_root.ship1._y = kWaterLevel + kWaveHeight*Math.sin(r*Math.PI*1.1 + getTimer()*kWaveSpeed + _root.ship1._x);
}
Here's a link to the file: http://www.threebrain.com/bs/wave_sample.fla
Dripping Blood Effect - BitmapData Fun
I was planning on playing around with the BitmapData object during christmas time (snow) to familiarize myself with its awesomeness, but I got impatient and decided to do dripping blood for halloween.
The way it will work is I am going to compile this effect into a transparent windowless movie, and run it inside of a div tag that completely covers a webpage. The desired effect will be blood dripping over the usual website's content.
Here's the source, feel free to use or improve upon. I'm sure there are performance improvements that can be made. It fades to a sort of gray before it disappears, and I would have liked a browner black, but eh, close enough.
BloodEffect.as
Code:
package
{
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.ColorMatrixFilter;
public class BloodEffect extends Sprite
{
private var timer:Timer;
private var fadeTimer:Timer;
private var drops:Array;
private var bmd:BitmapData;
private var bitmap:Bitmap;
private var dropPath:Sprite;
private var fadeColorMatrix:ColorMatrixFilter;
private var clearBmd:BitmapData;
private var clearBitmap:Bitmap;
public function BloodEffect()
{
// define the fading color matrix - reduce Red, subtract Alpha
var matrix:Array = new Array();
matrix = matrix.concat([.96, 0, 0, 0, 0]);
matrix = matrix.concat([0, 1, 0, 0, 0]);
matrix = matrix.concat([0, 0, 1, 0, 0]);
matrix = matrix.concat([0, 0, 0, 1, -5]);
fadeColorMatrix = new ColorMatrixFilter(matrix);
// init the droplets
drops = new Array();
for (var i:Number = 0; i < 10; i++)
{
var s:Sprite = new Sprite();
drops.push(s);
}
// create the BitmapData and Bitmap objects - made for 1280x1024 res
bmd = new BitmapData(1280, 1024, true, 0x000000);
bitmap = new Bitmap(bmd);
addChild(bitmap);
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
public function addedToStage(e:Event):void
{
// draw the droplet path graphic
dropPath = new Sprite();
dropPath.graphics.beginFill(0xAA0000, 0.4)
dropPath.graphics.drawCircle(0, 0, 5);
dropPath.graphics.endFill();
dropPath.graphics.beginFill(0xFFFFFF, .8);
dropPath.graphics.drawCircle(-2, 0, 1.5);
// draw blood droplets
for each (var s:Sprite in drops)
{
s.graphics.beginFill(0xAA0000);
s.graphics.drawCircle(0, 0, 7);
s.graphics.endFill();
s.graphics.beginFill(0xAA0000);
s.graphics.moveTo(-7, 0);
s.graphics.curveTo(-8, -8, -4, -16);
s.graphics.curveTo(0, -20, 4, -16);
s.graphics.curveTo(8, -8, 7, 0);
s.graphics.endFill();
var flare:Sprite = new Sprite();
flare.graphics.beginGradientFill(GradientType.RADIAL, [0xCC0000, 0xCC0000], [1, 0], [0, 15]);
flare.x = -3;
flare.y = -4;
flare.graphics.drawCircle(0, 0, 8);
flare.graphics.endFill();
s.addChild(flare);
s.x = stage.stageWidth * Math.random();
s.y = -80 * Math.random();
addChild(s);
}
// init motion timer - fired every 50ms
timer = new Timer(50);
timer.addEventListener(TimerEvent.TIMER, onTick);
timer.start();
// init fade timer - fired every 1000ms
fadeTimer = new Timer(1000);
fadeTimer.addEventListener(TimerEvent.TIMER, onFadeTick);
fadeTimer.start();
}
public function onTick(e:TimerEvent):void
{
for each (var s:Sprite in drops)
{
// move the droplet down 2px
s.y += 2;
// copy the path graphic to the BitmapData
bmd.draw(dropPath, s.transform.matrix);
// send the droplet back to the top if its off the screen
if (s.y > stage.stageHeight + 30)
{
s.x = stage.stageWidth * Math.random();
s.y = -80 * Math.random();
}
}
}
public function onFadeTick(e:TimerEvent):void
{
// apply the color matrix filter
bmd.applyFilter(bmd, new Rectangle(0, 0, 1280, 1024), new Point(0, 0), fadeColorMatrix);
}
}
}
Making Dripping Realistic Blood?
Hey!
I´ve got a question.. how do I make blood, dripp/flowing down a wall and perhaps leave trails behind it, the dripping should look as realistic as possible, a singel drop flowing down leaving a trail is enough for me, I don´t need a river..
is there a way to script it so my wall can bleed from several wounds and the drops are flowing down in random ways, leaving trail, making the drop smaller and smaller until its nothing left from my drop?
(i wan´t my wall to bleed..)
thanx in advance!
Blood Flowing Background And Ripple Effect
Is there any way to create some blood flow from the upper to bottom from the wall. (like something real)
Another problem is that when I want to change from one frame to the other frame, can flash do the ripple effect to do it?
Security Reason? I´m Crying Blood...pleae Help Me
Display a linked html.doc in another frame looks now impossible.
This statement is now kaputt //getURL("content.htm", "contentFrame");
Years of work is kaputt.
Is there something I can do to get around this and without contact a lawyer
and bring an action for damages against ADOBE.
Flow?
Hi everyone,
hope I'm traslating correctly from italian, telling you that I have a "Flow error".
This is the code.
ActionScript Code:
var _sound:Sound;
var _channel:SoundChannel;
var _playList:Array;// the list of songs
var _index:Number = 0;// the current song
I get this output.
Error #2044: IOErrorEvent non gestito:. text=Error #2032: Errore di flusso.
at VIII_fla::MainTimeline/playerReady()
playerReady() is the fuction containing this code.
ActionScript Code:
_playList = ["song1.mp3",
"song2.mp3",
"song3.mp3"];
_sound = new Sound( );
_sound.load(new URLRequest(_playList[_index]));
_sound.addEventListener(Event.COMPLETE, onComplete);
By traces and comments, I'va found out that the problem is this line
ActionScript Code:
_sound.load(new URLRequest(_playList[_index]));
But I don't understand why. Could please someone tell me what's wrong and also, maybe, how do I fix that?
Thank you so much.
Work Flow
Hello
I would like to create a website similiar to this one;
http://www.kunstraum.tv/
I am not sure what the work flow would be, could someone please suggest one. I was thinkng the following;
1. Create the pictures and animations in 3ds max
2. Import into Flash MX
3. Have the different buttons play the animation.
What do you think?
Flow-scale
Uh oh... i don't know where to start but... i've seen it before.. but where???
It was like this:
A movie clip that has the size 400x300pixels, if you press a button, it scales in a flow-motion to 500x200pixels, and if you press another button it goes to another size and so on... does anyone know how to do this? NO, i won't use frames for it... it has to be done with code..
Help please?
Program Flow
(using Flash 5)
Hi,
If you have a function in the main timeline, and you have 2 clips that contain code that use that function, is it possible that the clips would access that function in the main timeline at the same time? I'm asking because I'm unsure if its possible for the access of the variables in the main timeline function to overlap? in otherwords, lets say a variable is set to 1, when the first clip uses the function, then the 2nd clip uses the function, and changes the variable to a 2, before the first clip has finished using that variable, is that possible?
thanks
phil.
Help For Flow Navigation Bar
im working on a website and i want to make the navigation as follows
when your roll over 1 of 4 buttons there is a blue bar that flows over and sits behind the button you are at and it smoothly gets there at the end.
also if this isn't asking too much i want to be able to have the blue back bar to stay behind the button that was last clicked
like if your in the contacts section and roll over the services section the blue bar follow over but if you don't click on the services button it flows back over to where you are at.
hope this is clear i just started trying action scripting(complex kind) for the first time and i was able to make a navigation that had four button then when one is clicked the bar goes behind it but it didn't flow behind.
anyways thanks for reading hope you can help me
cheers,
andrew
Text Flow
I'm currently building a magazine type interaction in Flash MX. I have a txt file that i'm loading in using the load var command, however I don't want all the text to appear in a sigle MC textbox.
I know how many characters I can display in the textbox and I want the code to take that number of characters from the loaded text file and display it in the first MC and then use the rest of the loaded text in the subsequent textboxes, so that the text flows between the textboxes as it would in a QuarkXpress document.
Any help would be great.
Air Flow Animation
does anybody know how to design an airflow animation over an air or spacecraft? I'm wanting to produce animated airflow around a spacecraft in flash. will I need to use other software first then import into flash? Help...
Menu Flow
I'm attaching an image to make my question more simple ...
What I would like to achieve is when the user clicks on the nav bar (i.e. Company Overview, Service Overview, Company facts, Management, Contact Hydra Buildings) ... the section that is currently opened will roll up, and the new section will roll down revealing the new text (which will appear under the relevant link). When this is done, the picture on the right - is changed by
picture that is rolled from the button (this part I know how to do ...
the question is maybe you have a better effect to suggest me)
Thanks,
Hydramcarmel
How To Get A Nice Flow.
I want to build a kind of mindmap, starts of with one big button. Lets say it says "start" when you click it lets say it grows abit and sprouts out 2-3 lines that creates new small bubbles. This kind of tween I should be able todo might be abit tedius but I think I can do that. My real problem comes after, if I now want to click on one of the new "nodes" then I want to have a camera like effect where the screen follows the user and zooms in on that node and creates 1-3 new sprouts with new nodes on.
To get the feeling of walking in this mindmap. How do you set this up? Im useing CS3 and AS3. I was thinking useing tweens to get the buttons to grow and to get the sprouts to grow out and give new nodes, but I dont know how to make the camera view change in a good way, I guess I have to use alot of frames how should this be set up. Do I need many many frames so that I have one for every frame of the camera change so to say or can this be done with tweens in a good way that I havent been thinking of.
I understand that this question is very strange and can be very hard to answer but Im happy with any respons I get, I just need to get my thought running if you have anything to say any tips please tell me, Im still very new at flash just started working with it now and started right off with CS3 and AS3. I need some tips of the general flow.
Cover Flow
Hello,
I want to build a website and show my folio.
The way I want to display it is like the itunes coverflow.
here's the link
http://www.apple.com/itunes/jukebox/coverflow.html
just wanted to if it was possible to create this in flash...?
thanks
Photo Flow
Does anyone know of a tutorial on how to create something similar to the following effect?
http://flashloaded.com/flashcomponen.../example1.html
Thanks in advance.
Work Flow Help
Hi,
I'm working on a project and need to know what a good approach is.
I have about 50 videos.
There will be a main main and several sub menus.
The sub menu options will take the users to a page that displays a video to one side and then text on the other.
The text will change during the video, as there will be too much to fit it all on screen at one time.
I have someone working with me who will be giving me the text in a swf file.
What is the best way of making this project?
I was thinking that, since each page will have a video and text in the same dimensions. I would pass on the name of the video and swf file from the menu button on to a new movie clip?
Sorry, I don't have that great a grasp of action script. I'm just looking for a way to do it that doesn't mean making a seperate movie for each bit of video+text.
Any suggestions will be greatly appreciated. Not looking to get work done for me, just a point in the right direction.
Cheers
Cover Flow
I tried to make cover flow work, and i just couldnt get angle tweens right. they have some beauitful components out there for doing just this, but they cost money, and like most people, i want dont want to pay. So i was thinking if anyone could point me in the right direction for doing cover flow, or maybe has a script that does it. Anything helps. if you dont know what coverflow is its the iTunes thing with the pictures that flip across the screen.
Control Flow Bug
I got a really obscure bug which seems that the control is taken to the wrong place. Below is the code:
for(i=0;i<Config.QUESTIONS_TOTAL;i++) {
trace("AAA");
do {
trace("AA");
do {
questionID = Math.floor(Math.random() * Config.WORDMEANINGS.length);
questionAlreadyExist = false;
for(j=0;j<questions.length;j++) {
if(questions[j].id == questionID) {
questionAlreadyExist = true;
}
}
} while(questionAlreadyExist);
questions = new Question(questionID, Config.WORDMEANINGS[questionID][0].toUpperCase(), Config.WORDMEANINGS[questionID][1]);
stepIndex = Math.floor(Math.random() * possibleSteps.length);
stepX = possibleSteps[stepIndex][0];
stepY = possibleSteps[stepIndex][1];
if(stepX < 0) {
beginLeft = questions.wordLength - 1;
beginRight = Config.BLOCK_DIMENSIONX;
} else if(stepX > 0) {
beginLeft = 0;
beginRight = Config.BLOCK_DIMENSIONX - questions.wordLength + 1;
}
trace("A " + [questions.word, stepX, beginLeft, beginRight]);
if(beginLeft >= beginRight) continue;
if(stepY < 0) {
beginTop = questions.wordLength - 1;
beginBottom = Config.BLOCK_DIMENSIONY;
} else if(stepY > 0) {
beginTop = 0;
beginBottom = Config.BLOCK_DIMENSIONY - questions.wordLength + 1;
}
trace("B " + [questions.word, stepY, beginTop, beginBottom]);
if(beginTop >= beginBottom) {
trace("CONTINUE");
continue;
}
beginX = beginLeft + Math.floor(Math.random() * (beginRight - beginLeft));
beginY = beginTop + Math.floor(Math.random() * (beginBottom - beginTop));
trace("C " + [beginX, beginY]);
} while(!getCanPutWord(questions, beginX, beginY, stepX, stepY));
trace("D");
}
The following is traced:
AAA
AA
A GENERALIZE,1,0,9
B GENERALIZE,1,0,2
C 1,1
D
E GENERALIZE,1,1,1,1
AAA
AA
A NEGATIVITY,-1,9,18
B NEGATIVITY,0,0,2
C 9,1
AA
A RACISM,-1,5,18
B RACISM,-1,5,11
C 12,9
D
E RACISM,12,9,-1,-1
AAA
AA
A FEAR,-1,3,18
B FEAR,0,5,11
C 9,9
AA
A STEREOTYPING,0,3,18
B STEREOTYPING,-1,11,11
CONTINUE
AA
A FEAR,0,3,18
B FEAR,1,0,8
C 9,3
AA
A STEREOTYPING,1,0,7
B STEREOTYPING,1,0,0
CONTINUE
AA
A PREJUDICE,-1,8,18
B PREJUDICE,0,0,0
CONTINUE
AA
A STEREOTYPING,1,0,7
B STEREOTYPING,0,0,0
CONTINUE
D
Please note that the last two traces are "CONTINUE" and then "D", and please note that after tracing "CONTINUE", the only possible thing to trace is "AA"........
Anyone experienced something like this before? Do you know how to report this to adobe so that they can fix it? Thanks.
[F8 AS2] Text Flow?
Is there a way to make text flow from one text field to another? I have some dynamic text coming into 2 textfields. I can have it so they enter the text as a paragraph for each field, but i was wondering if they could enter all the text and i could make it flow from one textfield to the other, like you would see in a magazine. Any Ideas? Thanks in Advance..
Flow List 3D
http://www.afcomponents.com/components/flow_list/
Where I can get fla source file of this gallery?
Flow Of Execution?
Hi,
I apologise for what is ostensibly a very basic question but could someone let me know or point me in the direction of some info on the flow of control throughout an Actionscript 3.0 class?
I'm developing an enhanced version of an ecommerce app and was trying second time around to do everything nice and cleanly (like you see in tutorials )
I have a constructor method which is calling a getData method that takes in URL encoded data and populates Arrays with it, I then wanted to continue in the constructor doing things but it seems like the getData method is called only after everything in the constructor is executed.
Code:
var cube_fsc:Array;
var cube_name:Array;
var cube_sku:Array;
public function FlashBlock() {
var request:URLRequest = new URLRequest("flashbox_load.asp?startload=1");
getData(request);
trace(cube_name[0]);
}
the trace statement here tells me that my Array is null or undefined because it is executed before the getData method for some reason. That is what I would like to understand, why it's executed before the getData method has completed. Previously I have just continued my work in the handleComplete method which is called by the getData method and that seemed a little topheavy and messy to me. Any help is greatly appreciated.
Thanks,
A confused Java programmer
Event Flow
Hey Everyone,
Having a spot of trouble with event flow.
I'm trying to dispatch a custom event from a swf file and have my application's main class receive that event. Here's my flow model:
tkalogo.swf (Dispatches event on first and last frame of a custom animation) >> TKA_Logo (Loads the file, then adds it to the stage) >> ASKF_Wedding (Calls TKA_Logo and waits for the event to be fired)
The Main class (ASKF_Wedding) does not receive the event ever. Here are my codes:
SCRIPT ON TIMELINE INSIDE OF logo_mc INSIDE OF tkalogo.swf
Code:
import com.tkassembled.TKA_Event;
dispatchEvent(new TKA_Event(TKA_Event.LOGO_START);
TKA_Logo.as
Code:
package com.tkassembled
{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
import flash.net.URLRequest;
public class TKA_Logo extends MovieClip implements TKDisplayObject
{
private var loader:Loader;
private var earlRequest:URLRequest;
public var logoHolder:MovieClip;
public function TKA_Logo()
{
loader = new Loader();
earlRequest = new URLRequest("http://asilverknightsfire.com/tkassembled/tkalogo.swf");
loader.contentLoaderInfo.addEventListener(Event.INIT, initListener);
loader.load(earlRequest);
}
private function initListener(e:Event):void {
loader.contentLoaderInfo.removeEventListener(Event.INIT, initListener);
logoHolder = e.target.content;
logoHolder.addEventListener(Event.ADDED, addedListener);
addChild(logoHolder);
reposition();
}
public function clean():void {
}
public function reposition():void {
logoHolder.x = (stage.stageWidth/2)-(logoHolder.width/2);
logoHolder.y = (stage.stageHeight/2)-(logoHolder.height/2);
}
private function LogoEnd(e:TKA_Event):void {
trace("THE STUPID DUMB EVENT HAS FIRED!
FNA!");
//logoHolder.removeEventListener(TKA_Event.LOGO_END, LogoEnd);
dispatchEvent(new TKA_Event(TKA_Event.LOGO_END, false));
}
private function addedListener(e:Event):void {
logoHolder.logo.addEventListener(TKA_Event.LOGO_START, LogoEnd);
}
}
}
ASKF_Wedding.as
Code:
package {
import com.tkassembled.TKA_Event;
import com.tkassembled.TKA_Logo;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
public class ASKF_Wedding extends Sprite
{
private var TK_Intro:TKA_Logo
private var WState:String = "IN";
public function ASKF_Wedding()
{
StageSetup();
TK_Intro = new TKA_Logo();
addChild(TK_Intro);
TK_Intro.addEventListener(TKA_Event.LOGO_START, IntroEnd, true);
}
private function StageSetup():void {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, MainReposition);
}
private function MainReposition(e:Event):void {
switch(WState) {
case "IN":
TK_Intro.reposition();
break;
case "MA":
break;
}
}
private function IntroEnd(e:TKA_Event):void {
trace("INTRO IS OVER, SERIOUSLY!");
}
}
}
TKA_Event.as
Code:
package com.tkassembled
{
import flash.events.Event;
public class TKA_Event extends Event
{
public static const LOGO_START:String = "intro_start";
public static const LOGO_END:String = "intro_end";
public function TKA_Event(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}
public override function clone():Event {
return new TKA_Event(type, bubbles, cancelable);
}
public override function toString():String {
return formatToString("TKA_Event", "type", "bubbles", "cancelable", "eventPhase");
}
}
}
I can't seem to get it to work. Does anyone see an error in my code? I don't know I'm missing... is there something wrong with my event flow?
- TK
Create Non-animated Equivalent Of Animated Flash 8 Animation
Hi, I'm working with a template that includes Flash. It's bad enough I've never touched Flash before this project, but I have to actually work with someone else's engineering of one (I'm retrofitting a purchased template)! LOL
Anyway, all I want to do is to save a completely non-animated version of the animated version I've managed to perfect. The plan is to use it on sub-pages of our presentation so that people only have to experience the animation when they land on the page. Not when they're navigating around. I've already tried a couple of things including saving an image map version. All that did was present me with an error message that certain components weren't included, which is tentatomount to being non-usuable to me for now.
So, is there a way to tell Flash, "Hey, this looks great, now give me a static version of it with working links and everything!".
Thanks if anyone can help!
Dave
Water Flow Effect
I am looking for an effect the simulates water flowing out of a facet. Any ideas or links?
|