updater function with air framework - actionscript-3

this is for flash CS6 AS3 AIR
Seriously I've been searching for 3 days straight
found these among others.
http://gregsramblings.com/2008/08/16/adding-auto-update-features-to-your-air-application-in-3-easy-steps/
http://www.adobe.com/devnet/air/articles/air_update_framework.html
but they all output errors like Scene 1, Layer 'Layer 1', Frame 1, Line 2 1172: Definition air.update.events:UpdateEvent could not be found. not all have this specific error but they all have a definition error. Apart from that they are doing a lot of things in the tutorial that I simply don't need.
I already made a version detector and right now it's downloading the air file to the desktop but I need something more practical. is there something like updatenTo(http://address.com/myApp.air) - which just start the air updateframework to update from the .air file at the refered address.
or even a download command that tells me where the user downloaded the file to so I can execute the file and terminate the program. like file.addEventListener(Event.locationOfDownload,downloadFileContainFunction);
or link me to a tutorial that has working code.

Okay, so my problem here actually boiled down to finding "applicationupdater.swc" and how to import it.
It's found at "C:\Program Files (x86)\Adobe\Adobe Flash CS6\AIR3.2\frameworks\libs\air" on my machine
One can import it by going to "publish settings" and click the wrench key next to "script: ActionScript 3.0" and going to the library path clicking the little red f on white background.

That error is telling you that you haven't imported the class or embedded the library you are trying to use.

Related

adobe pro cc (AS3) not recognizing box2d classpath

I've tried to connect a box2d classpath I have to adobe pro cc via a source path in the actionscipt settings. I get a warning saying "A definition for the document class could not be found in the classpath, so one will be automatically generated in the SWF file upon export." When I do this the code still does not recognize the box2d commands. Any help is appreciated, thanks so much!
Edit: So I have now replaced the primary source folder thanks to Cadin's observation and the Box2d library commands are being recognized, however, I get several errors saying:
"Type was not found or was not a compile-time constant: b2World."
"Call to a possibly undefined method b2AABB."
and
"Definition Box2D.Collision:b2AABB could not be found."
I am extremely stuck and don't know what to do. I am fairly well versed with flashdevelop. But it has been a while since I've worked with flash pro. Thanks so much!
It sounds like the error is complaining about your Document Class, not Box2D.
When you added the source path to Box2D, did you add a new path, or replace the default one?
It's easy to accidentally replace the default path and get all kinds of class linking weirdness. Check the source path settings and make sure you still have a listing for "." That tells Flash to look in the current directory (where the FLA is) for source files. If your document class is in that directory, Flash won't find it without that source path.

Getting Type not found error implementing source in as3

I am trying to just compile and run the demos from this article:
Flash talks to max msp via osc
I am using Flash Develop and Flex SDK with an up to date version of air.
When I run the demo: "as3_MaxFlashHarmony" I get an error I don't know how to fix. The source for the entire project is here:
the project
But specifically the error I am getting says:
col: 30 Error: Type was not found or was not a compile-time constant: OSCMessage.
here is the as3 file that it is specifically referencing:
//IHarmonyApp.as
package
{
import org.tuio.osc.OSCMessage;
public interface IHarmonyApp
{
function updateOSCData(msg:OSCMessage):void;
}
}
It uses the libraries Tuio, MinimalComps, and MonsterDebugger. The thing I don't get is that how can it not find OSCMessage if OSCMessage is properly imported? the IDE is making fine references to it and I can open it's declaration. OSCMessage is a public class. I don't get it.
To give some extra info for potential answers, the IDE flashdevelop can find the library org.tuio.osc.OSCMessage just fine, it gives the error regardless of if org.tuio... is a source path or not, and the overall path does not contain any special characters. I don't know if that might matter, but I feel like this is me making a stupid mistake somewhere. I can provide my project zipped if need be.
Thanks!
Edit 9:48, 8/25/12
I do have the file path org/tuio/osc/OSCMessage.as in my project, and the file OSCMessage exists. FlashDevelop can find it just fine and I can navigate to declaration at that location. This is why I got stumped.
Thanks again
In your AS3 folder apart of your de folder you would need to have org folder with relevant folders and classes.
For example to import org.tuio.osc.OSCMessage you would need a file:
../YourPackageRoot/org/tuio/osc/OSCMessage.as
The other way is including a SWC file (all folders and classes zipped into one swc file).
You can include the swc file in FlashDevelop by right clicking the swc file and selecting Add To Library

Flash Builder 4 Issue

I'm having a strange issue with Flash Builder 4.
It shows all my objects in a Flash Professional FLA file as errors.
Let's say I have five buttons in my moview named: button1, button2, button3, button4, button5.
Flash Builder is flagging all of them with red error on the right side of the screen as button1 is undefined. But it is button in the FLA movie and FB4 cannot see it.
It's really annoying with a large project showing 100 errors.
This never happened before in using Flash Builder.
It still compiles and plays in Flash when I test movie, but I would like it to either see the buttons and accept them or ignore them altogether.
This is the problem with lib - playerglobal.swc
Try to remove it from library list then add it again. Path to the swc may look like this:
C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0\FP10.2
Did you choose "Flash Professional Project" when you created the Flash Builder project?
If so, check that the .fla is present and pointing to the correct path in Project -> Properties -> Flash Professional
and that it is set as default in Project -> Properties -> Actionscript Applications

Problems transferring Flash project from Mac to Windows

I have a .fla on my Mac that I created in Flash cs5. I saved it as a cs4 file and sent it to a friend who has a Windows machine.
I have a symbol linked to an AS class which has symbols inside of it which have instance names. The constructor of the class refers to these instance names. When I compile, everything works as expected. When my friend compiles, he gets compiler errors telling him that the instances mentioned above are undefined.
I'm at a complete loss. Any ideas why this is happening?
Things we've tried:
Checked to make sure that we had the same source path
Made sure that the symbol in the Flash IDE has the correct linkage
Tried compiling the .fla with cs4 on my machine. It works, which is what makes me think it's a Mac/Windows issue.
Try going to publish settings -> flash -> [settings button next to "as3] - the same place you go to set your classpath. There is a checkbox there that says declare stage instances - it sounds like its unchecked on the cs4 windows version... it should be checked if you don't want to have to write things like :
public var myClip:MovieClip;
for every instance that you've placed using the flash ide.

FLVPlayback skin modification problem in Adobe Flash CS5 with AS3

I have been working on modifying an existing FLVPlayback skin. Ideally I would like to have one that uses a counter.
The problem is, all the fla's provided for the skins with counters fail to publish/compile correctly. Fla's are here: C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\FLVPlayback Skins\FLA\ActionScript 3.0
I do end up with a swf, but it doesnt' work when applied to my FLVPlayback instance on the stage. (All skin fla's beggining with 'Minima' do not work, even the skins without the counters)
I get the following warning when publishing: Warning: unable to load SWC FLVPlaybackAS2.swc
If I go to 'File -> Publish Settings -> Flash -> Settings', FLVPlaybackAS2.swc is not in my Library Path. So, I added it... (C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Components\Video\FLVPlaybackAS2.swc) But I get the exact same warning.
It seems strange to me that it would throw a warning about FLVPlaybackAS2.swc... this is an AS3 fla provided by Adobe. I also tried adding FLVPlaybackAS2.swc, FLVPlaybackAS3.swc, FLVPlaybackAS3_2.5.swc etc, with no change.
Another developer here has tried also and come up with the same problem. We are both on PC's and have all Adobe updates.
Anyone have any ideas?!
Thanks,
James.
Guys... I found answer ! Just remove all from your source paths in the publish settings when you look to ActionScript 3.0 setting for your Skin FLA ! ( as default you can see here some path to video folder where is SWC files)
it's look like a bug but i did it and now my skin working.. now in this lines are empty field in my FLA..
if you want ask me and i will answer how it works.. good luck with this strange bug !