Just upgraded to 2.05. My swfmill assets no longer work, what to do?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Armén
Hi all,

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.

The SWFML contains the following:

    <clip id="myapp.gui.assets.DropDownArrow" import="graphics/drop-down-arrow.svg" />

swfmill builds the swf and this swf is "linked" to the haXe target using following haXe switches:

    -swf-lib assets.swf

Everything builds fine, but I get a runtime error related to the following expression:

     var dd_btn = flash.Lib.attach("myapp.gui.assets.DropDownArrow");

The error is as follows:

    ReferenceError: Error #1065: Variable DropDownArrow is not defined.
        at global/flash.utils::getDefinitionByName()
        at flash::Lib$/attach()[/usr/local/lib/haxe/std/flash9/Lib.hx:72]

I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Zjnue Brzavi

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Armén
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Zjnue Brzavi
On Wed, Jun 16, 2010 at 8:10 PM, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

Hi, please excuse the wait. Anyway you like...
 
I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

Well, I had a quick look at haxegui again some time ago and noticed problems with the assets. They are compiled into a SWF with the swfmill simple flag set. The code in the first post of the thread link provided works with @:bind. I did not have time to try Nicolas' advice, which is to compile the assets.swf for AVM2 (in order to make flash.Lib.attach work for flash9+).
 
I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

It would appear class generation for the assets is necessary and I'm not sure whether swfmill can do that. I know SamHaxe can, so there is at least one way to achieve that. Someone just answered the other related thread and had success using swfmill for flash9+, so best look there.

SVG support is relatively new to swfmill, so it is a good idea to use the latest build.

Good luck,
Zjnue
 

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Armén
In reply to this post by Armén
I have posted some reminders, and have solved the problem. Strangely swfmill was including a child sprite for my SVG asset, with a RANDOMLY generated property called id******* (asterisks denote random digits). I know because I disassembled my asset SWF. Naturally, since my asset class is a superclass, like assets usually are, it is sealed and so when instantiating it my runtime verification fails with an exception that says "Cannot create property id******* on DropDownArrow". Adding ", implements Dynamic" solves the problem because the property can then be added without errors, at runtime. The question is however why does swfmill generate a child for my asset when it is just a polygon with three vertices (its a downward pointing arrow for a dropdown control box).

I did not need "@:bind" part at all, when I removed it, everything continued working fine.

There is also no need to use Lib.attach, you can just use the constructor for the asset class. I think that is the way to go with AVM2 anyway - cleaner and more "compliant".

On Wed, Jun 16, 2010 at 21:10, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Armén
In reply to this post by Zjnue Brzavi
On Wed, Jun 16, 2010 at 23:23, Zjnue Brzavi <[hidden email]> wrote:
On Wed, Jun 16, 2010 at 8:10 PM, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

Hi, please excuse the wait. Anyway you like...
 
I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

Well, I had a quick look at haxegui again some time ago and noticed problems with the assets. They are compiled into a SWF with the swfmill simple flag set. The code in the first post of the thread link provided works with @:bind. I did not have time to try Nicolas' advice, which is to compile the assets.swf for AVM2 (in order to make flash.Lib.attach work for flash9+).

What do you mean by 'simple' flag? Do you mean the simple XSLT transform? Also, in your linked post, of course attaching will not work, but the problem has nothing to do with Lib.attach I think, you simply either have to define a class in haXe or have it defined in the linked SWF. swfmill does not do that, so in case the asset SWF was made with swfmill, you will have to write class definition in haXe. No worries thought because haXe is smart enough to "fuse" them together - and this is the part I DONT understand. I mean I am not sure how it does fuse a statically linked symbol with a class written as part of host application SWF.
 
 
I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

It would appear class generation for the assets is necessary and I'm not sure whether swfmill can do that. I know SamHaxe can, so there is at least one way to achieve that. Someone just answered the other related thread and had success using swfmill for flash9+, so best look there.


YES, they are necessary with DYNAMIC linking, because then haXe does not help you, you are on your own - if the asset SWF does not contain the classes, when you load it at runtime using Loader, it has no way of accessing these assets - there are no definitions, only named symbols embedded in it. One needs the class traits. With static linking (-swf-lib) you and haXe work together to produce the needed class definitions, even if they are absent from the SWF being linked.
 
SVG support is relatively new to swfmill, so it is a good idea to use the latest build.


Yes, but this problem is not in swfmill. Like I said, I have been using this same swfmill build with haXe 2.04 earlier for months without issues.
 
See my other comments, maybe there is sense in all this :-)

Good luck,
Zjnue
 

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Zjnue Brzavi
Hi Armencho,

Thanks for the clarifications.

> What do you mean by 'simple' flag?

swfmill simple library.xml assets.swf

Regarding static linking, ie '-swf-lib library.swf', it appears we need:

- class definitions in library.swf for the assets, if we want to use flash.Lib.attach

- class definitions in our haXe code for the assets, if we do not use flash.Lib.attach

For the latter, it does not seem right that class and asset fusion should happen automagically. Do you agree?

Can't look into this further at the moment, but appreciate your effort in doing so and sharing your findings.

Zjnue

On Wed, Jun 16, 2010 at 10:33 PM, [hidden email] <[hidden email]> wrote:
On Wed, Jun 16, 2010 at 23:23, Zjnue Brzavi <[hidden email]> wrote:
On Wed, Jun 16, 2010 at 8:10 PM, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

Hi, please excuse the wait. Anyway you like...
 
I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

Well, I had a quick look at haxegui again some time ago and noticed problems with the assets. They are compiled into a SWF with the swfmill simple flag set. The code in the first post of the thread link provided works with @:bind. I did not have time to try Nicolas' advice, which is to compile the assets.swf for AVM2 (in order to make flash.Lib.attach work for flash9+).

What do you mean by 'simple' flag? Do you mean the simple XSLT transform? Also, in your linked post, of course attaching will not work, but the problem has nothing to do with Lib.attach I think, you simply either have to define a class in haXe or have it defined in the linked SWF. swfmill does not do that, so in case the asset SWF was made with swfmill, you will have to write class definition in haXe. No worries thought because haXe is smart enough to "fuse" them together - and this is the part I DONT understand. I mean I am not sure how it does fuse a statically linked symbol with a class written as part of host application SWF.
 
 
I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

It would appear class generation for the assets is necessary and I'm not sure whether swfmill can do that. I know SamHaxe can, so there is at least one way to achieve that. Someone just answered the other related thread and had success using swfmill for flash9+, so best look there.


YES, they are necessary with DYNAMIC linking, because then haXe does not help you, you are on your own - if the asset SWF does not contain the classes, when you load it at runtime using Loader, it has no way of accessing these assets - there are no definitions, only named symbols embedded in it. One needs the class traits. With static linking (-swf-lib) you and haXe work together to produce the needed class definitions, even if they are absent from the SWF being linked.
 
SVG support is relatively new to swfmill, so it is a good idea to use the latest build.


Yes, but this problem is not in swfmill. Like I said, I have been using this same swfmill build with haXe 2.04 earlier for months without issues.
 
See my other comments, maybe there is sense in all this :-)

Good luck,
Zjnue
 

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

MentoxT
In reply to this post by Armén
Thanks for sharing the solution.  I'm having a similar problem.  Where do I need to add ", implements Dynamic" exactly?




-----Original Message-----
From: [hidden email] <[hidden email]>
To: The haXe compiler list <[hidden email]>
Sent: Wed, Jun 16, 2010 2:26 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

I have posted some reminders, and have solved the problem. Strangely swfmill was including a child sprite for my SVG asset, with a RANDOMLY generated property called id******* (asterisks denote random digits). I know because I disassembled my asset SWF. Naturally, since my asset class is a superclass, like assets usually are, it is sealed and so when instantiating it my runtime verification fails with an exception that says "Cannot create property id******* on DropDownArrow". Adding ", implements Dynamic" solves the problem because the property can then be added without errors, at runtime. The question is however why does swfmill generate a child for my asset when it is just a polygon with three vertices (its a downward pointing arrow for a dropdown control box).

I did not need "@:bind" part at all, when I removed it, everything continued working fine.

There is also no need to use Lib.attach, you can just use the constructor for the asset class. I think that is the way to go with AVM2 anyway - cleaner and more "compliant".

On Wed, Jun 16, 2010 at 21:10, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org


-- 
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

MentoxT

Nevermind, after reading your other post I think I get it.  I'll try it out now.


-----Original Message-----
From: [hidden email]
To: [hidden email]
Sent: Wed, Jun 16, 2010 3:51 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Thanks for sharing the solution.  I'm having a similar problem.  Where do I need to add ", implements Dynamic" exactly?




-----Original Message-----
From: [hidden email] <[hidden email]>
To: The haXe compiler list <[hidden email]>
Sent: Wed, Jun 16, 2010 2:26 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

I have posted some reminders, and have solved the problem. Strangely swfmill was including a child sprite for my SVG asset, with a RANDOMLY generated property called id******* (asterisks denote random digits). I know because I disassembled my asset SWF. Naturally, since my asset class is a superclass, like assets usually are, it is sealed and so when instantiating it my runtime verification fails with an exception that says "Cannot create property id******* on DropDownArrow". Adding ", implements Dynamic" solves the problem because the property can then be added without errors, at runtime. The question is however why does swfmill generate a child for my asset when it is just a polygon with three vertices (its a downward pointing arrow for a dropdown control box).

I did not need "@:bind" part at all, when I removed it, everything continued working fine.

There is also no need to use Lib.attach, you can just use the constructor for the asset class. I think that is the way to go with AVM2 anyway - cleaner and more "compliant".

On Wed, Jun 16, 2010 at 21:10, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org


-- 


haXe - an open source web programming language


http://haxe.org


-- 
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

gershon
Hey Zjnue and all, just a quick note about armencho's "problem" with inkscape svg in swfmill...

the xml2swf transforms each group into a separate sprite, linked with its inkscape id (editable in inkscape's xml property editor, uniquely generated by default), so its basically possible to a assemble an entire library with just 1 swfmill <clip import="file.svg"/>...
Now, if i recall correctly, same is true for inkscape layers (also <svg:g> tags), so even the simplest inkscape svg polygon would be nested at least once inside a layer...  so one should group it, and give it a proper id before running swfmill.

Not sure about class generation and AVM2, but found this, http://haxe.org/com/swfmill, which looks fairly new, as is the as3="1" attribute used there...
Is this 2.05 compatible?



On Thu, Jun 17, 2010 at 2:05 AM, <[hidden email]> wrote:

Nevermind, after reading your other post I think I get it.  I'll try it out now.


-----Original Message-----
From: [hidden email]
To: [hidden email]
Sent: Wed, Jun 16, 2010 3:51 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Thanks for sharing the solution.  I'm having a similar problem.  Where do I need to add ", implements Dynamic" exactly?




-----Original Message-----
From: [hidden email] <[hidden email]>
To: The haXe compiler list <[hidden email]>
Sent: Wed, Jun 16, 2010 2:26 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

I have posted some reminders, and have solved the problem. Strangely swfmill was including a child sprite for my SVG asset, with a RANDOMLY generated property called id******* (asterisks denote random digits). I know because I disassembled my asset SWF. Naturally, since my asset class is a superclass, like assets usually are, it is sealed and so when instantiating it my runtime verification fails with an exception that says "Cannot create property id******* on DropDownArrow". Adding ", implements Dynamic" solves the problem because the property can then be added without errors, at runtime. The question is however why does swfmill generate a child for my asset when it is just a polygon with three vertices (its a downward pointing arrow for a dropdown control box).

I did not need "@:bind" part at all, when I removed it, everything continued working fine.

There is also no need to use Lib.attach, you can just use the constructor for the asset class. I think that is the way to go with AVM2 anyway - cleaner and more "compliant".

On Wed, Jun 16, 2010 at 21:10, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org


-- 


haXe - an open source web programming language


http://haxe.org


-- 

haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Armén
Hmm, I am writing my SVGs by hand :-)
The one in question, anyway. But good hint on Inkspace, thanks!

On Thu, Jun 17, 2010 at 06:48, gershon <[hidden email]> wrote:
Hey Zjnue and all, just a quick note about armencho's "problem" with inkscape svg in swfmill...

the xml2swf transforms each group into a separate sprite, linked with its inkscape id (editable in inkscape's xml property editor, uniquely generated by default), so its basically possible to a assemble an entire library with just 1 swfmill <clip import="file.svg"/>...
Now, if i recall correctly, same is true for inkscape layers (also <svg:g> tags), so even the simplest inkscape svg polygon would be nested at least once inside a layer...  so one should group it, and give it a proper id before running swfmill.

Not sure about class generation and AVM2, but found this, http://haxe.org/com/swfmill, which looks fairly new, as is the as3="1" attribute used there...
Is this 2.05 compatible?



On Thu, Jun 17, 2010 at 2:05 AM, <[hidden email]> wrote:

Nevermind, after reading your other post I think I get it.  I'll try it out now.


-----Original Message-----
From: [hidden email]
To: [hidden email]
Sent: Wed, Jun 16, 2010 3:51 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

Thanks for sharing the solution.  I'm having a similar problem.  Where do I need to add ", implements Dynamic" exactly?




-----Original Message-----
From: [hidden email] <[hidden email]>
To: The haXe compiler list <[hidden email]>
Sent: Wed, Jun 16, 2010 2:26 pm
Subject: Re: [haXe] Just upgraded to 2.05. My swfmill assets no longer work, what to do?

I have posted some reminders, and have solved the problem. Strangely swfmill was including a child sprite for my SVG asset, with a RANDOMLY generated property called id******* (asterisks denote random digits). I know because I disassembled my asset SWF. Naturally, since my asset class is a superclass, like assets usually are, it is sealed and so when instantiating it my runtime verification fails with an exception that says "Cannot create property id******* on DropDownArrow". Adding ", implements Dynamic" solves the problem because the property can then be added without errors, at runtime. The question is however why does swfmill generate a child for my asset when it is just a polygon with three vertices (its a downward pointing arrow for a dropdown control box).

I did not need "@:bind" part at all, when I removed it, everything continued working fine.

There is also no need to use Lib.attach, you can just use the constructor for the asset class. I think that is the way to go with AVM2 anyway - cleaner and more "compliant".

On Wed, Jun 16, 2010 at 21:10, [hidden email] <[hidden email]> wrote:
Zjnue, (how do I pronounce your name btw? :-)

I did a fair deal of searching both the net and this mailing list before giving up and writing the original post. Including reading your original post. I understand that the linker has changed, after reading Nicolas' announcement with explanations. I did not make much sense of it though, because I am not exactly an expert in intricate SWF container details. I know some things...

Thing is, I tried some of the things you tried, but I still get either weird errors like this:

    Cannot create property id2824728 on myapp.gui.assets.DropDownArrow.

I also get an SWF verification error with a long stack dump :|

All I need is to embed a piece of vector from another SWF into my application SWF.

I am pretty sure there is a way, but there is no documentation! except bits and pieces on this mailing list. "@:bind" does not work.

I use swfmill to compile the assets into an "asset" SWF, I am pretty sure swfmill does not generate any classes, in fact I have converted the asset back into XML (full SWFML dialect) and don't see anything that indicates a class is embedded beside the SVG that I am importing as MovieClip (I assume its MovieClip because that's what it was before).

On Wed, Jun 16, 2010 at 20:35, Zjnue Brzavi <[hidden email]> wrote:

So I have decided to upgrade to 2.05, after tracking some old 2.04 issues, I thought an upgrade is due. 2.05 is set up and running without issues (none that I can see anyways).

Trying to build my Flash Player application, however, now results in `flash.Lib.attach` not finding my assets by name, despite no changes in the code whatsoever, including swfmill XML files and my makefile.
...
 
I know this may be some old way of doing things, but it has worked for me, and now I am kind of lost, because I suspect 2.05 introduced some major changes, and I know there is a new linker in place. What would be an optimal way for me to bring my code up to modern haxe-swfmill standards?


Hi Armencho,

The way the haXe SWF Linker works has changed since 2.05.
If you compile your asset SWFs for AVM2, flash.Lib.attach should still work.
Have a read here: http://lists.motion-twin.com/pipermail/haxe/2010-May/036004.html

Hope that helps,

Zjnue




--
haXe - an open source web programming language
http://haxe.org


-- 


haXe - an open source web programming language


http://haxe.org


-- 

haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org