Assigning present-state CSS colors within components
Hi Folks,
Got a ton of components on my site that I use for navigation. Nav Bars, Button bars, etc. Any given component might therefore link to 20 or 30 subpages.
Simple question: How do I assign present-state colors to a given button within a component?
For example: a Nav Bar component has buttons that will lead a visitor to any of a dozen pages. The Nav Bar therefore looks the exact same on every one of those twelve pages, but I'd like the button indicating the present (or current) page to be a different color. The button for page 9, for instance, should have a different color (or current state) when the visitor is actually on page 9.
The challenge: how to pull this off when the button to be highlighted exists on a component, rather than on the individual page file itself?
This might not be as hard as it sounds - I'm basically looking for the appropriate CSS tag.
Many thanks -
Okay, so after getting almost no views and getting zero replies here, I've found the answer. The answer is NO, this can't be done. Well, at least the part about being able to use variables within the css file. See details at:
http://forums.adobe.com/message/2645929#2645929
I found some discussion of people hoping that it will be possible in the future to have variables within css, but that would still not provide what I was looking for in Flash Builder. Perhaps a pre-processing program could be written that would inject colors into the mxml, skin, and css files, but I'm not sure how well that would play with the FB IDE. And even with such a thing, going back and forth with changes could be a problem.
So I guess we're stuck doing it the hard way.
Similar Messages
-
Using variables: Statement must appear within on handler
I would like to use variables in my flash app. The app is quite simple, has many buttons, and on each of those buttons I have a simple script: on-rollover and on-release. For both actions I use the same value, which I want to put in a variable. The following script results in an error message: Statement must appear within on handler. When I have to declare the variable inside the on-handler, I have to declare it twice, which makes it useless as I have to enter the value twice. How can I get this working?
country = "uk"
on (rollOver)
gotoAndPlay(country)
on (release)
getURL("/"+country+"/", "_self");try:
Select a frame on the timeline where your buttons live and then move the buttons handlers there:
e.g.
myButton1.onPress = onPressFunction
myButton2.onPress = onPressFunction
myButton3.onPress = onPressFunction
etc.etc.
myButton1.onRelease = onReleaseFunction
myButton2.onRelease = onReleaseFunction
myButton3.onRelease = onReleaseFunction
etc.etc.
country = "uk"
function onPressFunction(){
this.gotoAndPlay(country)
function onReleaseFunction(){
getURL("/"+country+"/", "_self");
If you use this approach you MUST remove the scripts from buttons themselves.
I hope this helps. -
This is driving me crazy. I am suddenly being presented with CYMK colors to 2 decimal points. Too much info for me. What did I accidentally change and how can I fix it? I've been through all of the preferences, views etc. I can find but no luck. Thinking this has something to with the color settings (obviously) but with all of the possible options there I could use some help. Thanks, all!
May have been a switch from RGB to CMYK.
Or you moved one of the sliders with shift key pressed. -
Constraining the algorithm for assignment of multiple plot colors
I would like to know if there is some way to modify the algorithm that
LabVIEW uses to automatically assign different colors when a graph
displays multiple plots. In particular, given the default background
color (black), it appears that black is never used for a plot color.
However, if I programmatically change the background color to white,
for example, I would like the plot color assignment to not use white. I
would also like to know if it is possible to constrain the plot color
assignment to a single color a priori, without having to go back and
explicitly assign the colors of each plot via the property node in a
loop.
Thanks.
LyleI think you will have to create your own plot color assignment function to do this.
You can set the color of each plot by using the active plot property (index of the plot you want to change) and then set the plot color property (just expand one and the same property ndoe to set both at the same time).
You can then make that function check the background color and choose a color table that fits. If this is in a built application you would run this function when a color change is detected, if it's in the development environment you need this feature make the function ask for a VI and plot name (so that it can get a reference to the plot) and put it in your projects folder. That way whenever you need to set the plot colors differently you just select this function from the Tools menu of LabVIEW. An easier alternative though would be to just create the different graphs you need (with the colors for all plots already defined correctly for that background etc.) and save them as custom indicators...
MTO -
Error: Statement must appear within on/onClipEvent handler
I'm getting this error Scene=Scene1, Layer=Layer 3, frame=1,
Line1
Statement must appear within on/onClipEvent handler
shape.swapDepths(_root.getNextHighestDepth());
i'm using this code:
shape.swapDepths(_root.getNextHighestDepth());
//shape is a movie clip
stop();
this.attachMovie('bcPlayer','bcPlayerInstance',this.getNextHighestDepth());
//bcPlayerInstance._xscale = 75;
//bcPlayerInstance._yscale = 75;
bcPlayerInstance._y = -50;
bcPlayerInstance._x = -5;
//bcPlayerInstance is a movie clip
please help anyone knows what i'm doing wrong>>Actually swapDepths can take either a moveclip or a
number. That isn't the
>>problem.
So it can! Sorry, just never used it with anything besides a
clip ref, and
even then I really don't use it much as I like to keep track
of things
myself.
Thanks
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
How to assign two states in the Withholding Info W4/W5 US(IT0210)
Hi,
I am using SAP ECC6.0, I am trying to assign two states in the Withholding Info W4/W5 US(IT0210) (one state where he resides and another is work state). i am able to create for one and if i create another one record, the tax area or state field is not enabled only the withholding allowance field is enabled. Can anyone provide me a solution for this.
LakshmiLakshmi,
Tax Area/State field is always not allowed for modification, basically you need to select the state (Subtype) before creating the record in PA30.
Let me know still you are facing the same problem.
Thanks,
Kiran.
Reward points are appreciated. -
Statement must appear within on Handler
Ok. So there are a lot of things asking about this already,
but I keep getting the "statement must appear within on handler"
error when I try to add a gotoAndPlay event to my button...and
reading other peoples problems and solutions has not helped me at
all. I have attached my code, but what I am really confused about
is what I am supposed to call everything.so now I have it attached to a frame in a separate layer
(after reading some other threads) and i'm getting an Expected a
field name after '.' operator. -
Mixing CSS colors and image files from Photoshop for web
Hello,
I recently encountered a web production color issue and wanted to collaborate with other web producers to either inform or to see if there isn't a better work-around....
A web site design has a particular color palette and some elements are converted to HTML/CSS colors (rgb hex values) and other elements must be saved as images--both with the same exact color appearance. We graphics professionals know that generally all images should have the color profile indicated (embedded, tagged) in the image file (e.g., sRGB, Adobe RGB or whatever) in our color-managed workflow so that the color numbers have meaning. For web, I've always used sRGB (the web standard) and tagged the images with the sRGB color profile.
Historically, this probably hasn't mattered because no web browser cared about the image profiles anyway. However, recently, some browsers have started to implement color-management. This is good for pictures and such, but poses a problem for web graphic elements: the images are rendered in the color-managed sRGB, yet the CSS is still rendered outside of color-management (the so-called monitor or "device" profile?). Therefore, if a web page design's color palette is to be honored, the HTML/CSS hex colors must appear the same as the matching hex colors embedded in the images. However, modern browsers now render the colors in the color-profile-tagged/embedded images differently, so the colors on the rendered pages no longer match!
My work around has been to NOT tag (embed) the web-element image files with any color profile and thus cause the modern browsers to do what they used to: render the images without a color profile just like they render HTML/CSS hex colors. Perhaps in the future, there will be an HTML specification to inform the web browser to render all colors (HTML/CSS/images) in a particular color profile. (In my cursory testing, I've found that current Safari and Chrome for Windows 7 do alter the tagged-image appearances, yet Safari in iOS does not.)
Have other web producers run in to this issue and are there more eloquent work-arounds?Hi,
This might help
Serving Static Content on WebLogic and GlassFish | cdivilly
Regards,
Jari -
Referencing CSS from Shared Components/Cascading Style Sheets
Apex 4.0
I've been placing my CSS style sheet in Shared Components/Cascading Style Sheets. And referencing it as follows <link type="text/css" rel="stylesheet" media="screen" href="#WORKSPACE_IMAGES#app300.css">.
For weeks all has seemed to work fine. I make changes to app300.css in Cascading Style Sheets. Clear cache. And see my change.
But suddenly it stopped working. More specifically my updates don't take. I firebug and look at the file under CSS and don't see my changes. app300.css is unchanged. Then I deleted app300.css from Shared Components/Cascading Style Sheets. The file is deleted. No longer in the Cascading Style Sheets panel. But the old file still appears when I look under firebug.
Simply a brain cramp for me. I know this is probably obvious but I can't figure it out.Hi,
If your file still recides in the database, you might want to try deleting it with a procedure from the wwv_flow_api package:
set serveroutput on
declare
l_security_group_id number;
begin
select workspace_id into l_security_group_id
from APEX_040000.APEX_WORKSPACES;
wwv_flow_api.set_security_group_id
(p_security_group_id => l_security_group_id);
wwv_flow_api.create_or_remove_file
( p_name => 'app300.css'
, p_location => 'WORKSPACE'
, p_mode => 'REMOVE'
, p_type => 'CSS'
commit;
end;
You can run this using SQL developer/ Toad or whatever program you use, but I don't think you can run in the SQL workshop of Apex.
Run it as workspace owner.
First part sets the apex engine to point to the correct workspace id in Apex, change "APEX040000" to match your version of Apex.
Second part is the procedure that should remove your file from the database.
Make sure you commit your changes and try to upload your css file again.
Regards,
Vincent
http://vincentdeelen.blogspot.com -
Identifying three different colors within a single image
Hello everyone,
I recently begun a project which requires me to process the image from a USB camera, and could use some assistance.
Once I get the image I need to determine the center of mass for three different colors within this image. Although this seems to be a relatively straight forward task I ran into a roadblock right off the back.
This roadblock relates to how to properly isolate each of the colors from the image without using too much memory. My original structure had the USB image coming in, and then I would process that image for the three different colors. Unfortunately, this required using a total of four instances of IMAQ create. (One for the acquisition, and three for all of the color threshold images). Although this works it seems a bit inefficient. Allocating memory for 4 RGB U32 images uses a lot of memory!
Visual snippet attached below for aiding explanation
So in a nut shell, I’m wondering if there is any way to improve this, and decrease memory usage. My First thought was to only use two IMAQ create (one for acquisition and one for processing) then, iteratively (for loop, or something of that nature) run the processing image through a processing loop with different threshold parameters for each iteration. My worry is that this will significantly add to the latency of my program.
Are there any others ways to do this that I am missing, or am I on the right track? If you have any suggestions they would be much appreciated.
Thanks,
Taylor S. Amarel
Learning is living.
Co-Founder and CEO of http://3dprintingmodel.com/
"If we did all the things we are capable of, we would literally astound ourselves."
-Thomas Edison
Attachments:
Image Processing.png 77 KBPatrick,
The example you linked does have some characteristics of the system I wish to create. Unfortunately the example does not go into much detail about "labeling particles" by their color value. I have a strong understanding of how image particle analysis works. But fall short when is comes to the most efficient way of doing this. This is more of a optimization question, rather than a image analysis query.
Here is an explanation of what I'm trying to do.
In plain English, I want to input an image and find the center of mass of three color, or color ranges.
Suppose I had this image;
And I want to calculate the center of mass for the Red, Green, and Blue disks. I also need to differentiate the different center of masses. Red_Center(x,y), Green_Center(x,y), Blue_Center(x,y). In a nutshell, Input Image >> Output Three Coordinates.
What I'm trying to figure out is the quickest and most effective way of calculating these values with minimum memory usage. As stated earlier if I process the image for Red, Green, and Blue centers in parallel it would require allocating an image location for each color. This would cause an enormous memory overhead. (1600 X 1200 X 32 bit X 3) Far too much!!!
So I'm looking at a way of accomplishing this without stretching my memory resources dry. I thought that if I put the processing in a For Loop and input an array of Threshold values. (Red, Blue, Green), (1D X 3) then it would process Red, and begin autoindexing the centers. Then it would it would iterate again and process Blue, and likewise index the centers of mass...
Is this the right way to do that, I am a self taught LabVIEW enthusiast so I do not have much experience when it come to building complex applications that require explicit memory management.
Thanks,
Taylor S. Amarel
Learning is living.
Co-Founder and CEO of http://3dprintingmodel.com/
"If we did all the things we are capable of, we would literally astound ourselves."
-Thomas Edison -
Is it possible to change a color within a PDF using Acrobat?
I would like to change a color within a large batch of PDFs.
The color should have been changed in Quark, but now that I'm well into the PDF production cycle, I'm wondering if it's possible to edit the PDF directly.
Apart from color photos, there is only one spot color to be adjusted.The color in the PDF file is a Pantone color created in Quark. I want to replace it with a different Pantone color. Is that what you mean by an "arbitrary replacement"?
The entire document is black and white plus this color. The file was exported as a composite process black plus a spot color.
I can open the PDF as a text file and I see that "CustomColors: (PANTONE 267 C)" appears twice, as does "CMYKCustomColor: .842 .987 .002 0 (PANTONE 267 C)" but replacing them with their counterparts in a document that is the same except for a different spot color has no effect.
Any suggestions? -
State transitions within components
Hi
Im having troubling getting a button within a custom component to change the state of another custom component. For example, I have custom component A and custom component B within a page of my application. I want a button in custom component A to change the state of custom component B. When i try to select the state to transition to its not in the drop down list. Is there a way I can edit the source code to make this work?
thanks,
Luke.Hi Luke,
There isn't a way to do this from the Flash Catalyst UI currently. If you import the project into Flash Builder, there are a number of ways you can do it in code. Here's the simplest way:
1. In your Main.mxml file, assign an id to the instance of the component you want to control (in your example, Component B), like this:
<components:ComponentB x="100" y="100" id="compB"/>
(If it already has an id, just note it down and go to the next step.)
2. In the ComponentA.mxml file (which should be in the "components" folder in your project), add a click handler to the button, like this
<s:Button label="Click me!" x="100" y="100" click="FlexGlobals.topLevelApplication.compB.currentState='StateName'"/>
where StateName is the name of the ComponentB state you want to switch to when the button is clicked. (If the instance of the component in Main.mxml already had some other id, just use that here instead of "compB".)
Note that while this is the easiest way to do it, it's not the cleanest. A better way to do it is to have ComponentA dispatch an event when the button is clicked, and then have the application handle the event by changing ComponentB's state. That's a little more code though.
Let me know if this doesn't work for you.
Thanks,
nj -
How to Include More Than One Font and Font Color Within a Fluid Grid Div Tag?
Using CSS code, I can make all the words within a fluid grid div tag the same font, font size, and font color, but how do I make a few of the words different?
You can style the basic text and heading selectors with CSS:
p { }
h1 { }
h2 { }
h3 { }
h4 { }
etc...
And you can make classes:
.red {color:red}
.highlight {background-color:yellow}
Then apply classes to your text or sections of it using the HTML properties panel.
<div>
<p>This is a default paragraph style.</p>
<p class="red">This is red.</p>
<p class="highlight">This is highlighted.</p>
<p>Default style with <span class="red highlight">red, highlighted text</span> and normal text.</p>
</div>
Incidentally, this will work in any layout.
How to Develop with CSS?
http://phrogz.net/css/HowToDevelopWithCSS.html
Nancy O. -
How do I call a state change from within a view
Hey guys,
I think I might understand how to do this, but I wanted to run it by the forums to see if I understand it correctly..
So I have a base view (base.mxml) which contains 3 separate 'state' view components - like thus...
<s:states>
<s:State name="MinimisedState" />
<s:State name="MaximisedState" />
<s:State name="LoginState" />
</s:states>
<view:MinimisedView includeIn="MinimisedState" width="100%" height="100%" />
<view:MaximisedView includeIn="MaximisedState" width="100%" height="100%" />
<view:LoginPane includeIn="LoginState" width="100%" height="100%" />
Apologies if this sounds like a gumby question, but how do I get the LoginPane state/view (to dispatch an event) to tell the base view (container) to change states? Say to MinimisedState or MaxmisedState.
I'm sure this is something really simple, and I don't have a problem doing this when all the states are registered/contained within the same base MXML file - but when it comes to passing events up to the parent (from seperate external mxml views/components) i'm a little confused.
Any help appreciatedIf I understood your question correctly, there is a tutorial on that in 'Flex in a Week' :
http://www.adobe.com/devnet/flex/videotraining/flex4beta/index.html
It covers dispatching events from custom component to main application.
HTH
FTQuest -
ADF Faces: Background color of components?
Hi,
In my application I use panelPage component to get a basic layout. From [1] I know that I can use several facets wo place my components on special places.
I tried this with the "search" facet as well as the "infoSupplemental". Both have a different background color. When I add selectOneChoice or commandButton components, they have a white background box around them. How can I tell the components to match the background color of "surrounding" component.
Regards,
Stephan
[1] http://download.oracle.com/docs/cd/B25221_04/web.1013/b25386/web_getstarted004.htm#CHDCJCGFWell, seems like the CSS parser does not expect inherit as a colorvalue :) Is this a known bug?
oracle.adfinternal.view.faces.style.PropertyParseException: Invalid color: inherit
at oracle.adfinternal.view.faces.style.util.CSSUtils.parseColor(CSSUtils.java:196)
at oracle.adfinternal.view.faces.style.CSSStyle.parseProperty(CSSStyle.java:116)
at oracle.adfinternal.view.faces.style.BaseStyle.getParsedProperty(BaseStyle.java:163)
at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.TecateRenderer._parseValue(TecateRenderer.java:535)
<af:commandButton inlineStyle="background-color:inherit;" text="#{bundle.search_action_save_label}" />
Maybe you are looking for
-
Storage size too small for what I pay for (20GB) after setting up PC App
When I downloaded the PC app so I could access my iCloud the space went from 20GB to 5GB. I pay for 20GB of space. I used the same apple ID. Now on the PC I keep getting the warning that I an running our of space (5GB).
-
How can I duplicate a control in a subVI using the reference?
Here's what I want to do. I have a tree control in my main application. I add and delete items dynamically based on user input. If I pass my tree reference to a subVI, I can add, subtract and reorder the items in the tree and the changes are shown on
-
My iTunes card said that the number is invalid but I have checked it several tomes
My iPhone 5c will not redeem my gift card
-
SF300 LAG port doesn't work, LACP will not enable.
I'm trying to configure something that seems pretty trivial. I need 2-3 ports to participate in a LAG port. First off, I get the "Port X belongs to a vlan" if the participating port is something other than access vlan 1. This is totally useless.
-
How can i set the sort order that Apple TV uses to display the foto's from iCloud. I made a shared album, but the sort order is totaly diffrent. My AppleTV is up to date.