***********************************
(For Flash Player 9.0.124 and Flex 3)
***********************************
Basic scenario: I have a webservice, wsdl and crossdomain.xml file in a secured directory (using basic authentication) in one domain and my app.swf is on a different domain.
I want to call a webservice from my app.swf without a proxy, so what are the potential pitfalls?
Read the rest of this post»
6 Comments »
Last week in this post: http://blog.flexmonkeypatches.com/2008/10/08/flex-make-popup-follow-spawning-component-as-you-scroll/ I demonstrated one approach to on how one could make a popup follow the component that “spawned” it when the component was one of many (but not too many) that was in a VBox with vertical scrolling.
The first approach felt a bit hacky and the showing and hiding of popups as they came in and out of view was a little fiddly. (My demo didn’t worry to much about exact “edge detection” to determine when the edge of a popup came in contact with the edge of the containing VBox…I’ll leave that to you if you decide to use that approach.)
I came up with a second approach that feels a little cleaner.
Basically, I overlay a canvas on top of my VBox and “addChild” popup components to the canvas (NOT using popupmanager) and scroll the canvas along with the VBox. Setting the isPopup property of the popup component allows me to drag the component around like you can a true popup.
Check out the sample and the code:
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
No Comments »
A while back I had a request to show how one could make a popup follow the component that “spawned” it when the component was one of many (but not too many) that was in a VBox with vertical scrolling (kind of a “poor man’s” list control – which sometimes does have it’s place
).
I actually came up with 2 solutions. The first I’ll post here. The second, I’ll post next week (after I clean it up a bit).
In the first solution for each component added to the VBox that spawns a popup (via the popupmanager) a listener is added to react to the scroll event of the VBox which repositions the popup and additionally detects when the popup moves outside the bounds of the VBox, toggling it’s visibility to make it appear to “tuck under” the VBox as it’s spawning parent scrolls out of view.
That is quite a mouthfull, but the sample and code will make it more clear:
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
2 Comments »
I just published a new “Monkey Indexed Page” (see here if you don’t know what I’m talking about).
The page is a collection of good resources on tooltips.
Here is the main Monkey Index page.
Here is the tooltip page.
I think once I reach around 5 pages, I will create a new feed just for the Monkey Index, so I don’t have to post new blog entries just to announce a new page…but until then…oh well.
-Kyle
No Comments »
Earlier this week I was helping a customer trouble shoot a webservice crossdomain.xml issue.
I pointed him to a blog post I published a while ago as a reference on how to code webservice stuff in actionscript instead of mxml:
http://flexmonkeypatches.com/flex-webservice-with-auto-repeat-and-increasing-timeout/
I was a little embarrassed to find that my sample didn’t work anymore.
The code was fine and the app worked when the swf was run from Flex Builder (thus avoiding sandbox security issues). I hate saying “do as I say and not as I do”, so I decided to took a closer look.
Read the rest of this post»
No Comments »
A while back I was looking for a canned media player widget for a Flex/AIR app I was fooling with and found this pretty cool dev center sample: Flex 3 Media Widget (the previous incarnation of this was available on labs here)
What made it even cooler were the source files it had for dealing with RSS and MediaRSS feeds.
I was starting to work on a new sample that needed to read RSS and remembered the aforementioned project, but couldn’t remember where I had gotten the RSS libraries from. I figured I would write this blog entry, so next time it will be easier for me to remember.
You can view the source of the app here:
http://examples.adobe.com/flex3/devnet/mediawidget/srcview/
and download a zip here: http://examples.adobe.com/flex3/devnet/mediawidget/srcview/MediaWidget.zip
There is an AS3 library at: http://code.google.com/p/as3syndicationlib/, but I believe the code with the MediaWidget is newer, plus it contains MediaRSS parsing classes. Woot!
No Comments »
Here is a simple sample demonstrating how to achieve a “reverse transition” when using states.
The key is actually setting the target or targets array for the sequence or parallel transition.
Although from the Flex 2 docs, the following are good resources (and in fact the setting of the targets is pointed out in the comments on the docs in the first link:)
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000103.html
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=transitions_080_03.html
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
No Comments »
I have a few samples I am working on to demonstrate how to do some “drag selection” and I thought some of the base code I use in these samples would be good to post on its own.
So here it is. Pretty basic, but it will serve as the basis for a few samples that I should have out next week (hopefully).
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
2 Comments »
I recently had a request to help show an approach for creating a custom “speech bubble” tooltip.
Here is a sample that should help demonstrate the approach.
There are docs on creating custom tooltips and that is essentially what my sample is based upon:
http://livedocs.adobe.com/flex/3/html/help.html?content=tooltips_1.html
The next challenge was to customize the border. I mimicked what was described in the docs:
http://livedocs.adobe.com/flex/3/html/help.html?content=tooltips_1.html
The docs show you how to customize the tooltip border, but since my custom tooltip extends Panel instead, I need to use the skin for the Panel border.
(thus I am using mx.skins.PanelSkin) It is also useful to look at what the parent of that class is doing (mx.skins.halo.HaloBorder).
I basically stole the “tail drawing” bit from the tooltip skin though and just patched it on to the end of the drawBorder method in the PanelSkin.
You may want to make this more robust, but this is just the general approach. (Add logic to determine what side to draw the tail on, what color the tail should be, etc.)
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
13 Comments »
Recent Comments