List Info

Thread: Colin Holgate Live One Night Only! || Tonight. Tuesday April 10th.




Colin Holgate Live One Night Only! || Tonight. Tuesday April 10th.
country flaguser name
United States
2007-04-10 11:57:22
Yes yes, we are meeting tonight. The topic will be Flash
Video and  
the Brightcove API. Colin recently had the chance to work on
a  
Brightcove project and he's going to show us what Brightcove
can do.  
Please note we will be meeting at the offices of Funny
Garbage, NOT  
at the IBM Public Space.


Good stuff!

Meeting Tonight Tuesday April 10th
7 to 9
Lost? 212 343 2534  ||  917 309 3549

Tuesday April 12th:
Funny Garbage
112 Madison Avenue, 4th Floor
New York, NY 10016

Jean-Charles




PS: Extra info that might be useful:
main number: 212 343 2534
Colin's direct line: 646 205 4277
Colin's cell: 917 309 3549

Subways less than three blocks away:
6 train, 28th street (which is on Park Avenue)
R train, 28th street (which is at Broadway)

Subways  six blocks away:
B D F N Q R V W at 6th Avenue & Broadway

tinyurl to Google map: http://tinyurl.com/2mnl9n

_______________________________________________
FlashCodersNY mailing list
FlashCodersNYflashcodersny.org
http://mail.flashcodersny.org/mail
man/listinfo/flashcodersny_flashcodersny.org

1. Talking to the web page. 2. Full screen Flash
country flaguser name
United States
2007-04-11 09:33:28
Some people were asking me about some of the routines I showed last night, so here's a few of them:

After spending some time trying to get external interface or FSCommand working for me to talk from Javascript to Flash or back, I gave up on those and found much easier ways to do it. Here's how Flash tells the page something:

getURL ("javascript:jsFunctionName('" + somedata + "')");

That sends the data in somedata to the function named jsFunctionName on the current page. To get Javascript to tell Flash something I use SetVariable. The Javascript looks like this:

function functionName (somedata) {
        var flashId = "myswf";
        var fo = document[flashId];
     if (fo == null) {
 ;              fo = document.embeds[flashId];
  }
       if (fo == null) {
             fo = document.getElementById (flashId);
}
       try {
              fo.SetVariable ("avariable";, somedata);
   ;     } catch (e) {
 }
}

Most of those lines are just to deal with different browsers. By the "try" line "fo" is pointing at the embedded Flash object named "myswf", regardless of the OS or browser. In the actual swf I check ten times a second to see if the variable "avariable" is empty. If it's not I do whatever it is I'm supposed to do, and then empty the variable, ready for any more data coming in.

I think there may be limitations on the two tricks, in that you may only pass text, but that is all I need it for.

For full  screen Flash I'm using a Flash 9 feature called Stage displaystate. The Flash 9 syntax would read:

Stage.displayState = "fullScreen";;

but that can be said in a Flash 8 compatible way:

Stage["displayState"] = "fullScreen";;

By working that way it's possible to give a true full screen option to users who are on Flash Player 9.0.28 or later, even if you're authoring in Flash 8. A lot of the code in my swfs is Brightcove specific, so it would be better for you to read Tracy Stampfli's article to get the general idea:

http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode_print.html

Re: 1. Talking to the web page. 2. Full screen Flash
user name
2007-04-11 10:02:38
getURL(javascript) can get buggy in IE 6-
What problems did you have with External Interface? We rely on it 100%, and it is by far the most consistent way to do AS-to-JS cross platform.

Re: 1. Talking to the web page. 2. Full screen Flash
country flaguser name
United States
2007-04-11 10:05:52

On Apr 11, 2007, at 10:33 AM, Colin Holgate wrote:

After spending some time trying to get external interface or FSCommand working for me to talk from Javascript to Flash or back, I gave up on those and found much easier ways to do it. Here's how Flash tells the page something:

getURL ("javascript:jsFunctionName('" + somedata + "')");


I wasn't at the meeting, so I was wondering what problems you had with ExternalInterface?  I have found it very reliable, but I have only used it in a couple specific use-cases.  I have found that using JavaScript via getURL can fail if more than one call is made at a time - how do you work around that?  Thanks!

blue skies,
bryan
Re: 1. Talking to the web page. 2. Full screen Flash
country flaguser name
United States
2007-04-11 10:27:15

External Interface I've also found to work pretty well and also let you do things you can't with the other setup but in a few projects that I did before this was available I had to figure the getURL thing out. What I found was that in different versions of IE odd and sometimes bad things will happen when you call more then one js command at a time like brian was saying. Two things that I found to work where combining function calls into one getURL. getURL( javascript: func1(); func2(); ); and then because of what I was doing they had to be separate and you have to time them, there is some documented number but I think it is .05 sec between calls and everything works fine. 




On Apr 11, 2007, at 11:05 AM, bryan.rice wrote:


On Apr 11, 2007, at 10:33 AM, Colin Holgate wrote:

After spending some time trying to get external interface or FSCommand working for me to talk from Javascript to Flash or back, I gave up on those and found much easier ways to do it. Here's how Flash tells the page something:

getURL ("javascript:jsFunctionName('" + somedata + "')");


I wasn't at the meeting, so I was wondering what problems you had with ExternalInterface?  I have found it very reliable, but I have only used it in a couple specific use-cases.  I have found that using JavaScript via getURL can fail if more than one call is made at a time - how do you work around that?  Thanks!

blue skies,
bryan
_______________________________________________
FlashCodersNY mailing list
FlashCodersNYflashcodersny.org">FlashCodersNYflashcodersny.org

Re: 1. Talking to the web page. 2. Full screen Flash
country flaguser name
United States
2007-04-11 10:47:50
At 11:05 AM -0400 4/11/07, bryan.rice wrote:
>  I have found that using JavaScript via getURL can fail
if more than 
>one call is made at a time - how do you work around
that?  Thanks!

The messages sent only happen when specific user actions
happen, and 
so long as the user isn't able to click twice in one
instance I 
should be ok.

It's a couple of months since I was trying the external
interface 
stuff, so I can't remember if my test sends weren't getting
through, 
or if I was doing something wrong. From the look of the help
it seems 
that it can't work in IE on a Mac, which doesn't matter to
me, but 
someone out there might be using IE!


_______________________________________________
FlashCodersNY mailing list
FlashCodersNYflashcodersny.org
http://mail.flashcodersny.org/mail
man/listinfo/flashcodersny_flashcodersny.org

Re: 1. Talking to the web page. 2. Full screen Flash
user name
2007-04-11 10:47:42
Apparently the problem is that IE assumes a getURL is loading a new page, so it kills the session in the window and neuters any further script execution.

On 4/11/07, tyler larson < talltylermac.com">talltylermac.com&gt; wrote:

External Interface I've also found to work pretty well and also let you do things you can't with the other setup but in a few projects that I did before this was available I had to figure the getURL thing out. What I found was that in different versions of IE odd and sometimes bad things will happen when you call more then one js command at a time like brian was saying. Two things that I found to work where combining function calls into one getURL. getURL( javascript: func1(); func2(); ); and then because of what I was doing they had to be separate ;and you have to time them, there is some documented number but I think it is .05 sec between calls and everything works fine. ;




On Apr 11, 2007, at 11:05 AM, bryan.rice wrote:


On Apr 11, 2007, at 10:33 AM, Colin Holgate wrote:

After spending some time trying to get external interface or FSCommand working for me to talk from Javascript to Flash or back, I gave up on those and found much easier ways to do it. Here's how Flash tells the page something:

getURL ("javascript:jsFunctionName('"; + somedata + "';)");


I wasn't at the meeting, so I was wondering what problems you had with ExternalInterface?&nbsp; I have found it very reliable, but I have only used it in a couple specific use-cases.  I have found that using JavaScript via getURL can fail if more than one call is made at a time - how do you work around that? ; Thanks!

blue skies,
bryan
_______________________________________________
FlashCodersNY mailing list
FlashCodersNYflashcodersny.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">FlashCodersNYflashcodersny.org


_______________________________________________
FlashCodersNY mailing list
flashcodersny.org"> FlashCodersNYflashcodersny.org
http://mail.flashcodersny.org/mailman/listinfo/flashcodersny_flashcodersny.org




--
-----------------------
Tim Beynart
Re: 1. Talking to the web page. 2. Full screen Flash
user name
2007-04-11 10:54:13
oh, well, dude... IE on a Mac is hopeless.
I refuse to work on anything where that is a requirement, it's just not worth the effort.&nbsp; Life's too short.

On 4/11/07, Colin Holgate < coiinrcn.com">coiinrcn.com&gt; wrote:
... From the look of the help it seems
that it can't work in IE on a Mac, which doesn't matter to me, but
someone out there might be using IE!

.
Re: 1. Talking to the web page. 2. Full screen Flash
country flaguser name
United States
2007-04-11 10:59:33
At 11:54 AM -0400 4/11/07, Timothy Beynart wrote:
>oh, well, dude... IE on a Mac is hopeless.
>I refuse to work on anything where that is a
requirement, it's just 
>not worth the effort.  Life's too short.

And so am I! I agree, I wouldn't rule out external interface
based on 
that, I just mentioned it in passing because someone said
that getURL 
might have problems on IE too.


_______________________________________________
FlashCodersNY mailing list
FlashCodersNYflashcodersny.org
http://mail.flashcodersny.org/mail
man/listinfo/flashcodersny_flashcodersny.org

[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )