Jump to content

Something Non-Traditional. Can we solve?


martinchristov

Recommended Posts

Hey guys.

Nice to join you php freaks ;)

 

I have an idea for an application here. It's mostly flash, but it couldn't work without a somewhat non-traditional php functionality.

here's the thing:

 

I want to have a function which returns an image... let's say: $img = GetImage();

The function GetImage... I need somehow to execute a flash application in background, which generates an image, then exports pixel data to php.

Php creates the image and returns it to $img.

I'm not really imagining how should this get done.

Mainly I've got no idea how to run the flash app in background.

 

I do mostly flash stuff and php is my secondary prior. Hope some of you guys can help.

 

Cheers from Bulgaria,

Martin

Link to comment
https://forums.phpfreaks.com/topic/177650-something-non-traditional-can-we-solve/
Share on other sites

this is a class that renders a flash swf image to a jpg, take a look, may be of some help.

 

Hey. I think you forgot to send me what you meant.

Although I don't think you understood what I need. I know how to export an image from flash to php. I need to do that whole process in background. Without any flash showing to the user at all. Only the final image. And this has to be done without any JS. Just php.

http://www.phpclasses.org/browse/package/4312.html

 

dammit, this was the link I meant.

 

PHP doesn't have any threading capabilities fora start really, secondly, PHP is server side and flash is client side, just like javascript. The two have no way of communicating really. So what you are looking to do is impossible in the way you're thinking of doing it.

 

However, I would propose you load the flash into a hidden iFrame or something similar and do it that way maybe?

PHP has no way of directly loading aflash app, the only way to do this would be via javascript, this is the case because PHP is server side scripting. Flash may well have a way of communicating with PHP but that has to be initialised by flash, php can't initialise such a communication, this would have to be done via javascript or some other language and then the results from that sent to a php script.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.