i'm just reading this now... but here's how to fix all your problems:

1) as for 'getting the movie' - since you are using FlashObject, it's really easy, just use document.getElementById();

once you call fo.write() you can get the reference to the movie and you don't have to get it again - no sense in running that every time you call a function.

normally i'll embed the flash movie inline in the page, then put the externalinterface initialization stuff in an onload event. that way you know the flash movie will be there, and it gives all the other elements on the page time to load as well.

2) the form issue is a sort of known issue - there's a lot of problems when placing the flash movie inside a form, although i haven't heard of issues with placing it before vs. after.

read the comments on the livedocs here:
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/ html/wwhelp.htm?context=LiveDocs_Parts&file=00002200.html

and maybe try some googling for more info.






On Apr 20, 2006, at 3:35 PM, David Rorex wrote:

Instead of creating a reference to your flash movie and storing it, I
get it every time.

JS Code:

        function getMovie(movieName) {
            if (navigator.appName.indexOf("Microsoft") != -1) {
                return window[movieName]
            }
            else {
                return document[movieName]
            }
        }


Example usage in JS:

getMovie('myMovie').someFunctionInFlash();

-David R

On 4/18/06, Aaron Smith <[EMAIL PROTECTED]> wrote:
Mark, Ryan,

Thanks for the input. I looked at that other guys ExternalInterface
testing. I switched all of my code to follow what he is doing. I am
still getting IE errors. I can't figure out what is going on. IE
doesn't like calling methods on the flash object for some reason.
When it calls ( flashMovieScroller.gotoStepFromJS(num) ) it errors
out. Why would it be doing that for my methods and not Geoff's
methods. Weird!.

take a look again at this. Look at the update JS and HTML compared to
that other guys. See if there's anything you notice that might be wrong.

http://www.smithaaronlee.net/jstest/ImgScrollerTEST333.html

The only thing I haven't tried yet was rearranging the flash objects
on the page to see if that helps. I guess i'll give that a try

thanks for taking the time.

-Smith



On Apr 18, 2006, at 12:46 PM, Mark Llobrera wrote:

Ryan:

When testing locally with Windows/IE, you can set allowScriptAccess
to 'always' - it'll save you having to upload to a server.

Aaron:
I was stalled with ExternalInterface myself yesterday; I had the
hardest time getting it to work on the Windows/IE combo. The
included samples from Macromedia didn't work, and several others on
the web didn't work either. Other browsers (Firefox, Safari/Firefox
on the Mac) worked fine.  Since I was using flashobject to embed
the swf, I wandered over to Geoff Stearns's blog and found this
example: http://blog.deconcept.com/code/externalinterface.html. I
eventually ended up taking that html (since it worked on Win/IE)
and using it as the basis for my html page, just so I could figure
out what was wrong. I found two things different between my page
that didn't work and the deconcept example:

If you look at the code on that page the reference to the flash
movie isn't initialized until the entire page is loaded. That would
be the first place I would look.

The second thing I learned yesterday (and this is where it starts
to devolve into voodoo) is that the order of items on the page
matters greatly (but seemingly only on Win/IE). I was calling a
flash movie from a javascript function triggered by a form button
(http://www.dirtystylus.com/sandbox/feedroom/filebrowser/
file_browser.html - an attempt to feed an flv on a local filesystem
to a video object). When the form was placed before embedding the
swf, it didn't work on Win/IE. As soon as I moved the form after
the embedded swf in the html code, it worked. Extremely weird.

-Mark

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ryan
Potter
Sent: Tuesday, April 18, 2006 3:19 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Testing ExternalInterface on Windows for
me.


I get the same as you. I looked at the external interface code that I have and the only difference I can see is I have swLiveConnect set to
true but I don't think that is it.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Smith
Sent: Tuesday, April 18, 2006 12:46 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Testing ExternalInterface on Windows for
me.

Yes I tried it out on yours and my server. works just fine. Now have
a look at this. on Firefox and IE: ( http://www.smithaaronlee.net/
jstest/ImgScrollerTEST.html )

It works in firefox like it should. But in IE it doesn't work
completely. I'm having troubles figuring out what is wrong in IE, IE throws errors when you click on a step button. Just viewsource to see
the JS.

this is what it is supposed to do:

when you click a 'step' button it reloads different thumbnails in the scroller piece. when you click on a thumbnail it communicates through
js to the other flash piece to load a larger img.



On Apr 18, 2006, at 11:29 AM, Ryan Potter wrote:

I tested it and it works. It is the testing locally issue. Here is
your code on a server:

http://www.thoughtwillrise.com/flash/exttest/



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Smith
Sent: Tuesday, April 18, 2006 12:22 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Testing ExternalInterface on Windows for
me.

ok, yeah I wonder if thats the issue (local). I was just testing it
locally. I'll try it on a server.




On Apr 18, 2006, at 11:17 AM, Ryan Potter wrote:

Did you upload it to a server and test it or just do it locally?

It doesn't work for me if it is local but it works like a champ when
uploaded and I am on windows too.

I will look at your source.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Aaron
Smith
Sent: Tuesday, April 18, 2006 12:12 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Testing ExternalInterface on Windows for me.

I am at work right now. And we only have one windows machine. We are
using some ExternalInterface functionality in one of our projects.
It's not working on out windows machine. It doesn't work in either
Firefox or Internet Explorer. It works fine in every browser on MAC.

I've been doing some testing to figure out what it was. And could
not
figure it out. So I created an even smaller test. There is two lines
of code in the fla that calls an ExternalInterface call to a js
method that just displays an alert. Even that doesnt work.

If someone could take a quick look at my src files. Test it on IE
and
Firefox Windows. And let me know if it works. If it does work for
others it means we have a problem with our win machine.

here is a zip ( www.smithaaronlee.net/ExtIntTest.zip ) file with the
src (fla, swf, html) . just open it up and look at the test.html
file
in firefox and IE. it should just pop up an alert right away.

I would really appreciate someone doing this. it will only take a
sec.


thanks,
smith

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to