Why is StrobeMediaPlayer.swf 253k in the "for Flash Player X" folder but 433k when compiled or in player/bin folder? - actionscript-3

I have been trying to compile StrobeMediaPlayback from source; I've managed to compile the project using ANT with the Flex 4.5.1 or Flex 6 SDK and also successfully compiled using Flash Builder 4.5 (as recommended by the project).
In all cases, compiling the SMP project results in a 433k StrobeMediaPlayback.swf. Also, StrobeMediaPlayback.swf located in src/player/StrobeMediaPlayback/bin/StrobeMediaPlayback.swf ships as 433k. My question then, is how on earth do I compile StrobeMediaPlayback.swf to 253k as it exists in the for Flash Player 10.1 folder? It appears there is an external OSMF.swc file in this folder that is 233k - typically this gets bundled with the build... however, I can drop the 253k StrobeMediaPlayback.swf into a new project without the OSMF.swc file and it works fine.
So, if it turns out that I need to compile StrobeMediaPlayback without bundling the OSMF.swc, can someone point me in the right direction on how to do this?
Relevant installation documentation that was impossible to find: http://osmf.org/dev/osmf/specpdfs/building-osmf.pdf

So, if it turns out that I need to compile StrobeMediaPlayback without bundling the OSMF.swc, can someone point me in the right direction on how to do this?
Try,
in your StrobeMediaPlayback project, mark the osmf.swc as an external library.
(Project > Properties > Application Build Path > Library Path > OSMF > Link Type)

Related

Away3d SWC: some classes are missingg

I downloaded the built version of Away3D 4.1.6 and imported to my Flash Pro CS6. But there some classes are missing:
away3d.entities.Mesh
away3d.entities.Camera
away3d.entities.Sprite3D
maybe other classes, too. (I've not compared).
There are no errors when compiling this code:
var mesh:Mesh = new Mesh(new CubeGeometry());
but, I cannot view the available properties and functions, when I put a dot after the variable mesh.
After this I downloaded source files of away3d, but compiling takes about a minute. So, it gets boring to work. What should I do?
I found this bug too. I solved this problem by generating SWC of their own. Just download source files and create a lib project (FB).
PS. my SWC file is 20% less than default. I don't now why.

FDT - Create a Project with existing source files, assets, folders etc

I am using FDT 5 and would like to create a new project with already existing source files and assets. When I start up the Project Wizard (New->FDT Project) I browse to the folder I want to make as the project but I cannot proceed as FDT gives me the error:
*"PROJECT_NAME overlaps the location of another project: PROJECT_NAME"*
I have downloaded a flash project (developed in FDT) and would just simply like to make it a project in my FDT environment.
I mean this shouldn't be so complicated right? I don't want to create an entirely new project (its own folder) I want to use the same folder I downloaded and view that project. I am using git so I have to work in the same path, sort of speak.
Any ideas?
EDIT:
Apparently this is an issue with FDT, a small bug. I managed to solve the problem following this:
FDT / Eclipse Error : ‘overlaps the location of another project’
And on the eclipse forum:
Eclipse Forum

VerifyError: Error #1014: class could not be found

I'm developing AS3 project using Flash Builder 4.5 (also with library Away3D 4.0 and Flex 4.5.1 SDK).
Also, I add my own SWC library, which I compile previously into my project.
It works find if I import class in my SWC library, however I want my swf run in a stand-alone flash player 11.
I follow this tutorial:
http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
Now, I could run my app in a flash player 11, but I got an error in run time:
VerifyError: Error #1014: XXX class could not be found
And XXX is my class in SWC library. How should I fix this?
Merged into code means this, in project properties -> Flex Build Path -> Library Path -> Framework Linkage. Framework lingage has two options Merged into code and RSL. Chose Merged into code. This should solve your problem.
We had this problem when trying to build a project using a Native Extension.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
In my case, we had a nested reference to the same library which needed to load before the other library also using it. This fix can be accomplished by unchecking the 'Automatically determine library ordering based on dependencies' and moving the library up in the chain of Build path libraries. Flash Builder was unable to determine the correct order base on dependencies because we had 2 different versions of the same library. The error would only happen during run time.
I had this problem after installing AIR 3.9 and trying to upgrade a project.
It was also saying there was an RSL error, before throwing a succession of #1014 errors.
It worked after I set the textLayout.swc link type in Advanced ActionScript Settings to 'merged into code' instead of the default (RSL)
Hope this helps!
Since I landed on this page searching for this error message and none of the above solutions worked for me, here's how I finally managed to work around it:
It seems that this error happens particularly when you include old libraries that were compiled with the old compiler but compile your app with the new one. Unfortunately the error sometimes fires and when you compile again it doesn't; at other times it works fine in the debug version but then it fails in the release.
What worked for me is to include dummy objects in your main app which are instances of the class that the verify error complains about:
import some.classpath.to.TheClassThatFailsOnVerify;
function YourMainApp(){
var dummy:TheClassThatFailsOnVerify = new TheClassThatFailsOnVerify ();
}
At least in my case the errors only fired for classes that were not used directly in the app but only internally in the swc library code, so by having the dummy objects in the main app I force Flash Builder to include those classes in the compilation.
In some cases you might have to first find the swc that contains the class in question since it's not part of the library swc you use but it's again a library that that swc uses itself.

Exported SWC doesn't preserve auto-complete functions' parameters' names

I am using Flash CS5 and I have created a large, rarely changing framework that I don't want to be recompiled every time I use it in my projects.
I must be doing something wrong because the "auto-complete" functionality doesn't show the names of the parameters of the functions.
For example, I have a function:
public class Hey {
public function show(name:String, num:Number, data:Array):void {...}
}
I export the SWC file and when I import it into another project, then the auto-complete for this function shows :
show(arg0:String, arg1:Number, arg2:Array):void
So, instead of "name", "num" and "data" I get "arg0", "arg1" and "arg2".
I have downloaded other SWC files and the auto-complete gets the names correctly.
Am I doing something wrong at export-time?
I have never been able to get an SWC generated with the Flash Pro IDE to supply the correct parameter names in code hints. For some reason, the Flash IDE either does not use the same compiler or does not use the same compiler options as the Flex SDK toolkit.
You can generate code-hinting-compatable SWCs with Flash Builder by creating a Flex Library project. The "Flex" part of "Flex Library" is a little misleading. You can build AS3-only SWC files with this project type.
Or if you don't feel like shelling out the money for Flash Builder, you can always download the free Flex SDK and use the compc compiler to generate the SWC for you. It's the same tool set that Flash Builder uses to generate SWCs, so you will get the same code-hinting ability. The syntax is pretty straight-forward if you're used to command line tools:
compc -source-path . -include-classes MyCustomClass -output=MyLibrary.swc
Hopefully someone can post a better answer and prove me wrong, but I've never seen a Flash-generated SWC include the parameters in code-hinting.
I suppose you compile with debug=false but should be debug=true to keep all necessary data in swc including arguments names.
Optimizing libraries means to remove debugging and other code from the library prior to deployment. For normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want to debug against the library during development, so you will need the debug code inside the library. And, when you compile the release version of your application, the compiler will exclude debug information as it links the classes from the library.
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ad5.html
For me the easiest way was to import the code to a Flash Develop project, and install a plugin to export swc's: http://sourceforge.net/projects/exportswc/
After installing Flash Develop go to Tools » Install Software and install the AIR SDK + ASC 2.0 (Action Script Compiler 2.0).
Furter information here: http://www.flashdevelop.org/community/viewtopic.php?t=2987

The definition of base class ByteArrayAsset was not found

I'm using FlashDevelop4.0.0 RC1 to create AS3 library project, in which I want to import Away3D library. I follow this tutorial to set up my FD.
http://www.mclelun.com/blog/2011/08/flashdevelop-stage3d-away3d/
However, FD generate error message when I use ExportSWC4.2 plugin to compile the project, I got error message said that
at away3d\materials\methods\TerrainDiffuseMethod_NormalizeKernel.as(10): The definition of base class ByteArrayAsset was not found
Can anyone help me with that? Thanks!
p.s.
I also have issue like the following link
http://sourceforge.net/tracker/index.php?func=detail&aid=3401191&group_id=252536&atid=1127375
not sure if it's related to my problem.
Are you downloading the zip package from http://away3d.com/download/ or accessing via SVN / GIT?
http://away3d.com/images/uploads/releases/away3d_4_0_110915.zip
Not sure about their GIT, but I found the SVN repo dated.
I did not see ByteArrayAsset anywhere in the inheritance chain within my version:
away3d.materials.methods.TerrainDiffuseMethod
away3d.materials.methods.BasicDiffuseMethod
away3d.materials.methods.LightingMethodBase
away3d.materials.methods.ShadingMethodBase
mx.core.ByteArrayAsset is an Adobe class.
There's a NormalizeSplats Pixel Bender linkage, but I did not see any Normalize Kernel.
I'd recommend grabbing the Broomstick ZIP package - I had no issues building the SWC with Flash Builder targeting Flash Player 11.