We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Switching between Flash and Processing
Page Index Toggle Pages: 1
Switching between Flash and Processing (Read 3738 times)
Switching between Flash and Processing
Feb 13th, 2007, 7:45pm
 
We are working on a project that involves the user interacting with a processing and Flash environment. I haven't thought too long and hard about this yet so I don't know if there is an easy answer, but what I am looking to do is have Processing and Flash running at the same time. Processing will provide a sort of playful environment to attract attention and when the user approaches the display, the processing animation should disappear and should be replaced by the flash interface.

Does anyone have any tips on making this happen and feel seamless? The user should not be aware that there has been a swap besides the fact that one screen revealed to another.
Re: Switching between Flash and Processing
Reply #1 - Feb 21st, 2007, 1:58am
 
...no advice? Has this been answered else where? Bueller?
Re: Switching between Flash and Processing
Reply #2 - Feb 28th, 2007, 7:11pm
 
I myself am new to processing itself, but as a general developer I'd say flash and Java are completely independent technologies... and from experience I'd suggest you don't try and integrate them at run time. Your best bet (which again i wouldn't recommend) would be to have both environments running and then have some 'external' app-switcher (much like alt-tabbing). i wouldn't suggest frequently opening/closing/launching/reinstanciating applications - your computer (which i guess is an installation) will fall over very quickly. For a simple example, try repeatedly closing/opening a java app quickly... you'll see (on windows at least) the computer will very quickly slow-down to a crawl...

But there are much better programmers on here than me - so I must admit I may be wrong...
Re: Switching between Flash and Processing
Reply #3 - Mar 1st, 2007, 7:55pm
 
It occurred to me you could do it by having your sketch run as a screensaver, and your flash app running normally

when the user interacts, the screensaver could fade to black (5 seconds say) and then quit.. then your flash app detects interaction and fades up from black AFTER five seconds...

i think  thers info elsewhere on the site about how to turn a sketch into a screensaver...
Re: Switching between Flash and Processing
Reply #4 - Apr 9th, 2007, 7:11pm
 
It's an interesting idea, maybe this: https://jdic.dev.java.net/documentation/incubator/screensaver/index.html?
Re: Switching between Flash and Processing
Reply #5 - Apr 9th, 2007, 7:21pm
 
Actually you know what. Flash can run applications when compiled to a projector, I'm willing to bet that Processing can do the same...
Re: Switching between Flash and Processing
Reply #6 - Apr 10th, 2007, 7:32am
 
open()

will launch external apps from inside processing.

which system is this going to run on on mac i've had good results switching between quicktime (fullscreen) and a processing-sketch via applescript ...

F
Re: Switching between Flash and Processing
Reply #7 - Apr 12th, 2007, 6:14pm
 
right now it's running on a windows machine, probably going to stick with that. I have flash opening the processing exe with the aid of a .bat file but for some reason it refuses to access the .exe with the processing program directly. Also trying to figure out how to launch the processing application with out the window border.
Re: Switching between Flash and Processing
Reply #8 - Apr 12th, 2007, 6:33pm
 
you don't have to open the Processing environment itself. fullscreen is also available for export-to-application (what's called a "player" in flash Smiley ). have a look at the dev-reference for main() or on the environment page.

this is how to do it (for a sketch named "fullscreenAppExport"):
Code:

public static void main( String args[] ) {
PApplet.main( new String[] { "--present", "fullscreenAppExport" } );
}

void setup()
{
}

void draw ()
{
line(0,0,random(width),random(height));
}


F
Re: Switching between Flash and Processing
Reply #9 - May 2nd, 2007, 7:46pm
 
sorry i get the
java.lang.ClassNotFoundException: fullscreenAppExport
at java.net.URLClassLoader$1.run(Unknown Source)...
...
whats the mistake?
Re: Switching between Flash and Processing
Reply #10 - May 18th, 2007, 5:35am
 
Anyone have any ideas on using an arduino button (pressure pad) integration to switch between Flash and Processing?

(i.e. Processing running default, pressure pad initializes Flash, & haults Processing... then pressure pad returns to normal state, everything returns to default)
Re: Switching between Flash and Processing
Reply #11 - May 30th, 2007, 12:49am
 
fjen wrote on Apr 12th, 2007, 6:33pm:
this is how to do it (for a sketch named "fullscreenAppExport"):
Code:

public static void main( String args[] ) {
PApplet.main( new String[] { "--present", "fullscreenAppExport" } );
}


F


Thanks, I've been looking for this "full-screen" line for a few days.
Smiley
People are really nice to help each other.
Page Index Toggle Pages: 1