RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-24 Thread Alex Harui
The attached SWF works fine for me.

 

Maybe clean the project and rebuild.  Make sure the SDK version you are
using for both SWFs are the same.  Post the test app SWF if there are
still problems

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamal wally
Sent: Wednesday, July 23, 2008 10:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

 

Hello again,

OK, I'm sending the style swf as an attachment to this post. If it
doesn't work, I will email directly to you Alex (thank you very much for
your patience). 

Alex, to answer your question about the location of the style swf: The
style SWF is local to my machine and lives in a subdirectory of the
project. 

I named the flex project testRuntimeCss and the project files are in:
~/Documents/Flex Builder 3/testRuntimeCss/
The main MXML file is in the default location (src/) and the style CSS
and SWF files are both in assets/.

Let me also point out that in order to minimize the potential for
user-error on my part, I have re-done my test runtime css Flex Project
so that it follows the Adobe example at:
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html


I copied/pasted their example simple CSS into a file called
BasicStyles.css which lives in the assets/ folder of my project. For
completeness, here is the content of the CSS file, copied directly from
the Adobe help page listed above.

/* styles/runtime/assets/BasicStyles.css */
Button {
fontSize: 24;
color: #FF9933;
}

Label {
fontSize: 24;
color: #FF9933;
}

I then compiled the CSS file into a SWF with:
 mxmlc BasicStyle.css

The resulting swf, BasicStyle.swf, is attached.

By the way, I am using the mxmlc app from SDK 3.0.0 (on Mac Leopard)
 which mxmlc
/Applications/Adobe Flex Builder 3/sdks/3.0.0/bin/mxmlc

Another thing to point out is that I have done this both with Compile
CSS to SWF option for the BasicStyle.css file on and off. Both
approaches give the same result (runtime error -- described below).

I then copied/pasted the MXML content from the Adobe help page into my
main MXML file. Again, for completeness, here is the MXML that I used:

?xml version=1.0?
!-- styles/BasicApp.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
mx:Script
![CDATA[
import mx.styles.StyleManager;

public function applyRuntimeStyleSheet():void {
StyleManager.loadStyleDeclarations(../assets/BasicStyles.swf)
}
]]
/mx:Script 
mx:Label text=Click the button to load a new CSS-based SWF file/
mx:Button id=b1 label=Click Me click=applyRuntimeStyleSheet()/
/mx:Application


When I debug in FB3, the application SWF successfully loads in my web
browser. But when I click on the button labeled Click Me, the
application crashes. The error I get is:

Error: Unable to load style(SWF is not a loadable module):
../assets/BasicStyles.swf.

Just before that error, I get the following trace which suggests that
the SWF style file was, indeed found.

[SWF] Users:jbattat:Documents:Flex Builder
3:testRuntimeCss:assets:BasicStyles.swf - 34,571 bytes after
decompression

Please let me know if you find a problem with the attached swf. 

-- j

 



[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-23 Thread jamalwally
About posting the swf in another way:  I don't have any other webspace that I 
own.  I'd be 
happy to use a file hosting site, but want to avoid having others register to 
view/download 
the file.  What is your preferred posting method?.  Does the group allow SWF as 
attachments to emal?

In the meantime, please see below for the text of the CSS file that I used to 
make the style 
swf.  All I did to make the SWF from the CSS is: mxmlc style.css

Thanks again,
 -- j

/* CSS file */
Application {
background-alpha: 1;
background-gradient-colors: #ff, #00;
font-size: 10px;
}

Panel {
titleStyleName: panelTitle;
headerHeight: 32;
borderColor: #660099;
borderAlpha: 1;
borderThicknessLeft: 10;
borderThicknessTop: 0;
borderThicknessBottom: 10;
borderThicknessRight: 10;
headerColors: #cc33ff, #660099;
}
.panelTitle {
color: white;
font-family: Arial, Helvetica;
font-size: 14px;
font-weight: bold;
}

Label {
font-size: 20;
color: #ff;
font-weight: bold;
}

Button {
cornerRadius: 15;
textIndent: 0;
highlightAlphas: 0.26, 0;
fillColors: #ccff00, #99ff99, #ff, #cc;
color: #ff;
textRollOverColor: #336600;
}


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 I'm unable to download those files.  Try to find another way to make
 them available.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jamalwally
 Sent: Monday, July 21, 2008 5:53 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module
 
  
 
 Was anybody able to view the css styles swf that I posted earlier? I'm
 still unable to 
 implement runtime css because of the SWF is not a loadable module
 error. Any further 
 help would be greatly appreciated.
 
 Thank you,
 --j
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Post the swf.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jamalwally
  Sent: Wednesday, July 16, 2008 11:37 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable
 module
  
  
  
  Hi Tracy,
  
  I'm confident that FB3 can find the style swf since the following is
  printed to the console:
  
  [SWF] Users:jbattat:Documents:Flex Builder
  3:testRuntimeCss:assets:style1.swf - 11,294 
  bytes after decompression
  
  Still not sure how to verify that the style1.swf is actually a style
 swf
  (though I have no 
  reason to believe that it is not).
  
  James
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   Make sure the compiled css swf is actually where you expect.
   
   
   
   I am having problems with FB3 where the compiler misplaces the css
  swf,
   into a deeply nested folder structure under the bin folder, and I
  always
   have to copy it to the correct location. I plan to post a question
 on
   this some time soon.
   
   
   
   Tracy
   
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of jamalwally
   Sent: Wednesday, July 16, 2008 12:45 AM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
   
   
   
   Hello,
   
   I'm trying to implement runtime css in my flex application. I have
   compiled my css file 
   into a swf with mxmlc
mxmlc style1.css
   
   Then I load the resulting style1.swf on Application
 creationComplete:
   
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
   http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml   
  layout=vertical
  
 
 creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
   wf', true, 
   true)
   
   But when I debug this in Flex Builder 3, I get an error (see below)
   saying that my 
   style1.swf is not a loadable module. I looked around online and in
  this
   forum and it seems 
   that this message is security-based, which is puzzling to me because
  all
   files are local in 
   my example. I am not loading a style file from another domain.
   
   My directory structure (on OS X Leopard) is:
   testRuntimeCss\
   assets\
   style1.css
   style1.swf
   src

RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-23 Thread Alex Harui
I think I've seen attachments.  BTW, you aren't loading the module from
another domain are you?  That's explained on my blog.

 

If attachment doesn't work or you want to limit access, you can just
email the SWF to me directly.  Don't send .zip files, they'll get
filtered out.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamalwally
Sent: Wednesday, July 23, 2008 8:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

 

About posting the swf in another way: I don't have any other webspace
that I own. I'd be 
happy to use a file hosting site, but want to avoid having others
register to view/download 
the file. What is your preferred posting method?. Does the group allow
SWF as 
attachments to emal?

In the meantime, please see below for the text of the CSS file that I
used to make the style 
swf. All I did to make the SWF from the CSS is: mxmlc style.css

Thanks again,
-- j

/* CSS file */
Application {
background-alpha: 1;
background-gradient-colors: #ff, #00;
font-size: 10px;
}

Panel {
titleStyleName: panelTitle;
headerHeight: 32;
borderColor: #660099;
borderAlpha: 1;
borderThicknessLeft: 10;
borderThicknessTop: 0;
borderThicknessBottom: 10;
borderThicknessRight: 10;
headerColors: #cc33ff, #660099;
}
.panelTitle {
color: white;
font-family: Arial, Helvetica;
font-size: 14px;
font-weight: bold;
}

Label {
font-size: 20;
color: #ff;
font-weight: bold;
}

Button {
cornerRadius: 15;
textIndent: 0;
highlightAlphas: 0.26, 0;
fillColors: #ccff00, #99ff99, #ff, #cc;
color: #ff;
textRollOverColor: #336600;
}

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 I'm unable to download those files. Try to find another way to make
 them available.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of jamalwally
 Sent: Monday, July 21, 2008 5:53 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable
module
 
 
 
 Was anybody able to view the css styles swf that I posted earlier? I'm
 still unable to 
 implement runtime css because of the SWF is not a loadable module
 error. Any further 
 help would be greatly appreciated.
 
 Thank you,
 --j
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Post the swf.
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jamalwally
  Sent: Wednesday, July 16, 2008 11:37 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable
 module
  
  
  
  Hi Tracy,
  
  I'm confident that FB3 can find the style swf since the following is
  printed to the console:
  
  [SWF] Users:jbattat:Documents:Flex Builder
  3:testRuntimeCss:assets:style1.swf - 11,294 
  bytes after decompression
  
  Still not sure how to verify that the style1.swf is actually a style
 swf
  (though I have no 
  reason to believe that it is not).
  
  James
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   Make sure the compiled css swf is actually where you expect.
   
   
   
   I am having problems with FB3 where the compiler misplaces the css
  swf,
   into a deeply nested folder structure under the bin folder, and I
  always
   have to copy it to the correct location. I plan to post a question
 on
   this some time soon.
   
   
   
   Tracy
   
   
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of jamalwally
   Sent: Wednesday, July 16, 2008 12:45 AM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Runtime CSS and SWF is not a loadable
module
   
   
   
   Hello,
   
   I'm trying to implement runtime css in my flex application. I have
   compiled my css file 
   into a swf with mxmlc
mxmlc style1.css
   
   Then I load the resulting style1.swf on Application
 creationComplete:
   
   mx:Application

[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-23 Thread jamal wally
Hello again,

OK, I'm sending the style swf as an attachment to this post.  If it doesn't 
work, I will email directly to you Alex (thank you very much for your 
patience).  

Alex, to answer your question about the location of the style swf:  The style 
SWF is local to my machine and lives in a subdirectory of the project.  

I named the flex project testRuntimeCss and the project files are in:
  ~/Documents/Flex Builder 3/testRuntimeCss/
The main MXML file is in the default location (src/) and the style CSS and SWF 
files are both in assets/.

Let me also point out that in order to minimize the potential for user-error on 
my part, I have re-done my test runtime css Flex Project so that it follows the 
Adobe example at:
  http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html

I copied/pasted their example simple CSS into a file called BasicStyles.css 
which lives in the assets/ folder of my project.  For completeness, here is the 
content of the CSS file, copied directly from the Adobe help page listed above.

/* styles/runtime/assets/BasicStyles.css */
Button {
fontSize:24;
color: #FF9933;
}

Label {
fontSize:24;
color: #FF9933;
}

I then compiled the CSS file into a SWF with:
  mxmlc BasicStyle.css

The resulting swf, BasicStyle.swf, is attached.

By the way, I am using the mxmlc app from SDK 3.0.0 (on Mac Leopard)
  which mxmlc
/Applications/Adobe Flex Builder 3/sdks/3.0.0/bin/mxmlc

Another thing to point out is that I have done this both with Compile CSS to 
SWF option for the BasicStyle.css file on and off.  Both approaches give the 
same result (runtime error -- described below).

I then copied/pasted the MXML content from the Adobe help page into my main 
MXML file.  Again, for completeness, here is the MXML that I used:

?xml version=1.0?
!-- styles/BasicApp.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[
import mx.styles.StyleManager;

public function applyRuntimeStyleSheet():void {
StyleManager.loadStyleDeclarations(../assets/BasicStyles.swf)
}
]]
/mx:Script
mx:Label text=Click the button to load a new CSS-based SWF file/
mx:Button id=b1 label=Click Me click=applyRuntimeStyleSheet()/
/mx:Application
 

When I debug in FB3, the application SWF successfully loads in my web browser. 
But when I click on the button labeled Click Me, the application crashes.  
The error I get is:

  Error: Unable to load style(SWF is not a loadable module):
  ../assets/BasicStyles.swf.

Just before that error, I get the following trace which suggests that the SWF 
style file was, indeed found.

 [SWF] Users:jbattat:Documents:Flex Builder  
3:testRuntimeCss:assets:BasicStyles.swf - 34,571 bytes after decompression

Please let me know if you find a problem with the attached swf. 

-- j






  

BasicStyles.swf
Description: application/shockwave-flash


[flexcoders] Re: Runtime CSS and SWF is not a loadable module -- new information

2008-07-23 Thread jamalwally
Although I do get a runtime error when the application tries to load the style 
SWF that I 
made via mxmlc BasicStyle.css  (the SWF in the assets/ folder), I was finally 
able to get 
styles to successfully load using the SWF generated by FB3.

I'd still like to know how to load style SWFs made via mxmlc though.

In the meantime, here's how I got the styles to load:

* In FB 3, I right-clicked (CTRL-Clicked on a mac) on the assets/BasicStyle.css 
file and 
selected Compile CSS to SWF.  This put a check mark next to that option.
* Then I noticed that FB3 compiled the CSS file into a SWF and located that swf 
in:
bin/Users/username/Documents/Flex Builder 
3/testRuntimeCss/assets/BasicStyles.swf
   notice that FB3 reproduced the directory structure of the Flex Project 
location under the 
bin directory (rather than putting the style SWF in the assets/ folder 
directly).

* So I updated my MXML file to read:
StyleManager.loadStyleDeclarations(Users/jbattat/Documents/Flex Builder 
3/testRuntimeCss/assets/BasicStyles.swf)
  (the path passed to loadStyleDeclarations() used to be 
../assets/BasicStyles.swf)

* Then I did a debug run, clicked the Button and the styles were successfully 
loaded.

So some obvious questions remain:
* Do you really have to code the path to the style swf in this way, or can you 
tell
  FB3 to compile the CSS file into a SWF and place the SWF directly in the 
bin-debug/ 
folder (or elsewhere)
* How do you get runtime styles to load using style SWFs made via mxmlc (this 
is the 
critical question for me).
* Is there a way to diff two SWFs?  I have one SWF (made by FB3) that works 
and one 
(made by mxmlc) that does not.  Seeing the differences between the two would be 
instructive.

As always, thanks for your help
 -- j


--- In flexcoders@yahoogroups.com, jamal wally [EMAIL PROTECTED] wrote:

 Hello again,
 
 OK, I'm sending the style swf as an attachment to this post.  If it doesn't 
 work, I will 
email directly to you Alex (thank you very much for your patience).  
 
 Alex, to answer your question about the location of the style swf:  The style 
 SWF is local 
to my machine and lives in a subdirectory of the project.  
 
 I named the flex project testRuntimeCss and the project files are in:
   ~/Documents/Flex Builder 3/testRuntimeCss/
 The main MXML file is in the default location (src/) and the style CSS and 
 SWF files are 
both in assets/.
 
 Let me also point out that in order to minimize the potential for user-error 
 on my part, 
I have re-done my test runtime css Flex Project so that it follows the Adobe 
example at:
   http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html
 
 I copied/pasted their example simple CSS into a file called BasicStyles.css 
 which lives in 
the assets/ folder of my project.  For completeness, here is the content of the 
CSS file, 
copied directly from the Adobe help page listed above.
 
 /* styles/runtime/assets/BasicStyles.css */
 Button {
 fontSize:24;
 color: #FF9933;
 }
 
 Label {
 fontSize:24;
 color: #FF9933;
 }
 
 I then compiled the CSS file into a SWF with:
   mxmlc BasicStyle.css
 
 The resulting swf, BasicStyle.swf, is attached.
 
 By the way, I am using the mxmlc app from SDK 3.0.0 (on Mac Leopard)
   which mxmlc
 /Applications/Adobe Flex Builder 3/sdks/3.0.0/bin/mxmlc
 
 Another thing to point out is that I have done this both with Compile CSS to 
 SWF option 
for the BasicStyle.css file on and off.  Both approaches give the same result 
(runtime error 
-- described below).
 
 I then copied/pasted the MXML content from the Adobe help page into my main 
 MXML 
file.  Again, for completeness, here is the MXML that I used:
 
 ?xml version=1.0?
 !-- styles/BasicApp.mxml --
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script
 ![CDATA[
 import mx.styles.StyleManager;
 
 public function applyRuntimeStyleSheet():void {
 StyleManager.loadStyleDeclarations(../assets/BasicStyles.swf)
 }
 ]]
 /mx:Script
 mx:Label text=Click the button to load a new CSS-based SWF file/
 mx:Button id=b1 label=Click Me click=applyRuntimeStyleSheet()/
 /mx:Application
  
 
 When I debug in FB3, the application SWF successfully loads in my web 
 browser. But 
when I click on the button labeled Click Me, the application crashes.  The 
error I get is:
 
   Error: Unable to load style(SWF is not a loadable module):
   ../assets/BasicStyles.swf.
 
 Just before that error, I get the following trace which suggests that the SWF 
 style file 
was, indeed found.
 
  [SWF] Users:jbattat:Documents:Flex Builder  
 3:testRuntimeCss:assets:BasicStyles.swf - 
34,571 bytes after decompression
 
 Please let me know if you find a problem with the attached swf. 
 
 -- j






RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module -- new information

2008-07-23 Thread Alex Harui
You can try using swfdump to compare the swfs.  I use mxmlc to compile
css swfs without problem.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamalwally
Sent: Wednesday, July 23, 2008 10:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module
-- new information

 

Although I do get a runtime error when the application tries to load the
style SWF that I 
made via mxmlc BasicStyle.css (the SWF in the assets/ folder), I was
finally able to get 
styles to successfully load using the SWF generated by FB3.

I'd still like to know how to load style SWFs made via mxmlc though.

In the meantime, here's how I got the styles to load:

* In FB 3, I right-clicked (CTRL-Clicked on a mac) on the
assets/BasicStyle.css file and 
selected Compile CSS to SWF. This put a check mark next to that
option.
* Then I noticed that FB3 compiled the CSS file into a SWF and located
that swf in:
bin/Users/username/Documents/Flex Builder
3/testRuntimeCss/assets/BasicStyles.swf
notice that FB3 reproduced the directory structure of the Flex Project
location under the 
bin directory (rather than putting the style SWF in the assets/ folder
directly).

* So I updated my MXML file to read:
StyleManager.loadStyleDeclarations(Users/jbattat/Documents/Flex Builder

3/testRuntimeCss/assets/BasicStyles.swf)
(the path passed to loadStyleDeclarations() used to be
../assets/BasicStyles.swf)

* Then I did a debug run, clicked the Button and the styles were
successfully loaded.

So some obvious questions remain:
* Do you really have to code the path to the style swf in this way, or
can you tell
FB3 to compile the CSS file into a SWF and place the SWF directly in the
bin-debug/ 
folder (or elsewhere)
* How do you get runtime styles to load using style SWFs made via mxmlc
(this is the 
critical question for me).
* Is there a way to diff two SWFs? I have one SWF (made by FB3) that
works and one 
(made by mxmlc) that does not. Seeing the differences between the two
would be 
instructive.

As always, thanks for your help
-- j

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, jamal wally [EMAIL PROTECTED] wrote:

 Hello again,
 
 OK, I'm sending the style swf as an attachment to this post. If it
doesn't work, I will 
email directly to you Alex (thank you very much for your patience). 
 
 Alex, to answer your question about the location of the style swf: The
style SWF is local 
to my machine and lives in a subdirectory of the project. 
 
 I named the flex project testRuntimeCss and the project files are in:
 ~/Documents/Flex Builder 3/testRuntimeCss/
 The main MXML file is in the default location (src/) and the style CSS
and SWF files are 
both in assets/.
 
 Let me also point out that in order to minimize the potential for
user-error on my part, 
I have re-done my test runtime css Flex Project so that it follows the
Adobe example at:
 http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html

 
 I copied/pasted their example simple CSS into a file called
BasicStyles.css which lives in 
the assets/ folder of my project. For completeness, here is the content
of the CSS file, 
copied directly from the Adobe help page listed above.
 
 /* styles/runtime/assets/BasicStyles.css */
 Button {
 fontSize: 24;
 color: #FF9933;
 }
 
 Label {
 fontSize: 24;
 color: #FF9933;
 }
 
 I then compiled the CSS file into a SWF with:
  mxmlc BasicStyle.css
 
 The resulting swf, BasicStyle.swf, is attached.
 
 By the way, I am using the mxmlc app from SDK 3.0.0 (on Mac Leopard)
  which mxmlc
 /Applications/Adobe Flex Builder 3/sdks/3.0.0/bin/mxmlc
 
 Another thing to point out is that I have done this both with Compile
CSS to SWF option 
for the BasicStyle.css file on and off. Both approaches give the same
result (runtime error 
-- described below).
 
 I then copied/pasted the MXML content from the Adobe help page into my
main MXML 
file. Again, for completeness, here is the MXML that I used:
 
 ?xml version=1.0?
 !-- styles/BasicApp.mxml --
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 mx:Script
 ![CDATA[
 import mx.styles.StyleManager;
 
 public function applyRuntimeStyleSheet():void {
 StyleManager.loadStyleDeclarations(../assets/BasicStyles.swf)
 }
 ]]
 /mx:Script 
 mx:Label text=Click the button to load a new CSS-based SWF file/
 mx:Button id=b1 label=Click Me click=applyRuntimeStyleSheet()/
 /mx:Application
 
 
 When I debug in FB3, the application SWF successfully loads in my web
browser. But 
when I click on the button labeled Click Me, the application crashes.
The error I get is:
 
 Error: Unable to load style(SWF is not a loadable module):
 ../assets/BasicStyles.swf.
 
 Just before that error, I get the following trace which suggests that
the SWF style file 
was, indeed found.
 
 [SWF

[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-21 Thread jamalwally
Was anybody able to view the css styles swf that I posted earlier?  I'm still 
unable to 
implement runtime css because of the SWF is not a loadable module error.  Any 
further 
help would be greatly appreciated.

Thank you,
--j


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Post the swf.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jamalwally
 Sent: Wednesday, July 16, 2008 11:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module
 
  
 
 Hi Tracy,
 
 I'm confident that FB3 can find the style swf since the following is
 printed to the console:
 
 [SWF] Users:jbattat:Documents:Flex Builder
 3:testRuntimeCss:assets:style1.swf - 11,294 
 bytes after decompression
 
 Still not sure how to verify that the style1.swf is actually a style swf
 (though I have no 
 reason to believe that it is not).
 
 James
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Make sure the compiled css swf is actually where you expect.
  
  
  
  I am having problems with FB3 where the compiler misplaces the css
 swf,
  into a deeply nested folder structure under the bin folder, and I
 always
  have to copy it to the correct location. I plan to post a question on
  this some time soon.
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jamalwally
  Sent: Wednesday, July 16, 2008 12:45 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
  
  
  
  Hello,
  
  I'm trying to implement runtime css in my flex application. I have
  compiled my css file 
  into a swf with mxmlc
   mxmlc style1.css
  
  Then I load the resulting style1.swf on Application creationComplete:
  
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
 layout=vertical
 
 creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
  wf', true, 
  true)
  
  But when I debug this in Flex Builder 3, I get an error (see below)
  saying that my 
  style1.swf is not a loadable module. I looked around online and in
 this
  forum and it seems 
  that this message is security-based, which is puzzling to me because
 all
  files are local in 
  my example. I am not loading a style file from another domain.
  
  My directory structure (on OS X Leopard) is:
  testRuntimeCss\
  assets\
  style1.css
  style1.swf
  src\
  testRuntimeCss.mxml
  
  I have tried this with the Compile CSS to SWF option both checked
 and
  unchecked (right 
  click on style1.css). 
  
  What gives?
  
  [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin-
  debug:testRuntimeCss.swf - 582,620 bytes after decompression
  [SWF] Users:jbattat:Documents:Flex Builder
  3:testRuntimeCss:assets:style1.swf - 11,294 
  bytes after decompression
  Error: Unable to load style(SWF is not a loadable module):
  ../assets/style1.swf.
  at 
 
 anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S
  tyleManag
  erImpl.as:858]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at 
 
 ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr
  amework\src
  \mx\modules\ModuleManager.as:1027]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at 
 
 ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\
  mx\modules\
  ModuleManager.as:631]
 






RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-21 Thread Alex Harui
I'm unable to download those files.  Try to find another way to make
them available.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamalwally
Sent: Monday, July 21, 2008 5:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

 

Was anybody able to view the css styles swf that I posted earlier? I'm
still unable to 
implement runtime css because of the SWF is not a loadable module
error. Any further 
help would be greatly appreciated.

Thank you,
--j

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Post the swf.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of jamalwally
 Sent: Wednesday, July 16, 2008 11:37 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable
module
 
 
 
 Hi Tracy,
 
 I'm confident that FB3 can find the style swf since the following is
 printed to the console:
 
 [SWF] Users:jbattat:Documents:Flex Builder
 3:testRuntimeCss:assets:style1.swf - 11,294 
 bytes after decompression
 
 Still not sure how to verify that the style1.swf is actually a style
swf
 (though I have no 
 reason to believe that it is not).
 
 James
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Make sure the compiled css swf is actually where you expect.
  
  
  
  I am having problems with FB3 where the compiler misplaces the css
 swf,
  into a deeply nested folder structure under the bin folder, and I
 always
  have to copy it to the correct location. I plan to post a question
on
  this some time soon.
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jamalwally
  Sent: Wednesday, July 16, 2008 12:45 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
  
  
  
  Hello,
  
  I'm trying to implement runtime css in my flex application. I have
  compiled my css file 
  into a swf with mxmlc
   mxmlc style1.css
  
  Then I load the resulting style1.swf on Application
creationComplete:
  
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml   
 layout=vertical
 

creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
  wf', true, 
  true)
  
  But when I debug this in Flex Builder 3, I get an error (see below)
  saying that my 
  style1.swf is not a loadable module. I looked around online and in
 this
  forum and it seems 
  that this message is security-based, which is puzzling to me because
 all
  files are local in 
  my example. I am not loading a style file from another domain.
  
  My directory structure (on OS X Leopard) is:
  testRuntimeCss\
  assets\
  style1.css
  style1.swf
  src\
  testRuntimeCss.mxml
  
  I have tried this with the Compile CSS to SWF option both checked
 and
  unchecked (right 
  click on style1.css). 
  
  What gives?
  
  [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin-
  debug:testRuntimeCss.swf - 582,620 bytes after decompression
  [SWF] Users:jbattat:Documents:Flex Builder
  3:testRuntimeCss:assets:style1.swf - 11,294 
  bytes after decompression
  Error: Unable to load style(SWF is not a loadable module):
  ../assets/style1.swf.
  at 
 

anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S
  tyleManag
  erImpl.as:858]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at 
 

ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr
  amework\src
  \mx\modules\ModuleManager.as:1027]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at 
 

ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\
  mx\modules\
  ModuleManager.as:631]
 


 



[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-17 Thread jamalwally
I've posted the swf and associated css file at:

http://www.fas.harvard.edu/~metro/METRO/styles/style1.swf
http://www.fas.harvard.edu/~metro/METRO/styles/style1.css

Thank you very much for your continued assistance, I really appreciate it.

--j 


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Post the swf.
 



[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-16 Thread jamalwally
Thanks for the quick response.  I'm not sure how to verify that the swf is a 
style swf.  Any 
suggestions would be greatly appreciated.  By the way, is there some reason 
that running  
mxmlc style1.css would not produce a style swf?

Thank you

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Make sure it really is a style swf.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jamalwally
 Sent: Tuesday, July 15, 2008 9:45 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
 
  
 
 Hello,
 
 I'm trying to implement runtime css in my flex application. I have
 compiled my css file 
 into a swf with mxmlc
  mxmlc style1.css
 
 Then I load the resulting style1.swf on Application creationComplete:
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  layout=vertical
 creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
 wf', true, 
 true)
 
 But when I debug this in Flex Builder 3, I get an error (see below)
 saying that my 
 style1.swf is not a loadable module. I looked around online and in this
 forum and it seems 
 that this message is security-based, which is puzzling to me because all
 files are local in 
 my example. I am not loading a style file from another domain.
 
 My directory structure (on OS X Leopard) is:
 testRuntimeCss\
 assets\
 style1.css
 style1.swf
 src\
 testRuntimeCss.mxml
 
 I have tried this with the Compile CSS to SWF option both checked and
 unchecked (right 
 click on style1.css). 
 
 What gives?
 
 [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin-
 debug:testRuntimeCss.swf - 582,620 bytes after decompression
 [SWF] Users:jbattat:Documents:Flex Builder
 3:testRuntimeCss:assets:style1.swf - 11,294 
 bytes after decompression
 Error: Unable to load style(SWF is not a loadable module):
 ../assets/style1.swf.
 at 
 anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S
 tyleManag
 erImpl.as:858]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr
 amework\src
 \mx\modules\ModuleManager.as:1027]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\
 mx\modules\
 ModuleManager.as:631]




[flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-16 Thread jamalwally
Hi Tracy,

I'm confident that FB3 can find the style swf since the following is printed to 
the console:

[SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:assets:style1.swf - 
11,294 
bytes after decompression

Still not sure how to verify that the style1.swf is actually a style swf 
(though I have no 
reason to believe that it is not).

James

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Make sure the compiled css swf is actually where you expect.
 
  
 
 I am having problems with FB3 where the compiler misplaces the css swf,
 into a deeply nested folder structure under the bin folder, and I always
 have to copy it to the correct location.  I plan to post a question on
 this some time soon.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jamalwally
 Sent: Wednesday, July 16, 2008 12:45 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
 
  
 
 Hello,
 
 I'm trying to implement runtime css in my flex application. I have
 compiled my css file 
 into a swf with mxmlc
  mxmlc style1.css
 
 Then I load the resulting style1.swf on Application creationComplete:
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  layout=vertical
 creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
 wf', true, 
 true)
 
 But when I debug this in Flex Builder 3, I get an error (see below)
 saying that my 
 style1.swf is not a loadable module. I looked around online and in this
 forum and it seems 
 that this message is security-based, which is puzzling to me because all
 files are local in 
 my example. I am not loading a style file from another domain.
 
 My directory structure (on OS X Leopard) is:
 testRuntimeCss\
 assets\
 style1.css
 style1.swf
 src\
 testRuntimeCss.mxml
 
 I have tried this with the Compile CSS to SWF option both checked and
 unchecked (right 
 click on style1.css). 
 
 What gives?
 
 [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin-
 debug:testRuntimeCss.swf - 582,620 bytes after decompression
 [SWF] Users:jbattat:Documents:Flex Builder
 3:testRuntimeCss:assets:style1.swf - 11,294 
 bytes after decompression
 Error: Unable to load style(SWF is not a loadable module):
 ../assets/style1.swf.
 at 
 anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S
 tyleManag
 erImpl.as:858]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr
 amework\src
 \mx\modules\ModuleManager.as:1027]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\
 mx\modules\
 ModuleManager.as:631]






RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-16 Thread Alex Harui
Post the swf.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamalwally
Sent: Wednesday, July 16, 2008 11:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

 

Hi Tracy,

I'm confident that FB3 can find the style swf since the following is
printed to the console:

[SWF] Users:jbattat:Documents:Flex Builder
3:testRuntimeCss:assets:style1.swf - 11,294 
bytes after decompression

Still not sure how to verify that the style1.swf is actually a style swf
(though I have no 
reason to believe that it is not).

James

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 Make sure the compiled css swf is actually where you expect.
 
 
 
 I am having problems with FB3 where the compiler misplaces the css
swf,
 into a deeply nested folder structure under the bin folder, and I
always
 have to copy it to the correct location. I plan to post a question on
 this some time soon.
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of jamalwally
 Sent: Wednesday, July 16, 2008 12:45 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Runtime CSS and SWF is not a loadable module
 
 
 
 Hello,
 
 I'm trying to implement runtime css in my flex application. I have
 compiled my css file 
 into a swf with mxmlc
  mxmlc style1.css
 
 Then I load the resulting style1.swf on Application creationComplete:
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
layout=vertical

creationComplete=StyleManager.loadStyleDeclarations('../assets/style1.s
 wf', true, 
 true)
 
 But when I debug this in Flex Builder 3, I get an error (see below)
 saying that my 
 style1.swf is not a loadable module. I looked around online and in
this
 forum and it seems 
 that this message is security-based, which is puzzling to me because
all
 files are local in 
 my example. I am not loading a style file from another domain.
 
 My directory structure (on OS X Leopard) is:
 testRuntimeCss\
 assets\
 style1.css
 style1.swf
 src\
 testRuntimeCss.mxml
 
 I have tried this with the Compile CSS to SWF option both checked
and
 unchecked (right 
 click on style1.css). 
 
 What gives?
 
 [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin-
 debug:testRuntimeCss.swf - 582,620 bytes after decompression
 [SWF] Users:jbattat:Documents:Flex Builder
 3:testRuntimeCss:assets:style1.swf - 11,294 
 bytes after decompression
 Error: Unable to load style(SWF is not a loadable module):
 ../assets/style1.swf.
 at 

anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S
 tyleManag
 erImpl.as:858]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 

ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr
 amework\src
 \mx\modules\ModuleManager.as:1027]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 

ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\
 mx\modules\
 ModuleManager.as:631]