flash - AS3 playing/communicating with external swf -


OK, then a test will bring an external SDF such as:
  var loader: loader = 

New loader (); Var url: URLRequest = new URLRequest ("load2.swf"); Loader.load (url); AddChild (loader);

Now trying to do a goto envieque and play it like this:

  var loaded: object; Loader.contentLoaderInfo.addEventListener (Event.Complete, Handled); Function Handle Loaded (E: Event): Zero {loaded = e.target.content; } Load1.addEventListener (MouseEvent.CLICK, handleClick); Click Function Handle (E: MouseEvent): Zero {if (Weighted) {loaded.gotoAndplay ("outro"); } // Other content here }   

This simple external test is 10 frames in SWF @ frame1 is labeled "Introduction", @ frame5 contains the "stop" action, and on frame 6, one "Outro" is labeled.

The problem is, when I click on the button, the external SFF reloads and plays from frame 1.

Any ideas / tips / hints etc. please appreciate it in advance thanks in advance.

Try to cast as loaded as a movie clip :

  Movie clip (loaded) .gotoAndplay ("outro");   

OK, so it did not fix ...

Without seeing more applications it is difficult to say more because Code provides it works on its own right, if this code is on a timeline, it may be able to trace load operations along with a trace, whether the parents are replaying the Playhead.

A ha

I believe that I have solved this problem, this problem is coming from the presence of TLF text in the SSFF. I proved this by making my own version of Load 2 without any TLF text, and this is your array. Works fine with FLA. When I added a TLF text file to my load 2, it started to show you the behavior of the experience. Therefore, fix just do not use TLF taxfold in any loaded SWF. I have tested using a classic textfield with no problem.

The reason for this is because the TLF text fields need to load the data, and hence it creates an artificial preloader that loads into your content when you release a goto endplease action In fact, talking to this preloader, not the timeline you created, and the result is that the preloader 'load' is another copy of your content, this is not a real HTTP request because the content Inside load2.swf, so nothing appears in Fayrbg Net panel. You are being prepared by decimping one of your SWFs and can see it more clearly

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -