View Full Version : HELP! Can't import any Flash 8 swfs
blixa
05-01-2006, 04:01 AM
I am trying to use <view resource="myflash8.swf" /> to include a swf that i exported from Flash 8 (with the Flash 8 player option selected).
I am getting errors such as:
Can't import \myflash8.swf: 3 >= 0
which is interesting since 3 does indeed >= 0
anyway, if i re-export the fla with "Flash 7 player" setting selected there is no problem (other than the obvious fact that all flash 8 filters etc are not working, which i need)
any ideas?
Is your parent lzapp (openlaszlo movie) compiled as Flash 8?
blixa
05-01-2006, 10:14 AM
i think so.
i am using lzr=swf8 in the url. is there anything else i need to do?
I went here to get a Flash8 filters example .. (http://www.luminicbox.com/dev/flash/flash8/filters.html)
saved filters.swf file from cache using SWF cache viewer utility (free)
it imports into openlaszlo without errors .. and filters work too
<canvas width="500" height="500" debug="true">
<view resource="filters.swf"/>
</canvas>
I have openlaszlo-3.2 installed.
.. and here is the flash8 example to import ..
blixa
05-01-2006, 01:27 PM
First of all thanks for the help.
I used the swf you put here and it partially works, which means i get no errors or warning and the swf loads, but it does not load with the right panel text boxes nor do i get the filter effects.
I am also using 3.2
I am wondering why my own compiled fla gives an error (i even tried to compile an swf with nothing but a circle in it and it gives me the "can't import" error.
Also, you say that the filters work, so i assume that i am not getting the same results as you since i am missing the text boxes and am not seeing the filters.
I'm on windows xp btw.
Shelby
05-01-2006, 02:50 PM
You should make sure that you are at the correct version for everything.
You can type $version into the debugger in order to get the version of the player. If you want a function for checking against another version, you can see my thread about Player Detection here: http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=4317
You can get the version of the Flash movie (The LZ App) by typing _root.getSWFVersion() in the Debugger.
I believe you can call getSWFVersion() against any movie clip. So, you could also use the getMCRef() method on the view that you are importing your movie on and calling the version method on it.
My player is reporting WIN 8,0,22,0 and the movie clip is reporting 8.
If you aren't getting text or filter effects to load, then more than likely something is at a version lower than Flash 8, since those are new Flash 8 features (the Text is rendered differently in 8 than previous versions).
I hope this helps.
blixa
05-01-2006, 09:43 PM
OK, somehow my player reverted to version 7, which was indeed the reason for the filters not showing up in your example.
Now the filters.swf shows up perfectly BUT my own compiled swf still gives me the "can't import" error!
I am really puzzled by this. I even tried to create a very simple swf with just a line or a shape and i tried using one of macromedia's samples and in all cases i get compilation warnings such as:
Can't import \swf8test.swf: 1 >= 0
Can't import \swf8test.swf: 3 >= 0
Can't import \swf8test.swf: 5 >= 3
Can't import \swf8test.swf: null
What can this be?
attach your swf8test.swf file for us to try out ..
blixa
05-02-2006, 03:48 PM
Attached.
Here is the code i am using:
<?xml version="1.0" encoding="utf-8" ?>
<canvas >
<view id="mainView" resource="swf8test.swf" />
</canvas>
blixa
05-02-2006, 03:52 PM
oops
Well I tried importing swf8test.swf and I got this error message ..
Can't import \swf8test.swf 1 >= 0
I do not have Macromedia Editor so I inspected swf8test.swf using swfmill (http://www.osflash.org/swfmill)
with DOS command .. swfmill swf2xml swf8test.swf swf8test.xml
this file was created ..
<?xml version="1.0"?>
<swf version="8" compressed="0">
<Header framerate="12" frames="1">
<size>
<Rectangle left="0" right="6000" top="0" bottom="6000"/>
</size>
<tags>
<FileAttributes hasMetaData="0" useNetwork="0"/>
<SetBackgroundColor>
<color>
<Color red="255" green="255" blue="255"/>
</color>
</SetBackgroundColor>
<UnknownTag id="0x53">
<data>AQBwt6jsjQyHUHC46OeNIIcAAQEAAzWn/wEUAAAAAAAA/xE1yOeNIfapQ7J/HbWw7GBAAA==</data>
</UnknownTag>
<PlaceObject2 replace="0" depth="1" objectID="1">
<transform>
<Transform transX="0" transY="0"/>
</transform>
</PlaceObject2>
<ShowFrame/>
<End/>
</tags>
</Header>
</swf>
It may be that openlaszlo is choking on the metadata "UnknownTag". I don't really know. More experiments needed. Perhaps openlaszlo team can confirm if Flash 8 can be imported. Post a message at laszlo-user mailing list.
________________________
added note ..
I decompiled the Flash 8 file .. filters.swf .. which does import without errors
DOS command .. swfmill swf2xml filter.swf filters.xml
and in the filters.xml file there is no "UnknownTag"
but whether this is a significant clue I don't know.
blixa
05-03-2006, 08:41 AM
Interesting. Well, i'll get swfmill and try to run some tests to figure out where this unknowntag is coming from.
will post my results later
---
As far as i can tell, the unknowntag is the definition of the rectangle properties. Changing its size, color, etc caused the data of the tag to change and adding more shapes resulted in a similar number of unknowntag elements to be added.
Since you say that the sample you swfmilled did not produce unknowntags i am puzzled yet again.
I wonder if there is anyone else that has been creating and exporting swf from macromedia flash and is experiencing the same problem.
It would be great if someone could create a simple swf for me that contains just a rectangle, export it as flash 8 and attach it.
boupy
08-16-2006, 07:40 AM
A little up for this post but I think it could interests someone if it has not already been said elsewhere.
I had the same problem when trying to import some flash animations version 7, 8...
Importing them by script with setSource instead of using the resource tag, solved it.
I tried that with openlaszlo 3.2 and 3.3 with applications compiled in swf7 or swf8 and flash animations exported in version 7 or 8.
So dynamic resources don't seem to cause problems even when the versions differ.
Hope it helps...
Thanks for that setSource() tip .. this seems to work (compiled as Flash 8) .. see earlier file filters.swf to download/use ..
<canvas width="600" height="500" proxied="false">
<view x="100" y="100" name="foo" />
<button width="200" height="30">setSource swf
<method event="onclick">
foo.setSource( "filters.swf" );
</method>
</button>
</canvas>
Energy Recruitm
11-17-2008, 04:46 PM
hi,
When I try to import swf's into Flash 8 They don't work, they where made in flash 8 I just can't put it in anouther fla...
Flash Presentation, Video & Animation Software | Wildfor...
One way around this problem is to use the Load External File play mode to load a series of SWF files. In addition, by checking the "Unload movie at end " box in the Flash SWF tab of the Project settings window, or by selecting the "Remove when done playing" option in the Play tab of the Object settings window for a SWF file played with Load External File, the SWF player will automatically unload the media file once it has finished playing and return all the RAM to the client's system.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.