PDA

View Full Version : Accessing imported swf timeline and functions


neo002244
05-18-2005, 01:05 PM
Say that you import an SWF file that contains a timeline and a stop() action on frame 1. frame 1 is empty, but frame 2 contains an image.

Assume that this SWF file has been imported into a Laszlo project using the resource tag. How could one create a button in Laszlo that would trigger a gotoAndStop(2) action in the SWF file?

I want to know if I can access different timelines anf frames in an imported SWF file and access its functions and variables.

Many SWF files I've created broke when I imported them into a Laszlo project because the concept of _root (and _level0) has been changed. if I try to access _root.gotoAndStop(2) it doesn't work.

Is it possible to use all absolute paths within the SWF file to eliminate this problem? I am givig it a try but I am still having issues.

Thanks in advance.

neo002244
05-18-2005, 01:09 PM
If you import an SWF file into a Laszlo file, where does it get loaded into? _level1? How would I be able to access it's timeline?

hqm
05-19-2005, 07:32 AM
SWF resources are treated differently depending on if they are loaded at compile time (compiled into the app) or at runtime (using some variant of loadMovie).

You can look at the loader code for how resources and data are loaded at runtime. It is not pretty though. That stuff is in the source distro under WEB-INF/lps/lfc/services/LzLoadQueue.as and data/LzLoader.as and LzMediaLoader.as (also uses transformers/LzMakeLoad.as).

At runtime resources are loaded into an empty container movieclip using loadMovie().

You may access that container movieclip. It may be instructive to poke around in the debugger with this flag set:

Debug.showInternalProperties = true

That will show you probably more than you want to know about the internals.

d~l
02-04-2006, 02:06 PM
This is an old thread .. but ..

You may access that container movieclip. It may be instructive to poke around in the debugger with this flag set:

Debug.showInternalProperties = true

.. where can this flag be set?

mahmoud
02-10-2006, 11:11 AM
You can set this right in the debugger window:
Debug.showInternalProperties = true