"resetting" a skin in ActionScript at runtime?
Is there a way to "impose" a skin at runtime via a
function? I'd like to be able to "reset" my components back to their originally-skinned status when clicking a particular button.
Thanks.
Hi,
Use the skin setter ie
myComponent.skin = mySkinClass
Similar Messages
-
Flex 4 Migration: skinning, and Actionscript
Hello,
I've been researching about this topic, but I wasn't able to find any examples on "how to skin in flex4" using actionscript. I'm trying to make a simple test, just load an image inside a container and set the borderSides properties. This property, and many others, are missing from flex 4 "by default", now I have to create/define a skin and code it using Line graphics components, is that correct?
anyways, my "real" (probably not the smartest but...) I've been struggling around this problem for a couple days:
- How do I migrate from Flex 3 (css styles and other stuff) to Flex 4 (skins), BUT I don't want to use mxml files, I'd like to keep everything written in actionscript in my application. It has to be feasible but I couldn't figure out how.
Thanks in advance
RenanThanks for the help, we managed to do a skin in actionscript.
Can you help me with two other issues, I'm still not comfortable with this Flex4 transition:
Is it possible to load/add an image to a group from the container (in actionscritpt), or you can only do that using skins?
Can I inherit skins like other classes? For instance: I have a skin to draw borders and another to draw an image, can I extend it to "merge" these two behaviors, border+image.
Thanks
renan -
Hi everyone,
im looking for good Skinning examples in Actionscript for mobile projects. Adobe recommends to do skinning for this purpose only in actionscript but most of the examples on this website and most of the code in the provided example flex mobile apps are in MXML.
Are their anywhere more examples and/or tutorials besides (http://www.adobe.com/devnet/flex/articles/mobile-skinning-part1.html) about skinning, or do you know good blogs about this topic?
Beside that i have the problem that i cant import "spark.skins.mobile.*;" in my project, because its a libary project. It only works in a mobile project, how can i fix this?
Regards,
ChristophI caught your sarcasm, but not your point...
My apologies. Points are better understood when in your own head.
My point was that MXML skins are used for the same reason we are not all still programming in assembler (except of course in those instances where it makes to use assembly, such as embeded systems). Yes, it is slightly less efficient to use a declarative language like MXML for skinning than it would be to write a highly optimized version in Actionscript (or assembler, if you want to follow that same logic).
However, in most cases the preformance impact is negligable compared to the advantage gained through rapid development and easy work flows between designers and engineers. As long as the preformance loss is not noticble to the end user, who cares if it is slightly less efficient? Since the preformance loss IS somewhat noticable on mobile devices, then perhaps a different strategy that takes longer to implement could be justified. Although, it is possible to use MXML in a way that is pretty damned efficient... after all, it's nothing more than a factory pattern applied at compile time... -
How to output actionscript at runtime in a text box
Hi , i need help in displaying my code at run time, I need to
dispaly my code in a text box when the program runs.
I guess something to start would be output_txt.text. then i
need to call my own action script. but not sure how...Hi
code is active and only in the program .fla not stored as
file on its own( not as a text file.txt)
Cheers
Chris -
Add a button to a FLV Playback skin
I'd like to add a button to an FLVPlayback skin. This button
should shrink the size of the VideoPlaceholder and display a menu
to the right of it (I'll need help with this too, but one step at a
time). I've been able to put a button into the skin, but it'll only
show up when I vies the skin file itself, not when I use it AS a
skin for the FLVPlayback component. How do I get it to appear?
[edit]I'm using a normal button, but I've noticed that the
buttons in the skin are individual graphics tied into the skin
using actionscript. Do I have to do something like this?
[edit2] I've got Flash CS3 and am trying to use AS3I don't clear your questions
Regards,
nha khoa
nhua
gia cong
nhua
gia cong chi
tiet
khuon mau
thiet ke web
do dung cho be -
Can I programmatically change the printer paper size from ActionScript?
Hi,
I'm a newbie Flash/ActionSript developer and I have been searching for answers for a while with no luck. I wonder if I can get some pointers from this forum.
I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip.
According to the ActionScript online API spec ( http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00002066.html), I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting. Maybe I missed something here. Can somebody help me out?
Thanks in advance!check your duplicate thread.
and, please don't cross-post. -
Can I programmatically change printer paper size from ActionScript?
Hi,
I'm a newbie Flash/ActionSript developer and I have been searching for answers for a while with no luck. I wonder if I can get some pointers from this forum.
I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip.
According to the ActionScript online API spec ( http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00002066.html), I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting. Maybe I missed something here. Can somebody help me out?
Thanks in advance!you can't change the paper size used in client side printer.
-
I'm looking for a reference on deploying Skins with ADF Faces. The published howto on OTN is'nt very helpful because the sample code link is broken (See my previous post). The JDeveloper help files are somewhat helpful but I'm looking for a working example. I'm following the technique as implemented in SRDEMO but I must be missing something as my style sheet changes are not showing up.
It would be nice if someone from Oracle could look into fixing the link to the sample code for:
http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/index.html
I think if I had a working example that allows skins to change at runtime I would be able to figure out what I'm missing. I have been trying access the link for a couple days now and no one has reponded to any of my requests.The link to http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/adffaces-skin.war
seems to work for me.
In any case to change the skin you are using you change the adf-faces-config.xml file.
To get it to change at runtime - just put a reference to a value in a backing bean instead of the fixed "oracle" and then change the value in the bean at runtime. -
Working with WebCenter Portal & ADF Skin Editor Together
Hi all.
I want to ask to webcenter community developers about the best practice to work with ADF Skin Editor for WebCenter Apps.
I usually deployed my ADF Skin JAR Libraries as Shared Libs and consumed them from pure ADF Applications without problems.
However, in WebCenter Portal Framework Applications resources are readed at MDS Path: /oracle/webcenter/portalapp/skins/... (like portal-skin.css) or at the shared lib called oracle.webcenter.skin
My objetive is to provide more Skin's to WebCenter Portal Application from ADF JAR Librarys created by ADF Skin Editor and be selectable (like /oracle/webcenter/portalapp/skins/... resources) in Runtime in Administration page.
How can i achieve it easly? (Please don't provide off doc, i read it).
Have i to override SkinPhaseListener of WebCenter to read from another locations?.
Thanks.Hi.
Finally for WebCenter Portal Applications we are using ADF Skin Editor as support to skin ADF Components.
When we've got our skin defined in ADF Skin Editor then copy to CSS file under MDS folder (/oracle/webcenter/portalapp...) and create a Portal Resource of it.
If you want to deploy your ADF Skins as Shared Libs or included directly to WebCenter Portal App as ADF JAR Library then you'll see that they don't appear at Runtime to be selectable in admin page.
If you want these skins be selectable at runtime you have to register them in generic-resources.xml manually.
PD: Setting trinidad skins at "FINEST" level debug you can see what trinidad-skins is WebCenter loading.
I hope this help you.
PD: Your problem is little different because you are in WebCenter Spaces.
Regards. -
Image control runtime creation issue
I am having problems getting the Image control to actually
display the image I specify in the source property. The Image
control is created in actionscript at runtime based on XML returned
by an HTTPService request. I have a canvas that I want to populate
with Label, Text, Image, LinkButton, etc. controls based on the
contents of the XML file that is read in, so I have to create all
the components on the fly and use something like this:
var newImage:Image = new Image();
newImage.setStyle("source", "images/myImageFile.jpg");
myCanvas.addChild(newImage);
After I get all the newly created components added as
children to the canvas I go back through and do positioning
(something like this):
for each (var child:DisplayObject in myCanvas.getChildren())
//set the y property of each component to the y of the
previous child plus
//the height of the previous child plus 10 px margin
Wherever there is an image in my XML it inserts the 10px
margin for that component, so I know it's creating it and that it
gets added as a child, but for some reason the image is not
displaying and so the height of the component is 0. I even tried
hardcoding the height of each Image control in case the image was
there but it just wasn't sizing right, but it puts in the space
without displaying the image.
What I'm wondering is if there is some method that will force
the Image controls to either load the image or render it. When I
add an Image in mxml and use the exact same source data it displays
just fine, so the file path is correct. I also have the same images
being read in from XML off the HTTPService that are showing up just
fine in a TileList where my itemRenderer component has an image
with the source set to the same path as I'm trying to use in the
runtime-generated Image controls.
Also, as a side question, does anyone know why a lot of the
properties/methods available from mxml specified comonents aren't
available when you create variables of the same type in
actionscript? For example, if I have
<mx:Image id"img"/>
I can go back in actionscript and reference img.source just
fine. On the other hand, if I declare an Image in actionscript,
thus:
private var asImg:Image = new Image();
and then try to refer to the source property like so:
asImg.source
it doesn't show up in the code hinting and it also throws an
error on compile (reference to a possibly undefined property source
for bla bla bla)
Actually, I've noticed that a lot of the properties and
methods of various components aren't available when they are
actionscript rather than mxml. I didn't see much in the
documentation on the difference or what could be done to work
around it.
Thanks much anyone who has input.Ok, got it.
I figured that since the <mx:Image> renders just fine
and that the ActionScript Image object doesn't that I'd just create
a custom mxml component with Image as the base element and with
nothing else in it. Then I add an instance of my custom image
component in AS whenever the XML specifies one. The layout was a
bit of an issue, but I just added the image dimensions as
attributes in my XML and size the CustomImage component based on
those.
Must be some subtle difference between the mxml and AS Image
classes that isn't documented very well. -
Custom Movie controls/Actionscript 2.0
Whats the easiest way to import video and make your own skin
using actionscript 2? it's great that the FLA is only one frame but
How can I link up buttons I have made? Do I put actionscipt on the
button or the frame? I know I can choose a skin and have it work
but I want to create my own and I have. Please help.Nothing of your code shows anything wrong... I confirmed this
by taking it and recreating what it involves... 2 movieclips, one
for the text image and one for the scroll control. So there is
probably something else that is causing the issue.
If it is not a standalone file, meaning there's other stuff
besides this scroll piece, try recreating it as a standalone file
as I did and see if it still acts up. -
Resetting my HP Pavilion G Series laptop after Free Windows 10 upgrade..
I recieved the upgrade for the free Windows 10 upgrade on my laptop and upon restarting it the first time I noticed that all the icons and background were gone and the only thing on the black screen was my Advanced System Care Pro Performance Monitor that is always pinned to the desktop luckily, since its the only way to restart my laptop now. I have to restart my laptop 3 times before any icons show up on the screen and then I have about 5-10 seconds to quickly hit the new Windows Start button and then the Settings button and quickly hit the Firefox Logo that is also luckily still working. As soon as I get these two things open the icons and background stay up for a bit longer, (maybe 20-30 seconds) then the icons and back ground and apps start flashing in and out in what I have only guessed is the two operating systems are competing because I can only open certain things in Settings menu like Device Manager (which is greyed out) and when clicked brings up an error that reads about a missing element, although, if the icons are still flashing the Device Manager will become black and I am able to click it but I have to get it just right when its flashing to black which I have to do in the 20 seconds. Also, when I try to click the Reset this PC button I can only click it when the icons are still flashing in that 20-30 second window so I have to get there quickly. Firefox works normally at least. I've posted my issue and the Microsoft Community boards but no one has even tried to answer yet. I want to know if I reset the laptop will it reset to a clean Windows 10? Will that list of all the HP and pretty much every app on the computer going to keep it from working because my grandmother recently passed away and left me her laptop and it doesn't have any disks with it so I can't put all the those apps back on if I do reset. I also get a Runtime Error when I unplug the power cord from the laptop. I have tried various things like downloading Legacy drivers, new AMD Radeon drivers, all drivers are up to date, starting in safe mode, starting from different boot modes with only start up apps, tried to manually disable apps from the Device Manager one by one, and nothing has worked or changed what is happening. Any help would be greatly appreciated.
Ok if i were you I'd roll back the installation as I suggested ro whatever platform you were using prior to the windows 10 upgrade. But if you want to spend the time trying to get to the bottom of it then you could refresh the windows 10 installation while having your machine disconnected from the internet if the problem returns while disconnected from the internet then there's some issue with the windows installation on your machine itself and if I were you I'd roll back to your previous installation and leave it a couple months till they work the bugs out. BUT IF THE MACHINE WORKS FINE DISCONNECTED THEN I WOULD SUGGEST YOU TURN OFF THE AUTOMATIC UPDATE FOR YOUR DISPLAY DRIVERS AS DETAILED IN MY OTHER REPLY. But if you can't be bothered figuring it out with trail and error and just want to roll back so you have a properly working machine so you can investigate this properly for yourslef then rollback using these steps. CLICK ON START AND SELECT SETTINGS CLICK "UPDATE &SECURITY" CLICK ON "RECOVERY" AND THEN "GET STARTED" if you can get back to your original installation you can at least then take a note of drivers and their versions and research to see if anyone else has any specific issues with your machine type - I moved up from 8.1 and only had one minor issue and they only people i've seen complaining about major issues are those who upgraded from windows 7 so it maybe worth rolling back so you can at least get more informed. Also before I ran windows 10 I ensured that all the windows updates had been done before hand and that all HP system drivers were done before too. I'm sure this aided my transition but as i commented those who seem to be struggling are those on older hardwares. Let me know if you get it sorted.
-
How do you set a component back to the Default Skin?
I have a title window and have applied a minimize button
skin... I need to reset the skin Back to the Default skin.
Code to skin the button to minimize.
setStyle ("closeButtonDisabledSkin", MinDisabledSkin);
setStyle ("closeButtonDownSkin", MinDownSkin);
setStyle ("closeButtonOverSkin", MinOverSkin);
setStyle ("closeButtonUpSkin", MinUpSkin);
How do you reset it to the default close button skin?The only way that I've been able to do this is to create your
own style for the close button state.. Basically create your own
styles for everything.. because I don't think you can toggle
between yours and Flex's -
Get rid of rounded corners in Flash flv player skin?
Hi,
I'm using Flash CS3 on Mac OS X creating a couple of clips.
Regretfully,
the default flv player skins in CS3 all have rounded bottom
corners. As
the site's entire layout is very "square", these corners are
standing
out like sore thumbs.
I suspect that there has to be a parameter somewhere within
the swf-file
that takes care of this, but I haven't a clue, really.
Can someone please explain how to make the corners square
shaped?
TIA
MacaroniFrom the Flash help:
The best way to create a skin SWF file is to copy one of the
skin files that come with Flash, and use it as a starting point.
You can find the FLA files for these skins in the Flash application
folder in \en\Configuration\FLVPlayback Skins\FLA\ActionScript 3.0
To make your finished skin SWF file available as an option in the
Select Skin dialog box, put it in the Configuration/FLVPlayback
Skins/ActionScript 3.0 folder, either in the Flash application
folder or in a user's local \en\Configuration\FLVPlayback
Skins\FLA\ActionScript 3.0 folder.
Or, you can completely make youre own buttons and asign them
to the FLVplayback as controlls with actionscript. For example:
myFLVplayer.stopButton = myStopButton;
myFLVplayer.playButton = myPlayButton; -
How to call a SAP service from adobe flex
Hi experts,
I need to call a webservice create from SAP BAPI my URL is: http://xxxxxxxxx:8000/sap/bc/srt/wsdl/bndg_DD90E166ACE1B1F18AD8001B789FF0AD/wsdl11/allinone/ws_policy/document?sap-client=200, with this URL I can test the webservice from WsNavigator.
The operation is ZimrfcVerifOtUbica and the input structure is:
ZimrfcVerifOtUbica
> PiNumeroAlmacen (input parameter)
> PiOTransporte (input parameter)
The output structure is:
ZimrfcVerifOtUbicaResponse
>PoMessage (output parameter)
I've created a view with two inputfield (one to PiNumeroAlmacen, one to PiOTransporte), one button and one label (to put the result value).
but I don't know how to call the WS, I tried with this code:
<mx:WebService id="ZCCONVERTERService"
wsdl="http://xxxxxxxxx:8000/sap/bc/srt/wsdl/bndg_DD90E166ACE1B1F18AD8001B789FF0AD/wsdl11/allinone/ws_policy/document?sap-client=200;" useProxy="false" >
<mx:operation name="ZimrfcVerifOtUbica" resultFormat="e4x">
<mx:request >
<PiNumeroAlmacen>AGR</PiNumeroAlmacen>
<PiOTransporte>01000</PiOTransporte>
</mx:request>
</mx:operation >
</mx:WebService>
and I get this error: [RPC Fault faultString="Could not load WSDL" faultCode="Server.NoServicesInWSDL" faultDetail="No <wsdl:service> elements found in WSDL at ."].
I tried with actionscript and runtime library but I get this error: java.lang.Exception: Unsupported element in WSDL file: UnknownExtensibilityElement
I tried put in Data--> Import Web Service and I put the URL and I get Unable to load the WSDL. Specify another URI.
Other thing is for this webservice I've created a logic destination, and this webservice is used in a webdynpro aplication and works correctly. But now I need to use the same webservice in flex.
Could you help me to call to this webservice?
Thanks in advance.
JoseI have could do it, but now I'm trying to do the same with a SAP standard service.
Any idea?
Regards,
Jose
Maybe you are looking for
-
Why do some podcasts stop playing & how do I fix it?
Hi. I seem to have a bug with some of my podcasts. I subscribe to a few and I've noticed that sometimes there will be a "bug" in a particular episode which means it just stops playing at a particular point in the item - this can be at the beginning,
-
How do I find and reload the music that is missing from my iTunes Library
I lost over 2000 tracks in my iTunes Library They were still on my iPhone but now that I have upgraded to a new iPhone I can't load them onto the new phone Help
-
HOW CAN I ADD FOREIGN RADIOS TO ITUNES?
HOW CAN I ADD FOREIGN RADIO STATIONS TO ITUNES? I HAVE NO URL'S. I HAVE THESE STATIONS IN MY BOOKMARKS BUT WANT TO CONCENTRATE THEM ALL IN ITUNES. THE GENIUSES HAVE NO ANSWER NOR DOES APPLE VIA TELEPHONE.
-
SCOM 2012 SP1 - Scheduled Report not showing any chart
We have created 2 Scheduled Reports based on the Performance and Performance Details reports. The Scheduled Reports run every day and create a PDF file in the file share. The Reports however don't contain any charts. Selecting other output formats gi
-
Hi , Can anyone tell me how to add a node to the tree in the left navigation window of TCODE : ABAPDOCU.. Helpful answers will be rewarded.. Thanks in Advance..