Commit Graph

290 Commits

Author SHA1 Message Date
Ray Greenwell 7bf440c629 Since these work on urls, allow clientData to be passed in,
which will be the MediaDesc in msoy.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@786 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-03-20 21:56:48 +00:00
Ray Greenwell aa8eea91d3 Added a STOPPED state to indicate that we've reached
the end and are not paused. Support it for FLV and MP3.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@783 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-03-19 00:04:09 +00:00
Ray Greenwell 77d71ce7ed Hacktastic support for making a TextField only mouseEnabled when the mouse
is over a link. Similar in concept to some code that lived in msoy,
but that special code was tied into the RoomView, which just ain't right
for the chat system, and made it not work the same in games.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@778 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-03-04 03:12:46 +00:00
Ray Greenwell 1b14473f25 Added addSeparator().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@777 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-03-03 00:13:13 +00:00
Ray Greenwell bdbe9dab3c Fix the chat input bug.
It's a mystery wrapped in a heisenbug inside sunspots.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@774 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-02-06 02:43:34 +00:00
Ray Greenwell 9e8021cc7e These trace statements have served their purpose. Adding traces to MediaStub.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@773 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-02-06 00:27:09 +00:00
Ray Greenwell ea185ceab0 Attempt to call unloadAndStop(), but remain compileable for flash 9
for the time being.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@772 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-02-02 21:54:31 +00:00
Ray Greenwell 4b4701b4aa Revert to targetting 9.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@771 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-29 20:30:51 +00:00
Ray Greenwell 5aeb5ab0f0 Enable glorious unloadAndStop().
I did some tests with it, and it sure does put the kibosh on things.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@769 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-28 22:30:43 +00:00
Ray Greenwell 45a6e39f2c Ditch createTipLabel, just add another param to createLabel.
No need to avoid overwriting a defaultly-null field value with null.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@767 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-28 02:11:45 +00:00
Tom Conkling 8cddf9ef1b Allow Flash to throw an exception if the input is invalid
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@766 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-27 23:21:19 +00:00
Tom Conkling badfd4b612 Convenience functions
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@765 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-27 23:14:12 +00:00
Ray Greenwell 7db745258e Removed longstanding hack, make this prompt image a style.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@764 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-23 02:13:52 +00:00
Ray Greenwell da084e2c0c Bugfix: overriding flex's internal idea about 'enabled'ness
was a bad idea. Use it.
(Fixes chat semi-disabled for guests.)


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@763 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-22 23:00:17 +00:00
Ray Greenwell e7132a127f Fix for when the items don't have a 'data' property.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@756 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-17 03:17:57 +00:00
Tom Conkling d22fcc041b DisplayUtil.positionBoundsRelative, the general version of DisplayUtil.positionBounds
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@755 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-16 23:25:16 +00:00
Ray Greenwell 45c9ca451e Oh baby, I think I fixed it.
- It seems that the camera gets fakey "locked" at the size it was set to
  when the user grants access to it.
  - Listen for status changes, don't set things up until the camera is
    unmuted.
  - record the size at the time of unmuting.

This all seems to work, but I worry about what would happen if access
to the camera had already been granted when this code runs.
There'd be no way to find out what the size was access was granted.
Fortunately, I believe we only use this code presently in a standalone
appletty-type-thing, so access is always granted in here.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@752 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-14 02:52:27 +00:00
Ray Greenwell ff31994909 Some rearrangement.
Fucking A.
It seems to default back to the size of the last snapshot taken
even if that snapshot was affected by the bug. When you quit and
then come back in, it is "stuck" to the last size. There's
no way to know what this size is.

Right now: logging everything, doing no adjustment.
Let's see if other people have problems, or what.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@751 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 02:24:11 +00:00
Ray Greenwell a0204eb35b And now suddenly it's back to 160x120.
Fuck me!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@750 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 01:28:53 +00:00
Ray Greenwell ee4c68c757 Well, this is heisentastic, and to top everything off it seems to
always act like the size is 320x240 now, instead of what it used to do.
Ack!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@749 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 01:25:45 +00:00
Ray Greenwell 2c60e6c3cf Use the 'enabled' property setter/getter.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@748 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 00:31:01 +00:00
Ray Greenwell 2ae0b63aae Added a setIcon() method to update the icon after construction.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@747 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-29 22:47:36 +00:00
Ray Greenwell 2817021c56 Allow to be used without a command.
Alternatively, I could create a DataComboBox that just does the cool
'data' stuff, and have CommandComboBox extend that.
Comment cleanups.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@746 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-18 01:18:31 +00:00
Ray Greenwell 2d0070a940 I think we used to do this way back, let's try it again.
Smooth our bitmaps.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@745 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-17 01:37:31 +00:00
Ray Greenwell dc06c617a1 Even more superclass style and paradigm matching.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@744 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 01:45:07 +00:00
Ray Greenwell 6eaaf4da01 Ray scratches his own belly.
- Match more closely the usage of labelField in our superclass.
- renamed to getSelectedData and setSelectedData.
- use Util.equals() when hunting for a matching data.
  Because we are not living in adobe's stone age and we
  want Equalable objects to work.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@743 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:50:12 +00:00
Bruno Garcia 7b367ad67b Ray tummy-scratching.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@742 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:36:48 +00:00
Bruno Garcia 8bd9aacc73 Terminologies.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@741 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:33:50 +00:00
Bruno Garcia fb3836d104 get/setSelectedValue for modifying the index based on the data of an option.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@740 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:14:01 +00:00
Bruno Garcia 7ecec007c8 Exposed argName. Public for now, wire up a getter/setter if it ever needs the complexity.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@739 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-12 22:29:52 +00:00
Bruno Garcia 9d6a5f0a4a By default, use "data" as the key in selectedItem to pass to the command. This can also
be specified. If it's null, shoot the entire selectedItem as the argument.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@738 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-12 00:18:44 +00:00
Bruno Garcia dc48461f10 A combo box that when changed, dispatches a command with the current selection as the arg.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@737 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-11 23:38:40 +00:00
Bruno Garcia ae517a93d9 Comment tweak.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@736 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-11 23:37:12 +00:00
Bruno Garcia cd276073a2 Helper to make a multiline text that fills the width of its parent.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@733 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-09 00:34:32 +00:00
Ray Greenwell 22603206cd Added avoidOtherPopups. A hole was rabbitted while I debugged
that assigning to Rectangle.topLeft sets x and y and width! and height!
Gah.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@729 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-04 00:55:18 +00:00
Ray Greenwell 7b3544fd2b - Added setFocuable().
- createField calls it.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@725 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-01 21:12:09 +00:00
Ray Greenwell 714ad7e725 Another SimpleButton derivative for skinning with a bitmap.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@722 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:15:07 +00:00
Ray Greenwell 66386a90af Use toBitmapData.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@721 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:14:47 +00:00
Ray Greenwell cecdbfa320 Added toBitmapData.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@720 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:14:33 +00:00
Ray Greenwell 8584678701 Player BAM5 told me about code his friend Shango wrote, for
extrapolating the total duration of an mp3 while it was loading.
Sure enough: we have length (so far), bytesLoaded and bytesTotal.
So: do that. It works pretty well!

Too bad we can't do something similar for FLVs that don't have metadata.
:( (there is no "current length" property, just a current position.
So any time estimate would get worse and worse as the bytes advanced
past the play position.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@719 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 05:19:38 +00:00
Ray Greenwell be24ecee84 This is referenced by MediaContainer, so it's compiled in,
but we don't actually use it anywhere in whirled.
Made it extra stupid simple: click to play/pause, with no
other controls.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@718 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 00:12:56 +00:00
Ray Greenwell 714aa2adfb We want to ensure we sound out position, so call regular stop()
after we autorewind.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@717 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 00:10:56 +00:00
Ray Greenwell 96c892ce62 Bugfix: don't autorewind if someone seeks to the end while paused.
Feature: if there is no metadata telling us the duration, well then
we're up the old poo river. But what we can do is whip out our
trusty paddle and continually call the highest position we've seen
the duration. It makes playback a little weird, but allows seeking
and so is a step in the right direction.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@716 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 22:07:02 +00:00
Ray Greenwell 73a1102fe7 Simplified. Turns out the x/y coords of the states are honored,
so I don't need to wrap the downState in a Sprite.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@715 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 03:29:58 +00:00
Ray Greenwell 021a49c0ee Do for simple flash buttons what ImageButtonSkin does for flex Buttons.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@714 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 03:02:20 +00:00
Ray Greenwell 93a4814155 Just as clear without this const.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@713 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 16:24:49 +00:00
Ray Greenwell 5bc77aa0d0 Possible type 3 optimization, but well... it doesn't really make the code
weirder, but it does add a bit more code.
( http://smallwig.blogspot.com/2008/04/smallwig-theory-of-optimization.html
  mdb pointed this post out to me.)
It just bugged me that we use this player to play background music
in whirled, and in that circumstance 99% of the time nobody cares about
these events, so why have a timer to calculate and fire them off?


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@712 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 16:14:07 +00:00
Ray Greenwell 526db3bb05 This shouldn't happen, but it did once for me. Heisencope.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@711 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 06:17:09 +00:00
Ray Greenwell ee72820b54 Ouch, I changed that to 25 a while back while testing, but we want 250.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@710 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 05:59:03 +00:00
Ray Greenwell 5161e49bd4 Wow, when you tell a sound to loop, the position just continues
to increase, up past the duration. Seeking in those mode also
causes it to get wiggy and freak out. So don't have flash loop it,
but just loop it ourselves by autorewinding and playing again.
Also, just autorewind and pause if not looping, which I had
wanted to do anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@709 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 05:51:20 +00:00