Hi all,
I'm trying to base some calculations on the stageHeight and
stageWidth, but I end up getting 636 and 464 every single time for
stageWidth and stageHeight (resp), no matter what parameters I give
for -default-size. I'm running the swf in the standalone player and
I've built it with the
Tracing enterFrame shows the right dimensions, as does setting
scaleMode to NO_SCALE and listening to Event.RESIZE.
Although, it doesn't quite match the args I pass in for default-size:
(Test.as is at http://pastie.caboo.se/67829)
mxmlc -default-size 300 300 Test.as
trace output:
on resize
mxmlc is complaining that it can't find the source to a file I've
embedded even though the documentation [1] says that it should be able
to find it.
Here's an example. If I put my files in the following directories:
./src/Test.as
./assets/myasset.swf
Where Test.as is embedding the asset with the
looking at any documentation, I'd guess that the '/' at the
start of myasset's path specifies an absolute url (not relative to
current folder or search paths), and as such is being looked for at
the root.
--- seriousbraincancer eden.li@ wrote:
Here's an example. If I put my files
It looks like views/MyView.as and TEST/add.png are in the same source
path. In MyView.as, You should be able to do this:
[Embed(source='/TEST/add.png')]
I found this link pretty useful (except for the bit about multiple
source paths):
Sorry, I just re-read your original message. You can't create proper
file links in Windows without using some hackery.
In your original case:
TeamProject
- icons
-- add.png
- com
-- example
views
-- MyView.as
You can get to add.png from MyView.as using the following:
Sorry, I must have mis-worded my response.
You don't have to make any shortcuts or links since your assets are in
the same folder as your packages:
- root
-- images
image1.png
image2.png
-- com
--- mycompany
MyApp.as
In MyApp.as, you can embed any image in 'images' by prepending
7 matches
Mail list logo