|
Hello,
please see the following lines in your code:
static CSWFBitmap bmp[4]={ CSWFBitmap(1, (UCHAR*)(pFileName[0]) ) ,\<br />
CSWFBitmap(2, (UCHAR*)(pFileName[1]) ),\<br />
CSWFBitmap(3, (UCHAR*)"bm129.jpg" ), \<br />
CSWFBitmap(4, (UCHAR*)(pFileName[3]) ) };<br />
static CSWFShape shape[4]={ CSWFShape (3, shapeRect, 10), CSWFShape (4, shapeRect, 11), \<br />
CSWFShape (5, shapeRect, 12), CSWFShape (6, shapeRect, 13) };
As you can see the CSWFBitmap bmp[4] array has last two members with ID's 3 nd 4, respectively.
The similar situation is with the CSWFShape shape[4] array which has the first and the second member with the ID's 3 nd 4, respectively.
This means that you have 4 objects defined with 2 only 2 unique ID's, which is invalid situation.
That is why you don't see the third and the fourth frame of your animation.
The shape[0] and shape[1] are created in place of bmp[2] and bmp[3].
Hope I could help you !!!
Best regards,
Darkoman
"Avaritia est radix omnium malorum..."
|
|
|
|
|
oh, i see , Id must be unique to CSWFBitmap and CSWFShape.
thanks for your help
best regards
rootlife
|
|
|
|
|
Hi,
Congrats for rocking application.
I am getting an error regarding conflicting of lib files while trying to build the Test application. I have ignored "LIBCD.lib" as required but still no results.
I am working with Vista with MS Visual Studio 2005.
Any help will be appriaciated.
Thanks,
Saj.
|
|
|
|
|
hello
I would want to know which version of visual studio is due to compile this project.Indeed i can't achieve to compile this with neither wisual studio 2005 nor visual studio 6.0. Thus in visual studio 2005 the function pow of math.h triggers an error because it is not overrided
thank you
|
|
|
|
|
Hi darkoman,
Do you known how to transcode flash type to other media type(such as avi,mpeg4...)
or do you have the spec for flash type?Can you kindly give me some instruction?
My eMail is:topyangs@hotmail.com.Hope to get your reply.
Thanks,
|
|
|
|
|
Hi,
Do you plan to add TEXT capability to the library?
|
|
|
|
|
Hello,
thanks for an interest...
I have added that but I am spending time on testing it.
Hope to finish it soon.
Best regards,
Darkoman
|
|
|
|
|
I'm keen to trying it out when you have it ready...
|
|
|
|
|
The following is my code.
It creates swf file and I see that it is big enough (1.7MB) so I assume it incluse all the frames, but I see only the first frame.
void exportToFlash(HWND hwnd)
{
CString Path, Path1;
// Set movie params
POINT_F pt;
int cx=screen_cx;
int cy=screen_cy;
SIZE_F movieSize = {cx, cy};
int frameRate = 40;
// Create empty .SWF file
CSWFMovie swfMovie;
Path=STRING LogPath;
Path.Replace(".isu",".swf");
char *path=addDataFolder(STRING Path,Path1);
swfMovie.OpenSWFFile(path, movieSize, frameRate);
path=addDataFolder("Data\\Temp.jpg",Path1);
SWF_RGB bgColor = {0xf, 0xf, 0xf};
swfMovie.SetBackgroundColor(bgColor);
float bmp_width = 800.0f; float bmp_height = 533.0f;
// Define shapes
RECT_F shapeRect = {0.0f, 0.0f, 200.0f, 120.0f};
SWF_RGBA lineColor = {0, 0, 0, 255};
RECT_F bitmapRect = {0.0f, 0.0f, bmp_width, bmp_height}; // size of the bitmap
//RECT_F clipRect = shapeRect; // fill the full rectangle
for (int i=0; i
|
|
|
|
|
Hello,
thanks for the interest...
The reason for thew error is the following:
- the ID for each object must be unique
Regards,
Darkoman
"Avaritia est radix omnium malorum..."
|
|
|
|
|
Thank for the SWFLib !
I want to add an action context(action script) to a sprite.
How can I add the action context?
Is it possible?
------
Welcome!
|
|
|
|
|
Hello...
Thanks for the interest in the SWFLIB project.
Unfortunately, the action script is not supported in this release.
Best regards,
Darkoman
|
|
|
|
|
Thanks for your reply...
SWFLIB is very good library.
I need to add action script to flash.
Have you any plan or program architecture on the action script?
And, can I know that?
---
Welcome!
|
|
|
|
|
Hello,
in order to add action script to this library you'll have to follow the official Macromedia (now Adobe) SWF File Format Specification. I have to little time now to implement this but I will prepare this update for the future releases. I am sorry, but I have no specific plan to add ActionScript support for now.
Best regards,
Darkoman
|
|
|
|
|
Thanks for your reply...
Is that possible to add the action script on the flash ver. 3.0 ?
---
Welcome!
|
|
|
|
|
Hello,
the ActionScript of the Flash version 3.0 is already supported. Please see the programmers manual for the details in the downloads section of this article. These actions can be applied to either button object, the sprite object or to the main movie object.
Best regards,
Darkoman
|
|
|
|
|
|
Hello,
Just to make it clear:
- SWFLIB in its current release supports flash version 3.0 action model (simple tag-action model)
- flash version 4.0 extends this approach to stack-based tag-action model
- only flash version 5.0 and above extends this functionality to "JavaScript like" action model.
I am not able to do the action model upgrade in the SWFLIB in close future (I work on other projects). I will however inform you when this update is ready. I am very sorry for this delay...
Best regards,
Darkoman
|
|
|
|
|
|
thanks for this work, I have 2 questions:
1. the PDF doc says support for v4 is forthcoming; any ETA? progress? status?
2. i want to put some flash animations i make, using your SWFlib, on my web page; would you like a credit? if so, what would you like? (e.g., link to this page? your name? etc.)
|
|
|
|
|
Hello, thanks for your comments...
1. Yes, actually I have done some work but I didn't find an extra time to update an article and the library guide. You will for sure need an updated version of this SWF library (with no bugs), so I'll try to post it in the next few days.
2. The link to the site would be enough. Thank you very much...
Best regards,
Darkoman
|
|
|
|
|
fwiw, http://home.earthlink.net/~amacginitie
...don't expect anything fancy, though! ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hello,
I have seen your work.
It's more then fancy... I like it!
Thanks again for your interest for SWFLIB project.
Best regards,
Darkoman
|
|
|
|
|
Hi all,
If anyone has used this file to create a bitmap (jpeg) animation, maybe you can help me. I have two jpegs and I want to create a 2 frame animation. I follow the authors instructions and the first frame turns out correct (except for image is flipped).
However, in the second frame the bitmap is not updated. A second frame IS being produced because if I move the rectangle shape that shows up in the animation, but the image filling the rectangle remains the same. I have followed the authors instructions and order but I can't find where I'm going wrong. I've tried using the same shape, updating the shape, using arrays of bitmaps etc, but have been unable to have the 2nd image appear on the 2nd frame.
Any help would be appreciated.
Regards,
Stephen Faul
Here follows the code used....
SIZE_F movie_size = {200.0f, 120.0f};<br />
int framerate = 1;<br />
POINT_F pt;<br />
CSWFMovie m_SWFMovie;<br />
<br />
m_SWFMovie.OpenSWFFile("C:\\TEMP\\SWFTest.swf", movie_size, framerate);<br />
SWF_RGB bgColor = {255, 0, 0};<br />
m_SWFMovie.SetBackgroundColor(bgColor);<br />
<br />
float bmp_width = 800.0f; float bmp_height = 533.0f;<br />
<br />
RECT_F shapeRect = {0.0f, 0.0f, 200.0f, 120.0f};<br />
SWF_RGBA lineColor = {0, 0, 0, 255};<br />
RECT_F bitmapRect = {0.0f, 0.0f, bmp_width, bmp_height};
RECT_F clipRect = shapeRect;
<br />
<br />
<br />
<br />
CSWFBitmap bmp(1, "C:\\TEMP\\ron40002.jpg");<br />
m_SWFMovie.DefineObject(&bmp, -1, false);<br />
<br />
CSWFShape shape(3, shapeRect, 1);<br />
shape.AddLineStyle(3, lineColor);<br />
shape.AddBitmapFillStyle(bmp.m_ID, SWF_FILLSTYLETYPE_BITMAP_0, bitmapRect, clipRect);<br />
<br />
pt.x = 0;<br />
pt.y = 0;<br />
shape.ChangeStyle(1, 1, 0, &pt);<br />
<br />
shape.AddLineSegment(200, 0);<br />
shape.AddLineSegment(0, 120);<br />
shape.AddLineSegment(-200, 0);<br />
shape.AddLineSegment(0, -120);<br />
m_SWFMovie.DefineObject(&shape, shape.m_ID, true);<br />
<br />
m_SWFMovie.ShowFrame();<br />
<br />
<br />
<br />
<br />
<br />
CSWFBitmap bmp2(2, "C:\\TEMP\\ron40006.jpg");<br />
m_SWFMovie.DefineObject(&bmp2, -1, false);<br />
<br />
CSWFShape shape2(4, shapeRect, 1);<br />
shape.AddLineStyle(3, lineColor);<br />
shape.AddBitmapFillStyle(bmp2.m_ID, SWF_FILLSTYLETYPE_BITMAP_0, bitmapRect, clipRect);<br />
<br />
pt.x = 0;<br />
pt.y = 0;<br />
shape2.ChangeStyle(1, 1, 0, &pt);<br />
<br />
shape2.AddLineSegment(200, 0);<br />
shape2.AddLineSegment(0, 120);<br />
shape2.AddLineSegment(-200, 0);<br />
shape2.AddLineSegment(0, -120);<br />
m_SWFMovie.DefineObject(&shape2, shape2.m_ID, true);<br />
<br />
m_SWFMovie.ShowFrame();<br />
<br />
m_SWFMovie.CloseSWFFile();<br />
|
|
|
|
|
I also have this problem.
It maybe can't DefineObject for shape twice.
|
|
|
|
|