ActionScript 3 :: How To Use Skin From Main Application In Flex
Feb 11, 2012
I have an application with a SWF loader. From the loaded SWF file, I'm accessing public variables from the main application with this:
[Bindable] public var global:Object = FlexGlobals.topLevelApplication;
Alert.show(global.myvar);
This all works perfect. I have a MXML skin file (for buttons) in a directory called 'skins' in the main application. Is it possible to use this skin in the child applications?
I've already tried this, unfortunately not working:
[Bindable] public var global:Object = FlexGlobals.topLevelApplication;
<s:Button label="My Text" skinClass="{global.skins.menuButtons}" />
And this, but then it can't compile anymore:
[Bindable] public var global:Object = FlexGlobals.topLevelApplication;
<s:Button label="Button 1" skinClass="global.skins.menuButtons" />
<s:Button label="Button 2" skinClass="FlexGlobals.topLevelApplication.skins.menuButtons" />
Is it possible what I want in another way or do I have to copy the skin to the all the projects where I want to use the skin?
View 1 Replies
Similar Posts:
Jul 4, 2011
Is there a way to get a list of all the skin classes that are in the current application? I'm using Flex 4.5.1.
Here is the loop that I'm using now to get all the skins,
for each (var item:Object in styleManager.typeHierarchyCache) {
for (label in item) {
if (label=="spark.components.supportClasses.Skin" ||
[Code]....
The reason why is because I want to list all the skins in the application and then be able to apply them in real time so I can see what they look like.
View 1 Replies
Dec 21, 2011
I have a custom skin class that I want to apply to all scrollbars. Is there a way to set this globally in a Flex Spark application?
View 3 Replies
Aug 4, 2011
How I will be back in Login Page after click of logout which is in application's component.
Project.mxml
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
[Code]....
View 2 Replies
Mar 31, 2011
i used systemManager.addEventListener in sub application...... it is working well....but when i load sub application into main application through swfloader it doesnot working..
View 1 Replies
Jan 19, 2010
I've created a client with login acces in Flex. After the succesful login i have to show a table based on a mySQL server. The database is composed by some tables, and I have created 6 flex mxml components with each own scripts for each of those tables. How can i load sub-applications, for example with a PopUpButton or a TabBar in the main application?
View 1 Replies
Mar 15, 2011
SkinParts are a great way to add event handlers and logic to an object that is instantiated in the skin, away from any business code. Often, though, I find myself wanting to do the opposite, and define parts that will be used in reusable, skinnable containers in the parent mxml files which will be inserted into the skinned containers.
What's the best practice for when you want to be able to define a control and a skin which can be reused with different controls inserted from outside the skin? Edit: A better way to put this might be that I want to use something that works a little bit like a SkinnableContainer, but that isn't limited to one area where content can be placed.
View 1 Replies
Feb 10, 2012
I extend Button to create ImageButton, and I extend ButtonSkin to create ImageButtonSkin. But, when I define hostComponent like this:
public var hostComponent:ImageButton
I get an error that there is a conflict with hostComponent:ButtonBase inside the ButttonSkinBase. How do I extend a skin AND provide a new hostComponent for it?
View 1 Replies
May 14, 2010
How can we embed the over,up,down etc skins defined as sybols in a .swf file... i mean in skin file how can i specify those symbols to be used as up,over,down skins.
View 1 Replies
Apr 30, 2010
I made a login component for my flex 4 application, and i load this component from my main flex application with:
<ns1:Login id="page_login" visible="true"></ns1:Login>
Now i want to change the visibility from true to false, from the login component.
View 1 Replies
Jun 21, 2010
I am new to Flex. I am trying to add a scroller in my main application/windows. Is that possible? I found out it is possible to add scoller bars in DataGrid, like horizontalScrollPolicy="on". How to implement it in containers like Group,Panel and etc?
View 2 Replies
Jun 22, 2011
I have a List with TextInput as item renderer. I want to get the value entered in the TextInput (form the TextInputItemRenderer) and pass it the main application to do some checks(upon tapping enter on the textInput -- see code below).
I know that we can do it thru dispatching event but I still don't understand how to pass a variable from the ItemRenderer to the main app.
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
[Code]....
View 1 Replies
Jul 19, 2011
So I'm using a custom auto suggest component that I found online at [url]... The background color for the item is set within the following folder[code]...
I use this component from within a component I created called "position.mxml" that is located in a folder named "modules". Is there any way that from the position module, I can change the background color of the autosuggest box?
View 1 Replies
Mar 27, 2012
i have a component which gets the data selected by the radio button
<mx:itemRenderer >
<fx:Component id="radio">
<mx:RadioButton selected="false" useHandCursor="true" change="item_changeHandler(event)">
[code]......
View 1 Replies
Jul 20, 2010
I've got a module, MyModule which requires a large library:
<mx:Module>
<mx:Script><![CDATA[
import com.huge.library.AwesomeThing;
var myThing:* = new AwesomeThing()
]]></mx:Script>
</mx:Module>
And that large library isn't referenced from my main application, except through MyModule
[Code]...
View 2 Replies
Aug 4, 2011
Im a complete beginner in Flex programming. I have an application with a main .mxml file, and a certain class Foo that I call from the .mxml. In Foo, I make a URLRequest and listen for the Complete event. Then I found myself with the returned data in a Foo function, but I have no idea how to communicate it to the .mxml part of the application ! I looked into ArrayCollections but I can't seem to understand how they work. Isn't there a way to modify, from inside the class, a variable with a global scope ?
View 5 Replies
Aug 8, 2011
I would like to send variables or parameters from Component to Main (MXML) Application. Like my component is FileUpload.mxml and would like to forward the uploaded file details from FileUpload.mxml to Main.mxml.
I tried the following procedure :
com:FileUpload id="fp"
to get the reference for the FileUpload component, however, I am unable to get the variables from the FileUpload.mxml file.
View 1 Replies
Dec 3, 2011
I have the following problem of how to display another mxml file as main view of application For example, lets say I have main.mxml displaying as main window. When I click button I want to display another mxml file lets say newMain.mxml and close main.mxml
View 1 Replies
Feb 22, 2010
I know that the best way to make a connection from my main app to my modules is through interfaces.
So, my problem is, how can I implement an interface so my module can send and receive data from my main app?, cuz, I understand that my module implements an interface that is used by my main app.. but, can I do it "viceversa"?
Other issue I have is, why do I need to call my main app children if I can just import a module's class?.
View 1 Replies
Apr 16, 2010
I'm implementing a Flex application with several modules.I'm reusing the same component in all these modules.I was wondering if I'm correctly importing it in each mxml module definition: xmlns:hillelcoren="com.hillelcoren.components.*"Should I import it only once, in the main application mxml instead?
View 1 Replies
Sep 13, 2010
I need to be able to call a method from a component located under the main application in Flex 4. Can anyone tell me please how to do this without using FlexGlobals please?[code]
View 3 Replies
Dec 20, 2010
In my main application I have a viewstack with 3 child views. In the viewstack change handler, I programmatically change the selectedchild property.
I understand that the initialize method for the view is not called every time I change the selectedChild Property. So I tried to invoke the init method programmatically too..
view1.mxml
<fx:Script>
<![CDATA[
[Code].....
View 2 Replies
Sep 1, 2011
I have a main application that contains a list, using a custom itemRenderer to display data.
I would like to be able to call a function, inside the itemRenderer, from the main application.
When running the app, we have a list with three persons, and a button. I want to call the function myItemRendererFunction() inside the itemRenderer, of the selected item in the list, all this, from the main app.
[Code]...
View 1 Replies
Apr 9, 2011
It's my understanding that view states can be useful when switching the layout of design elements. Such as, a loading page as one state and the main application design in another state. Is this the correct use of them? Additionally, I have a label in State1 and I cannot figure out how to access that label via actionscript. labelID.text = "New Text"; is not working.
View 2 Replies
Jun 10, 2011
I'm using the default CS4 FLVPlayback skin, mainly the SkinOverPlayMute.swf. I know there's a skinAutoHide option, but because I don't want it to auto play, I want people to see a play button when they first encounter the video (so they don't think it's just an image). But the skin needs to hide when the video is actually playing (so the video doesn't get blocked by the controls).
In other works - when video isn't playing: skin showing; when video is playing: skin hide.
View 1 Replies
Feb 26, 2011
My client wants SteelExternalAll as the skin for her swf. It's not on the skinning menu in CS3. Is it possible to download it somewhere?
View 2 Replies
Jul 25, 2011
I'm trying to change the background color on a textinput component in flex 4. I've been able to change some of the appearance by messing with the canned code flash builder generates for the sparkskin but for some reason, background does nothing.I'm just trying to make the background black. I changed the background color but it's not working:[code]
View 1 Replies
Mar 12, 2010
what is the difference between skin and CSS??Why it is better to use skin over CSS in Flex.
View 2 Replies
Jan 26, 2011
There's an HTML technique known as innerHTML that allows Javascript to add/delete/edit HTML elements. Can actionscript do something similar to MXML?
For example, my main application's mxml part is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Button x="29" y="347" label="Button"/>
</mx:Application>
But after running an actionscript code, I want the user to see the result of:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Button x="29" y="347" label="Button"/>
<mx:RichTextEditor x="183" y="24" title="Title">
</mx:RichTextEditor>
</mx:Application>
Is this possible with Actionscript inside a MXML file? p.s: is this possible with Degrafa library elements?
View 1 Replies
Oct 22, 2011
i like to know that there is way to remove all data after unload swf .Calling Loader.unloadAndStop(); remove content and loaded bytes , but loaded classes stays in application domain .If i load it to separated new ApplicationDomain , gc is going to collect them after unload and remove all references ?
View 1 Replies