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 & HelpOther Libraries › Open flash file over processing window
Pages: 1 2 
Open flash file over processing window (Read 3920 times)
Re: Open flash file over processing window
Reply #15 - Apr 11th, 2007, 9:22am
 
Great... Now I'm coming closer to what I want.. everythings makes much more sense... let's see how far I'm coming with the javascript... keep you up to date.
many thanx already.
Dum:ene
Re: Open flash file over processing window
Reply #16 - Apr 11th, 2007, 10:16am
 
I thik I'm on the right track using swfobject....
Re: Open flash file over processing window
Reply #17 - Apr 11th, 2007, 12:53pm
 
Hi again...
I'M working with the swfobjet. When I export the P5 file, it doesn't show any errors, but now it seams to have problems with sourcing the swfobject... can it be?
 JSCallback.jsCallback( "src=\"swfobject.js\";", this );
 JSCallback.jsCallback( "id=\"flashcontent\";", this );
 JSCallback.jsCallback( "var so = new SWFObject(\"so_tester.swf\", \"sotester\", \"300\", \"300\", \"9\", \"#FF6600\");", this );
// JSCallback.jsCallback( "so.addVariable(\"flashVarText\", \"this is passed in via FlashVars for example only\");", this );
 JSCallback.jsCallback( "so.write(\"flashcontent\");", this );  
}

It doesn't show the flash ocntent in the window...
thanx,
D
Re: Open flash file over processing window
Reply #18 - Apr 11th, 2007, 12:58pm
 
Or could it be with that id=flashcontent; is not a javascript command?
Re: Open flash file over processing window
Reply #19 - Apr 11th, 2007, 1:08pm
 
you are totally in the wrong direction. what you are trying to do is execute javascript inside processing, that's not gonna work because each line is passed on to the browser seperatly (loosing all variables, objects, ...). the callback function is there to call a javascript function, so you have to make one on the html page and then call it from inside processing.

F
Re: Open flash file over processing window
Reply #20 - Apr 11th, 2007, 1:08pm
 
I guess its... I don't have to write the id=....
but sowrite the string "content" instead of "flashcontent"...
right? that seams to be the way processing does it bye replacing it in the site..?
best,
D
Re: Open flash file over processing window
Reply #21 - Apr 11th, 2007, 1:09pm
 
but still problems... sorry...
D
Re: Open flash file over processing window
Reply #22 - Apr 11th, 2007, 1:18pm
 
ok thanx, that's very different.. aha thanx..
Re: Open flash file over processing window
Reply #23 - Apr 11th, 2007, 1:22pm
 
That means I have to assign all this lines to a single function in html an call this new function from there.. right?... I think I could be able to do that... let's see...
Re: Open flash file over processing window
Reply #24 - Apr 11th, 2007, 2:09pm
 
And now I did following in the head of the html:

<script type="text/javascript" src="swfobject.js"></script>
function displayflashfile()
{
<div id="flashcontent">
 This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
  var so = new SWFObject("d.swf", "sotester", "800", "600", "8", "#336699");
  so.write("flashcontent");
  }
</script>



and in P5:


 JSCallback.jsCallback( "displayflashfile();", this );

but still problems
Re: Open flash file over processing window
Reply #25 - Apr 11th, 2007, 2:36pm
 
something like this:
Code:

<script type="text/javascript" src="swfobject.js"></script>

<div id="flashcontent">
This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
function displayflashfile()
{
var so = new SWFObject("d.swf", "sotester", "800", "600", "8", "#336699");
so.write("flashcontent");
}
</script>


F
Re: Open flash file over processing window
Reply #26 - Apr 11th, 2007, 7:56pm
 
Oh yes of course... I'm sorry... after already a few hours without sleeping... man!... But great, now it works, I manage that now it's replacing content instead of flashcontent so so replacing the applet... now the only thing I need to figure out is, why through your callbackfunction it calls back twice...
man you'r great though!
Re: Open flash file over processing window
Reply #27 - Apr 12th, 2007, 2:35am
 
Hey man I finally made it! No flickering (just very less in mozilla in the transition). The rest is fine. The important communication was processing to flash. Smooth transition!! For flash back to the main page I just reloaded the page... maybe it's gonna be more raffinate soon... let's see... will post the results! You were very very helpfull. So happy.

Danke!

D
Re: Open flash file over processing window
Reply #28 - Apr 12th, 2007, 7:03am
 
super. can't wait to see what you're cooking there ..

F
Pages: 1 2