Comments (11)
I've uploaded a FLASH production guideline doc.
Can you please take a look this documentation?
http://gree.github.com/lwf-demo/pdf/FLASHforLWFproductionguideline.pdf
from lwf.
You can verify your FLASH scene in FLASH environment by using LWF_Publish.jsfl.
LWF_Publish.jsfl is available in the "tools/flash" directory.
https://github.com/gree/lwf/blob/master/tools/flash/LWF_Publish.jsfl
Installing JSFL Scripts
http://summitprojectsflashblog.wordpress.com/how-tos/installing-jsfl-scripts/
from lwf.
I try to bulid project tools swf2lwf but errors.
Can you post tutorial install detail that project, please?
Thanks and Regards.
from lwf.
tested. seems like export works. my animations works in unity
from lwf.
I agree with having a tutorial. I can't seem to get sprite atlas to work with the animation. I can't seem to find any tutorials on this besides swf2lwf command line but I can't seem to get that to work. If any one has had success on this PLEASE help me out.
Thanks!
from lwf.
Thank you Adamcbrz.
Sprite atlas works perfectly with LWF. Actually, we prefer to use atlas for reducing number of draw calls. The swf2lwf supports json file that is exported from Texture Packer (http://www.codeandweb.com/texturepacker).
Can you please take a look Texture Packer.
Anyway, a tutorial for converting swf by using Texture Packer's json data would be required...
I'd like to take a look it.
from lwf.
Here is a quick tutorial for making sprite atlas for LWF:)
The tutorial file has been added to "flash" folder under https://github.com/gree/lwf-demo/ project.
If you have any questions for following step, please feel free to ask.
- Extract png files from the swf file.
ruby swf2lwf.rb sprite_atlas.swf
- All png files are extracted and stored in sprite_atlas.lwfdata folder.
- Create texture sheet with exporting placement information to json file
/Applications/TexturePacker.app/Contents/MacOS/TexturePacker --format json --data sprite_atlas.json --sheet "sprite_atlas_texture.png" sprite_atlas.lwfdata/*.png
- A texture atlas "sprite_atlas_texture.png" and json data " sprite_atlas.json" are generated.
- Re-convert swf into lwf with json data.
ruby swf2lwf.rb sprite_atlas.swf sprite_atlas.json
from lwf.
First thanks for getting back to me!
Thats what I had figured out but when I run through this process and import it to Unity I see the animation on meshes but the atlas doesn't show correctly. Every Mesh shows the entire atlas. My process is as follows:
- Publish swf using LWF_Publish.jsfl (No Errors)
- Use the LWFS to convert to lwf and extract the images.
- Use those images in Texture Packer to generate an Atlas save as JSON (Hash)
- Run ruby script "ruby swf2lwf.rb Jake.swf Jake.json" (outputs with no errors)
- Include the files in the Unity Project
- In unity I have a script from your Unity Video demo and put the path to the text.bytes and path to the images.
- I debug some of your code and realized that its expecting the atlas name to be TeethBitmap.png so I renamed my image to that.
- I hit play and I see the animation but all the meshes have the entire atlas instead of the UV location of the appropriate altas item
I will include the flash file and unity project to see if you can see what I am doing wrong.
Drop box link: https://www.dropbox.com/s/4d5es1xv74efc80/LWFTest.zip
Edit: I am using Unity 4.0.1
Thanks,
Adam
from lwf.
It seems swf2lwf.rb didn't handle given json file properly when images in Flash file has AS linkage...
I could have right lwf by removing some AS linkage in Flash files. See following screen shot.
I'd like to take a look processes of swf2lwf.rb, please wait for a moment.
from lwf.
Image file names that used for TexturePacker have to be as same as Linkage names.
In your process 2), LWFS extracts images with "<SWF_filename>_#.png" like "Jake_0.png" instead of Linkage name"Bitmap1.png".
You can generate right lwf file with removing process 2).
-
Publish swf using LWF_Publish.jsfl
This process extract all images from Flash, and save to "<SWF_filename>.bitmap" folder with Linkage name.
In your case, "Jake.bitmap" will be generated. -
Generate TexturePack by using "<SWF_filename>.bitmap".
/Applications/TexturePacker.app/Contents/MacOS/TexturePacker --opt RGBA4444 --scale 1.0 --format json --data Jake.json --sheet "Jake_texture.png" Jake.bitmap/*.png
-
Generate LWF file.
swf2lwf Jake.swf Jake.json -
Open unity/basic2 project in https://github.com/gree/lwf-demo/ .
-
Copy your resources to Resources/LWF/Jake folder, and rename Jake.lwf into Jake.bytes.
-
Update OnGUI() method in "SampleMenu.cs" with following code.
void OnGUI()
{
GUI.Box(new Rect(10,10,100,120), "Menu");
if (GUI.Button(new Rect(20,40,80,20), "Sample 1"))
PlaySample("sample1_normal");
if (GUI.Button(new Rect(20,70,80,20), "Sample 2"))
PlaySample("sample2_normal");
if (GUI.Button(new Rect(20,100,80,20), "Sample 3"))
PlaySample("sample3_normal");
if (GUI.Button(new Rect(20,130,80,20), "Jake"))
PlaySample("Jake");
}
- Click Play, and then click"Jake" button.
from lwf.
Thanks worked great!
from lwf.
Related Issues (20)
- OnEnterFrame not working on low FPS flashes? HOT 2
- Non-movable buttons HOT 5
- Text Filters in Unity HOT 1
- Getting LWF.Bounds of a LWF.Movie immediately HOT 1
- Updating the flash with a delta time of 0 still calls OnEnterFrame
- Disabled buttons still blocking mouse events
- TextProperty in Unity
- Changing the ColorTransform of a LWF.Movie HOT 1
- Blending modes
- SetText() not always rendering new value HOT 2
- fscommand ignored unless frame entered "naturally" HOT 1
- I got a data file(.lwf) used this tool(swf2lwf.rb).But I cannot use in the unity.
- Warnings
- No longer rendering timeline HOT 3
- Text fields are not respecting the alpha of the MovieClip that contains it
- flash-in-unity.net
- can you support spritekit?
- Shapes Support
- Locate error cause easily when converting swf files
- Bad link HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lwf.