Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CheezeyGames

Pages: 1
1
Ask a Question / Re: Glow filter??
« on: June 16, 2011, 07:52:25 am »
Still can't figure it out.
That's a displacement map filter, I'm looking for a glow filter. I wouldn't know how to adapt that, I'm new, remember.
So, really, how would I put that code into my actor?? (without making a new one every step)

2
Ask a Question / Glow filter??
« on: June 11, 2011, 06:13:07 am »
So, I'm trying to add a glow filter to my player. Here's how I implemented the code into the GlowFilter behavior:
Code: [Select]
package scripts
{
import flash.events.*;
import flash.net.*;
import flash.filters.*;
import Box2DAS.Collision.*;
import Box2DAS.Collision.Shapes.*;
import Box2DAS.Common.*;
import Box2DAS.Dynamics.*;
import Box2DAS.Dynamics.Contacts.*;
import Box2DAS.Dynamics.Joints.*;

import stencyl.api.data.*;
import stencyl.api.engine.*;
import stencyl.api.engine.actor.*;
import stencyl.api.engine.behavior.*;
import stencyl.api.engine.bg.*;
import stencyl.api.engine.font.*;
import stencyl.api.engine.scene.*;
import stencyl.api.engine.sound.*;
import stencyl.api.engine.tile.*;
import stencyl.api.engine.utils.*;
import org.flixel.*;

public dynamic class Design_1_1_ extends ActorScript
{
//Expose your attributes to StencylWorks like this
[Attribute(id="1", name="Display Name", desc="An Attribute")]
public var attributeName:String;

//Do all actor initialization here
override public function init():void
{
//How would I initialize my player?
}

//This is executed every frame of the game
override public function update():void
{
var glow:GlowFilter = new GlowFilter();
glow.color = 0x009922;
glow.alpha = 1;
glow.blurX = 25;
glow.blurY = 25;
glow.quality = BitmapFilterQuality.MEDIUM;
 
//What should go here?.filters = [glow];
}

override public function draw(g:Graphics, x:Number, y:Number):void
{
}

override public function handleCollision(event:Collision):void
{
}

//Leave this alone. Do your initializing inside init()
public function Design_1_1_(actor:Actor, scene:GameState)
{
super(actor, scene);
}
}
}
I'm a total newbie with ActionScript, so what should be put where those comments are?
The actor's name is Player.

Pages: 1