write new id3v2-tags in mp3-headers (actionscript-3) - actionscript-3

Hello is it possible to write new id3v2 tags to a mp3-file through actionscript?
Normally you can read/write tags like artist,album,genre...
But I would like to add for example the tag "atmosphere = smooth".
Thanks

Unfortunately, there is no working library to write/edit ID3 tags in ActionScript, or at least I wouldn't know of one.
But you can access and edit the file as ByteArray. Check the ID3v2.3 specification to find out which bytes to read and write.
There is a c/c++ project called id3lib on sourceforge. Should you consider porting this to ActionScript using Alchemy, I would be very much interested in the resulting product ;)

Related

How to create visual studio extension for .cshtml files?

I am trying to create a visual studio 2017 extension. More specifically, I want to extend IntelliSense to create light bulb suggestions and fixes. For that, I am trying to go through the syntax of .cshtml file (both markup and c# code), and parse it so that I can get stuff like values of the attributes and tag names, so that I know when to show the light bulbs.
I went through the documentation on MSDN site. I found out how I could get the light bulbs to show up at specific caret location using ITextBuffer and Snapshot for [ContentType = "text"]. But for my problem, I want the light bulb to show up based on values of attributes and like. So, I think I will have to work with [ContentType = 'code']. I couldn't find proper documentation for that. I found this article
https://designprincipia.com/writing-a-visual-studio-extension-to-automate-code-generation-with-roslyn/
It tells how you can show a light bulb when your caret is on a method name and make a class file with that method name. Now, this is for a C# file and uses the Roslyn APIs to get the syntax tree and sementic model of the C# code.
Problem Comes down to this
I have a .cshtml file and I want to get the syntax tree of the markup and C# code in it. And, I think I should be able to get it because the editor higlights the markup and C# code of the file differently. Thus, it must be parsing it. But I am not able to do this.
So, for my approach I am trying to get the syntax tree. I want to know how this can be done. Please, tell me if this the wrong direction and what else I can do.
PS: This is my first question so please tell me if I have left any information and also I am new to Razor so maybe I am missing something there.
Thanks a lot for your time.
This might be useful:
using System.Web.Razor;
using System.Web.Razor.Parser.SyntaxTree;
var host = new RazorEngineHost(new CSharpRazorCodeLanguage());
var engine = new RazorTemplateEngine(host);
var result = engine.ParseTemplate(new StringReader(<STRING>)));
result.Document.Children provides detailed recursive tree structure.

Class file editor : Source not found error for ILock, ClassPathSuite classes

I am getting Class file editor : Source not found error for the classes in junit / hazelcast packages. Previously i got this error for all built in java classes. But after adding the Source zip file, i am able to see String.class and all. What i need to do for these classes. Please find the screenshot
Thanks in Advance!
Interestingly enough, your question contains all the concepts you need to know in order to answer it.
In order for your IDE to show you source code for any library you are using, the corresponding library needs to come with source code attached to it.
In other words: you managed to point your IDE to the ZIP file containing the source code for your JRE/JDK - thus your IDE knows what to show you when want to open up String.class
Now it seems that you are using other libraries as well. Maybe maybe, other libraries, have other, different source code ZIP files?!
Long story short: you need to add "source code" ZIPs for each and any additional library you are using and that you want to "peek into".
Within eclipse, you achieve that for example as described in that SO q/a. Side note: that is also something to keep in mind: you should do prior research before coming up with "new" questions. Especially when you are a beginner, you can be very sure that "your" question was asked here before.

Java CS6 How to convert ai to fla + html + swf using a script

I would like some assistance with batch image processing - I need to save an vector ai image to fla+html+swf file formats using a script - What I have done is to open the software and open a folder with these image's in. Please advise how i can write a script to assist with this process as I have alot of images I have to save.
I need to save it in actionscript 3 and actionscript 2, so if there is a script that convert it from actionscript 3 to actionscipt 2 that can be usefull aswell.
Please help :)
If I understand you correctly, you want to be able to put an image found inside an .AI-file (Adobe Illustrator) and automatically place that image into two newly created .FLA-files (one with AS3 set as default programming language and one set with AS2 as the default programming language)?
There is no quick and easy solution for this, it would require a combination of a "main app (python, c#, java or similar)" combined with "JSFL" to do what you want. And in the end that app would probably become very complex.
If you can skip the requirement of each ai-file becoming a unique fla-file you can just import all the images into a newly created FLA-file. But if that's not an option, then you're most definitely out of luck :\

Uploading a file using TCL

I'm a newbie working on OpenACS architecture and need to upload a .xml file through TCL. I went through the documentation and tried to work around with the code mentioned here: http://wiki.tcl.tk/13675
However, I'm unable to understand the code and the copy-paste won't work. Could someone please suggest a easier working way to upload a file in TCL? A working code would be of great help.
I need to upload a file through a HTTP form(with input type file parameter) and I'm asking for server-side code.
OpenACS already has file uploading built in (assuming you're using the OpenACS form builder aka ad_form, template::form - it has many names!). The specific widget you need to use is template::widget::file
A worked example is in the General Comments package (see file-ae.adp, file-add.tcl and file-add-2.tcl):
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-ae.adp?r=1.6
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-add.tcl?r=1.4
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-add-2.tcl?r=1.6
Specifically, look out for the 2 ad_page_contract parameters, and follow those variables down through the code:
upload_file:notnull
upload_file.tmpfile:tmpfile
Re-inventing network protocols is not so much worth in most cases, so I'd like to recommend using proven community libs. From my personal experience, I'm pretty glad to deal with libcurl (see http://curl.haxx.se/libcurl/tcl)

how to I make my flash AS3 game save progress

I have this flash game that I've been working on that works out of the browser, and I'm looking to get it to save it's progress.
I've seen multiple flash games that have accomplished this, and It appears as though they've done this client-side, and I'd like to do the same.
My game consists of 1 mxml file and a number of .as files and I compile it from the command line using flex sdk.
What do I have to do to be able to save save my game's data?
As others have mentioned, SharedObject is the tool you'll use for this.
The basics of this are to initialize a reference to a SharedObject using its static method .getLocal() first:
var mySaveData:SharedObject = SharedObject.getLocal("SomeSaveName");
The String given to this method should not contain spaces.
Once you've done this, you'll be able to use mySaveData.data, which is basically a simple object that you can attach properties to on the fly (it's dynamic):
mySaveData.data.levelsComplete = 2;
Once you've done this, you'll be able to reference that value later on using the same process:
trace( mySaveData.data.levelsComplete );
For simple stuff you can use SharedObject
One way is to use flash's SharedObject to save values in to a 'flash cookie' on the client. Example can be found here: Actionscript 3 saving currentframe location to local hard drive?