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
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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.