-
1. Re: Control the timeline of a loaded swf
Ned Murphy Sep 13, 2010 2:46 PM (in response to BrianatArena)That code should work okay as long as you have a button with the instance name "myButton" assigned to it (via the properties panel) and the b.swf has a frame 2 it can go to. Have you placed a trace in the button's event handler function to make sure it is working?
You could also use...
graphicSlide = MovieClip(event.target.content);
instead of the line...
graphicSlide = MovieClip(graphicLoader.contentLoaderInfo.content);
So if it is not working for you, are you getting any error messages? Are your Publish Settings set to use AS3?
-
2. Re: Control the timeline of a loaded swf
BrianatArena Sep 13, 2010 3:08 PM (in response to Ned Murphy)I looked into each of the points you mentioned and the alternate line of script. But it's still not working.
I get this message in the output panel each time I click the button:
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mysite.com/b.swf' tried to access incompatible context 'file:///a.swf' -
3. Re: Control the timeline of a loaded swf
Ned Murphy Sep 13, 2010 4:42 PM (in response to BrianatArena)It almost sounds like you don't have your path to your b file properly defined. If the a and b file are in the same local directory, you shouldn't have a security issue. Where are you testing this? If you are testing it on a server, try using a relative reference (b.swf) rather than an absolute one (http://www.mysite.com/b.swf).
-
4. Re: Control the timeline of a loaded swf
Andrei1 Sep 13, 2010 4:49 PM (in response to BrianatArena)1. Write Security.allowDomain (details: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/system/Security.html#a llowDomain())
2. Play with security settings in publish settings --> Flash --> Local playback security.
See if you get the same error while in the browser.
-
5. Re: Control the timeline of a loaded swf
BrianatArena Sep 14, 2010 8:44 AM (in response to Ned Murphy)I have been playing around with the stops and frame labels in b.swf and I have discovered that the myButton is in fact affecting b.swf, though not in the way intended: it's not going to and playing the specific frame I tell it. What it is doing is each time I click myButton, b.swf starts over from frame 1. (I have stripped each swf of all code that is not mentioned in the original post to rule out any inerferance) but the problem still persists. Does this shed any light on what might be happening? Thanks.
-
6. Re: Control the timeline of a loaded swf
BrianatArena Sep 14, 2010 2:02 PM (in response to BrianatArena)Well, I finally figured it out: b.swf had a jpg from the library sitting on the stage all this time. As soon as I converted it to a movie clip everything worked fine. Why would that make such a difference?



