views:

29

answers:

2

Hi
Quite simply, I have a SWF embedded in an HTML web page and want to move to a specific frame when a trigger is clicked. But nothing happens when I click the trigger, as though the js just doesnt communicate at all with the swf.
SWF is written in flash cs4 (a3) The link to the website is http://simplywebdzine.com/test.html.
I have read the text books over and over and researched high and wide on the internet and as far as I see I have done everything correctly but I cannot get this to work. The swf is very basic, just a green box moving accross a small stage. The desired gotoframe would make it cross at a lower height (just a dry run for a more complicated swf)

Would really appreciate someones help if you could possibly find out from the source code what is going wrong. Many thanks Steve

+1  A: 

It looks to me like you have two problems.

  1. You do not have the correct id for your <object> according to your javascript. The object id is "mymovi.swf" while your javascript is targeting "mymovi" as the id.
  2. Even if I change your id using firebug, the function still does not fire off in the flash and I get an error about the function not existing.

Have you added a callback method in flash? something like flash.external.ExternalInterface.addCallback("GotoFrame", gotoFrameHandler) ??

sberry2A
A: 

Hi and thanks for your response. No I havent added a callback. I thought that was just for triggering java from the swf. So I need it also to trigger swf from java? Please could you clarify the items within the brackets ..."Goto Frame",this is the instruction right? so it stays as you've written it? And gotFrameHandler I presume is the js function in my html that triggers the swf? Many Thanks

Steve