Flash Builder: Define relative source link for linked lib - actionscript-3

How do you define a relative link to the source of a linked library in Flash Builder (4).
I have a swc folder defined for a project. I want to link one of the contained swcs to it's associated source.
This works fine except that the path stored in the .actionScriptProperties file is absolute.
Here you can see the linked lib:
<libraryPathEntry kind="3" linkType="1" path="lib/myLib.swc" useDefaultLinkType="false"/>
And here you can see the linked source:
<sourceAttachmentPathEntry kind="3" linkType="1" path="/full/path/to/project/folder/lib/myLib.swc" sourcepath="lib-src/myLib" useDefaultLinkType="false"/>
The source linkage works fine using the full path setup.
But if I change the path attribute to either:
/lib/myLib
lib/myLib
/../lib/myLib
Then the source cannot be found.

Linking swc using the "swc folder" method is the problem.
Relative source links to swcs are possible only if each swc is linked to the project individually. Then a relative path is used (in .actionScriptProperties) when you associate a source folder with a swc.

Related

Require a CSS file in an HTML file without using webpack

I am working on an Electron project and using Electron-packager to package my app.
However, with my current folder structure, all CSS files located in the parent folder of my Electron project/package.json are not being copied to the packaged application.
This is my structure:
- GUI
--- CSS
- Apps
---Demo
------package.json, etc
---Demo2
------package.json, etc
---Demo3
------package.json, etc
I build apps while inside Demox folder. Problem is I can't move GUI folder to inside Demo/Demo2/Demo3 since it will contain just the same files and it would be redundant.
However, electron-packager does not support packaging of files from outside the actual Demox folder.
It was suggested that I move these CSS files to node_modules instead.
But how do I require these CSS files from the node_modules folder to an html file? Is there any other way WITHOUT using webpack? I'm hoping to keep this simple and stay away from setting webpack up unless I have no other choice.
For reference, here is the question I posted on the Electron-packager github:
https://github.com/electron/electron-packager/issues/1089
Thanks!
Was able to come up with a solution now.
Since I have moved node_modules folder to the very root (C:\node_modules, so it can be used by all node projects residing in C: drive), I just used an absolute path and link from there:
<link rel="stylesheet" href="/node_modules/sample-css/button.css">
Works well for my needs.
Thanks everyone.

How can anchors <a href=""> be created without the protocol and domain?

What is the correct way to do this and have what is generated / used by the browser be relative paths?
I need to do this in order to generate PDF's with links that will open files in a folder directory on a user's hard drive. The links must use relative paths, since the files will be downloaded in a directory structure that will be moved around on the hard drive. To further clarify the use case, the PDF(s) and the files will be downloaded in zip archives together, so the initial relative location will always be known.
I understand there are things in place in browsers to prevent this working from within a browser window, but in this case it will only be used in anchors in PDF files generated from HTML.
One of the problems with using something like this is that the protocol and domain is appended to the front of the path in the anchor. The relative path that's needed is to navigate within a folder directory in Windows Expolorer.
file.txt
The PDF's are converted from HTML using SelectPdf, and this is an Asp.Net MVC web app.
I have tried variations of this, which windows explorer is not able to use:
file.txt

Missing skins in the output file?

Description Resource Path Location Type The swc
'E:\DEV\Flash\Flex\SDK\4.14.1\frameworks\libs\advancedgrids.swc' has
style defaults and is in the library-path, which means dependencies
will be linked in without the styles. This can cause applications,
which use the output swc, to have missing skins. The swc should be
put in the external-library-path.
SharedSledi Unknown Flex Problem
The swc 'E:\DEV\Flash\Flex\SDK\4.14.1\frameworks\libs\charts.swc' has
style defaults and is in the library-path, which means dependencies
will be linked in without the styles. This can cause applications,
which use the output swc, to have missing skins. The swc should be
put in the external-library-path.
SharedSledi Unknown Flex Problem
The swc 'E:\DEV\Flash\Flex\SDK\4.14.1\frameworks\libs\framework.swc'
has style defaults and is in the library-path, which means
dependencies will be linked in without the styles. This can cause
applications, which use the output swc, to have missing skins. The
swc should be put in the
external-library-path.
SharedSledi Unknown Flex Problem The swc
'E:\DEV\Flash\Flex\SDK\4.14.1\frameworks\libs\mx\mx.swc' has style
defaults and is in the library-path, which means dependencies will be
linked in without the styles. This can cause applications, which use
the output swc, to have missing skins. The swc should be put in the
external-library-path.
SharedSledi Unknown Flex Problem The swc
'E:\DEV\Flash\Flex\SDK\4.14.1\frameworks\libs\spark.swc' has style
defaults and is in the library-path, which means dependencies will be
linked in without the styles. This can cause applications, which use
the output swc, to have missing skins. The swc should be put in the
external-library-path. SharedSledi Unknown Flex Problem
How to resolve this issue with the missing default skins ?
As the error message suggests : "The swc should be put in the external-library-path"
Check this official guide : Use Flex library projects, specifically read this section link. To quote :
1) Add a SWC file to the library path
Add a SWC file to the library path
With a project selected in the Package Explorer, select Project > Properties > Flex Build Path.
Click the Library Path tab.
Select any of these options to add SWC files:
Add Project Adds a Flex library project.
Add SWC Folder Lets you add a folder that contains SWC files.
Add SWC Adds a compiled SWC file.
Add Flex SDK Lets you add other Flex SDKs. If your project already has a Flex SDK in its library path, this button is disabled.
If you remove the existing Flex SDK from your library path, the button
is enabled. When you click this button, a Flex SDK node is added, but
you are not prompted which one is added. To control which Flex SDK to
use, select Project > Properties > Flex Compiler.
Enter or browse to and select the location of the SWC file, project, or folder. Click OK. The SWC file, library project, or folder
is added to the library path.
2) Set SWC as External Library...
Set the SWC file as an external library file
With a project selected in the Package Explorer, select Project > Properties > Flex Build Path.
Select the Library Path tab, and then select and expand the SWC file entry to display the SWC options.
Double-click the Link Type option. The Library Path Items Options dialog box appears
Select the External option, and click OK.
This procedure is the equivalent of using the external-library-path
compiler option.
PS: This Answer might have some clue for you, if you're willing to edit Flash Builder's XML files.

How to anchor a website to a usb flash drive?

So I've developed a website with multiple (10) pages, including a home page, and each page has links to the others. But when demo'ing the site, the links point to "C://users/hp/(etc etc)". Is there a way to simply point the links on the website to their parent folder, wherever that folder is located? I want to be able to put it on a flash drive, give that flash drive to a friend, and for them to be able to plug it in and use the website without changing or moving anything.
Just use relative paths instead of absolute ones:
C:\Users\hp\foo\bar.txt This is called absolute path.
..\..\foo\bar.txt This is called relative path (Any path that doesn't begin with the root of the filesystem, in your case, it is C:).
In relative paths, .. mean the parent directory, and . means the current directory. So to refer to the parent directory use ../ then complete the path from this directory to the file.

Adobe air native installer is not including .class files and .properties files

I have some files in my src directory, some are .class files (Java class files) and some are .properties files, when I create the Adobe air native installer these files are not included. Why is that? How can I work around that?
Also it excludes .mxml files, but that's good. I'm sure that's related, how to change what it includes or excludes?
Honestly not sure why it's excluding those on you. But you can right click the project in the project navigator panel, go to properties, on the left side navigation select "Flex Build Packaging", click the "Package Contents" tab on the right, make sure the files you want are selected. If they aren't there I would guess somehow these files aren't being seen in the source path, check that under Flex Build Path -> Source Path.
EDIT:
Found this as a duplicate, following the steps to go to window preferences and remove the exclusions seems to have worked.
Add .properties file to output folder of Flex project