Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

877606 Posts in 32868 Topics- by 24310 Members - Latest Member: Muzuh

May 20, 2013, 01:05:53 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Javascript effect hack? (flixel)
Pages: [1]
Print
Author Topic: Javascript effect hack? (flixel)  (Read 444 times)
xhunterko
Level 1
*



View Profile WWW
« on: June 09, 2012, 01:28:46 PM »

Hey guys!

I know that you can plug in javascript into flash files using external interface or whatever it's called, so I was wondering something. I've been trying to plug in a glow effect to a flixel sprite for a while now and I've tried what everybody else does says to work and it hasn't, then the thought occured to me.

Can I put in a javascript glow effect class or something and then pass that on to a flixel sprite?

Anybody know?
Logged

idmadj
Level 0
**


View Profile
« Reply #1 on: June 09, 2012, 11:11:10 PM »

No, Javascript can't directly interact with Flash's rendering engine.

What ExternalInterface allows you to do is simply to call a JavaScript function from ActionScript and the other way around.

You could have ActionScript call a JavaScript function that computes a glow effect, then you'd have to render the result yourself through ActionScript, but that would be very convoluted and much simpler to do directly in ActionScript.

Have you tried this: http://flixel.org/flxbloom/
Logged
xhunterko
Level 1
*



View Profile WWW
« Reply #2 on: June 09, 2012, 11:15:38 PM »

Yes, but that's not particularly the effect I want. Thanks though.
Logged

nikki
Level 10
*****


View Profile Email
« Reply #3 on: June 10, 2012, 09:14:50 AM »

glow effect in flash, thats just one of the filters right? http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.html

but since flixel chooses to be a simple blitting framework for pixels, I suppose you loose some of the native functionality, maybe that other framework (not flashpunk) but http://pushbuttonengine.com/ could be useful: its a framework, and it doesnt kill the vector/displaylist functionality if i'm right.

I do believe its not in development anymore, since flash is a dead horse and people are moving on.

On a sunnier side, i believe you could roll your own glowfilter : I think, scaling , radial alpha, blur  etc. and on a side-note: "what everybody else does says to work" : what does everybody say you should do ?
Logged
JMickle
Level 10
*****


lqikq come home


View Profile
« Reply #4 on: June 10, 2012, 02:12:09 PM »

flash is a dead horse and people are moving on.
what?
Logged

nikki
Level 10
*****


View Profile Email
« Reply #5 on: June 12, 2012, 03:23:35 AM »

what?
I do believe its not in development anymore, since flash is a dead horse and people are moving on.

from the pushbutton site (the "its" you conveniently didn't quote Wink ):
Quote
Now, however, Mobile has become the center of the universe, and social games are starting to struggle. So a company that has invested as much as we have in developing technologies primarily suited toward social games is in need of a major pivot.

but more on-topic:   Have you fixed your problem already?
Logged
st33d
Guest
« Reply #6 on: June 12, 2012, 04:18:48 AM »

lol

I know someone who just released a game on many platforms this week using Flash. Including iOS, and the game works great.

I gather this horse is undead.
Logged
Dacke
Level 10
*****


I have never been to Woodstock


View Profile
« Reply #7 on: June 12, 2012, 04:44:19 AM »

Naturally it's not dead. It's more like it's been diagnosed with AIDS but has been put on powerful inhibitors. We've reached Peak Flash and it's downhill from here, but we're probably stuck with it for many years to come.
Logged

vegan • socialist • atheist • humanist • liberal • FOSSer
programmer • feminist • animal rights activist • pacifist • teetotaller
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic