How to correctly deploy a FLEX\FLASH swf application? - actionscript-3

I am absolutly new in Flex and Flash and I have the following problem.
I have to work on a Flex 4 project made by someone else in the past using the Eclipse plugin and building it using an ANT script (but I think that this is not so important).
After that I run my ANT script it build my project into this target folder:
So, as you can see in the previous image, the building project have created the target content corresponding to the Main.swf file (that I think is the Flex\Flash application), the asset directory (that contains some resources used by the application: fonts, incos, images and CSS) and the flexmonster directory that should contains something related to a library that generates table.
My problem is: now how can I deploy this application?
I saw this video tutorial: https://www.youtube.com/watch?v=z0YTZm1v7qQ&t=326s
but in this tutorial show that the project generates also an html that is linked to the swf file (but doesn't show the HTML content, in the tutorial seems to be autogenerated).
How can I try to execute my application? (into the browser)
Are there some difference in the deploy of a Flex and Flash application or are the same thing?

You should:
embed the swf, see: How to embed a SWF file in an HTML page?
transfer the files inside the target folder (including the embedded html for example) onto your server.
But you should ask in your company how they embed the swf, may it is delivered from the JAVA-application and not in plain HTML.

To correctly deploy a Flash or Flex web app you require to:
Create an HTML file which will embed your .swf file using SWFObject.
The SWFObject JS library.
Put those two files in your 'target' folder, then upload the 'target' folder to your web server.
Here's a quick tip for steps 1 and 2:
In Flash Builder you are going to see at the top a button with an icon that looks like a globe with an orange arrow, it is the Release Build button. Press it.
Flash Builder is going to generate a very similar folder to your 'target' folder. Copy and paste the .html and .js file into your 'target' folder.
Now you can upload your 'target' folder to your web server (via FTP or admin panel).

Just copy target folder files to your production web location.

Related

How to manage eqFTP in Brackets to download files from server to pc

I am new to Brackets and I cannot find a solution to my problem.
I have a website and it has a CMS with lots of templates and css in different folders.
I need to modify all of them, one by one, changing styles, adding content and markups and so on.
I just started using Brackets and just installed eqFTP in it following the guide and set everything.
Now how can I download, using eqFTP, all templates and css from the server to my folder project in my pc so I can modify them and upload them all from brackets?
For example: if my templates are in public_html/templates and css are in public_html/styles/ how can I tell to eqFTP to download them in folder project?
dev here.
You should create new connection and then connect to your server, you'll see file tree and you want to right click on folder/file you need to download and choose 'Download'. For files you can actually use doubleclick which will download and open that file.
Hope this helps.

How do I configure a Web Application project for working with html pages without .Net code?

We have a few html pages in one of our solutions that are meant to be extremely simple, client side only, pure html+javascript pages that access our web api. The api itself is in a web application project in the same solution.
We are now using a web site project to contain those files, but it is getting harder and harder to manage that project, since it's information is placed on the solution, and most of it's aspects cannot be controlled like they can on a msbuild project file.
I'd like to migrate those html files to a web application project, but I'm struggling to make it as basic as possible. For instance, I do not want to generate any dlls on the project. It should be in the solution just to provide access to the files and to enable us to control what goes to the _PublishedWebsites folder on the build by setting the build action on the files. We need this because there are some miscellaneous files in the project that should not be published.
I tried creating an empty web application and removing most things from it, by editing the csproj file. I managed to delete all references and the whole Properties special folder (along with the AssemblyInfo.cs file), but when I run the build command, I still see a dll created along with the obj and bin folders. Then, I tried faking the build target on the csproj file, like this:
<Target Name="Build" />
Now when the project is built, no dll/pdb is created, but the obj and bin folders are still there. Next, I tried setting the outputpath property to the current directory, like this:
<OutputPath>.</OutputPath>
But even then, the obj folder is still created.
EDIT:
I just found another common msbuild property that controls where the files inside the obj folder are placed. After placing this in my csproj file:
<IntermediateOutputPath>.</IntermediateOutputPath>
I now get no folders generated on build, which is nice.
There is a small problem now though (and I'm not sure how and where exactly this process happens) when I open the solution or reload the project in Visual Studio. Even though the project is not being built at this time, some files are still generated:
I feel the current approach is enough for my requirements, yet I'd really like to know if there is a more elegant way to achieve that. Thus, the question holds: Is there a way to make the web application project work as if there was no code file in it, effectively disabling output generation (bin and obj folders, and the dll/xml/pdb outputs)?

What is the best way to add a Dart hello world into my existing Node.js website?

I have been reading tutorials and guides concerning this but have not found a straight forward answer to this.
I currently have an existing website running on a node.js platform, locally on my computer.
Goal: Now I want to try and write a simple hello world in Dart, export it to plain JavaScript and see it work in my existing website.
Reading the documents, I read that I should create a new "Web Application" and to create some sample code up and running, I check the "Generate sample content" box.
And my project is now created in Dart Editor:
I can run the sample in Dartium, see it work, etc.
But the problem is that I have now a .html file in the Dart-project, while I have a real .html file for my existing node website in a totally different path. I don't want that. I want to try and use the existing .html instead, since.. thats my real website.
But when trying to create a new Dartium launcher, I can only refer to .html files within my Dart-project:
So my big question is; How do actually start using Dart with my existing developed website?
How do I create that bridge?
On the second image above in your original question, there is an option just below the HTML file, called URL - is this what you're looking for? You can set that to any arbitrary URL.
You'd also need to copy the helloworld.dart file into your node.js server path, and copy the bits inside the <body> tag into your existing HTML page. You'll also need to copy the packages\browser\dart.js file somewhere to your node.js server, too.
If you wanted to run the JS version, you'd also need to use the editor menu option to Generate JavaScript and copy the .js files into your node.js server path.
The script tag that refers to dart.js automatically detects if the browser supports Dart natively, and will either load the .dart version of your app, or the .dart.js version of your app (from the same folder location).
So what you're likely after is something like:
c:/nodejs_server_root
/existingIndex.html // containing the two script tags from helloworld.html
// and other tags referred to in helloworld.dart
/helloworld.dart
/dart.js
/helloworld.dart.js
And in the "URL" path in the launch configuration, you'd put something like http://localhost:<port>/existingIndex.html
https://pub.dartlang.org/packages/dev_compiler can compile Dart to Node.js modules with the --modules=node option.
See also https://github.com/dart-lang/dev_compiler/issues/291#issuecomment-176687849

Configure PrimeUI with web application

I'm new to prime-ui (PrimeUI is a spin-off project from the popular JSF Component Suite, PrimeFaces). I have downloaded prime-ui-0.8.bundle.zip file from http://www.primefaces.org/downloads.html . I want to configure it with my simple web application having html pages. I don't know which css and js files do I need to include so that it will start working.
Please help.
Thanks
You need to files two be located in your page. prime-ui-0.8.min.css and prime-ui-0.8.min.js. These two files are in production folder of the zip file you downloaded. You also need jquery.js and jquery-ui.js in addition to the themeroller theme.

When I zip up my demo FlashDevelop project..why does it break?

I built an AS3 image gallery using FlashDevelop.
Before I zip up the application, I can run the image gallery in my browser by simply opening the index.html for the project. Everything works perfectly.
I then zip up the project as proj-0.1.2.zip using winrar.
I then unzip this newly created zip and try to load the application using the project index.html like above. The gallery doesn't function properly. From seeing what happens, it appears as though the image metadata is not present(but I'm not sure, see below).
There are other applications as well that are broken. Videos don't load. If an application doesn't depend on any external assets then everything looks fine.
Another thing..If I then build the FlashDevelop project and republish the swf..then it works in the index.html like I want. What is going on here?
I want people to be able to fire up my demo apps out of the box by just running the index.html. If that doesn't always work and they have to figure out that they need to rebuild the SWF then that's pretty bad.
I don't think zipping is the problem, I think moving to a different folder is a problem.
I assume you are running this index.html on your local PC, and not on a webserver?
By default, Flash cannot access from a local SWF to load other local files. However, FlashDevelop / Flash CS3 / Flex Builder, in order to get around this restriction, set some flags in the flash player telling him "This SWF is a trusted SWF, allow him to open local files". But it's based on the exact location of the SWF.
There's a setting somewhere in the compiler, that sets a flag in the SWF saying "This SWF can access local data", but there's one downside: It blocks all access to network resources. So it's either/or: access local data, OR access network resources (anything that goes over HTTP, Socket, etc). I'm not sure where this setting is offhand. It may be that the default setting for Flash CS3 is different than the default setting for FlashDevelop.
Anyway, the easy way to avoid all this issue is to not run the file locally. Put it on your webserver before testing.