[Flashcoders] Full screen mode and ExternalInterface
Hey all. It seems that ExternalInterface.call() doesn't work in full screen mode. I have all the right options set on my player embed. It works in normal mode, but as soon as I go full screen it stops calling the functions on the JavaScript side. Is this a known problem, and any workaround for it? I'm on Mac OS X 10.4 with Safari 4.0.2 and Flash Player 10.0.12.36. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] calling an "event" function with a parameter that is a number
On Sun, May 24, 2009 at 2:00 AM, Isaac Alves wrote: > 1067: Implicit coercion of a value of type Number to an unrelated type > flash.events:MouseEvent. > > How could I call the function clickThumb and make it use "image_num + 1" > instead of "e.target.name" ? Do you have the value of image_num already? Why not change the signature of the clickThumb function so it accepts the number instead of the event object? private function clickThumb(image_num:Number):void { ... } Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to embed assets in pure as3?
On Wed, May 13, 2009 at 8:34 PM, ACE Flash wrote: > hi there, I'd like to use pure actionscript 3 to embed my assets in flash. > and use addChild() to add them on the stage. > [Embed(source="/assets/img1.gif" , mimeType="image/gif")] > public var newImage:Class; [...] > var img1:Shape= new newImage() as Shape;; > addChild( img1 ); It should be Bitmap instead of Shape. If you just want to add it, it shouldn't matter so long as you cast it to DisplayObject. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] JSON Experiences
On Thu, May 21, 2009 at 12:12 AM, Gregory Boland wrote: > Does anyone know of a good place to see some AS3 code that uses JSON so i > can see how it works? Using JSON is fairly simple using the corelib library: http://code.google.com/p/as3corelib/ You have to use the encode and decode functions of the JSON class. You could also go a step further and use my JSONObject class, which I find a bit more intuitive: http://manishjethani.com/blog/2008/08/25/jsonobject-for-reading-and-writing-json-in-actionscript/ Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] accessing variables - AS3
On Tue, Jan 13, 2009 at 1:51 AM, Eric E. Dolecki wrote: > I have forgotten how to do this... I'd like to set some variables like this > a var exists... > zAmt > > now I'd like to set the value in a method... > [ stringValue + "Amt"] = someValue; > > How do I compose that? That would be: obj[stringValue + "Amt"] = someValue; where obj is the object that holds the property. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Height and Width of a loaded SWF before it visuallyrenders?
On 1/11/09, Andrew Murphy wrote: > I need an event that fires after the swf does an enterframe, resizing as the > graphics animate, but before the Flash redraws itself. The render event is supposed to get dispatched only if you've called stage.invalidate. Are you doing that from the loading application? > ...I'm thinking what I want to do just isn't do-able. That the new frame of > the swf has to be drawn before the height and width properties update. One of the way to handle this may be to hide the loaded applications at first, let them load and render off screen, and then lay them out based on their final size. I guess you lose the animation though ... but something along those lines. Manish -- http://manishjethani.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Height and Width of a loaded SWF before it visually renders?
On Sat, Jan 10, 2009 at 10:33 PM, Andrew Murphy wrote: > What I'd like to do is access the height and width of the loaded swf files > before they visually render so that I can get them into the correct > positions before the visual render occours. Turn it into a one step > process: icon movie clip changes size and then they are all repositioned by > the scrollbar script. You could listen for the 'init' event from the LoaderInfo object for each loaded SWF. In the init handler the width and height properties of the LoaderInfo object should be accessible. loader.contentLoaderInfo("init", function () { trace("" + loader.contentLoaderInfo.width); // width trace("" + loader.contentLoaderInfo.height); // height }); Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Patrick Jakub Jankun added you as a connection on Plaxo
On Wed, Jan 7, 2009 at 9:31 PM, Joel Stransky wrote: > Sorry I have to rant. For such an elite group of coders, this email format > is really annoying. It's probably an old issue but isn't there simply a > flashcoders forum like Kirupa and flashkit? It's so much easier to keep > threads together, search for recurrent questions and style code samples. I don't think the email format is annoying -- email rules. I think the invitations from Plaxo are annoying. It would be nice to have the archives publicly available and searchable though. $0.02 Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ActionScript syntax enhancements?
On Wed, Jan 7, 2009 at 4:34 AM, Ian Thomas wrote: > On Tue, Jan 6, 2009 at 10:53 PM, Manish Jethani > wrote: > >> The first enhancement I can think of is a language extension called >> 'properties'. >> >>private var _myProperty:int = 0; >>public function get myProperty():int >>{ >> return _myProperty; >>} >>public function myProperty(value:int):void >>{ >> _myProperty = value; >>} >> >> This pattern is so common, it could be a language feature. >> >>public property myProperty:int = 0; > > Manish - why not just write: > > public var myProperty:int=0; > > It has exactly the same effect! Oh, but it doesn't! A public variable is different from a property. A property is really part of a component's interface. It can be overridden by subclasses. With a property, you can do this: override public function get myProperty():int { return someCondition ? customMyProperty : super.myProperty; } A property can be declared as part of an interface. interface IMyInterface { function get myProperty():int; function set myProperty(value:int):void; } All classes that implement IMyInterface are required to have a read-write myProperty property. I almost never use public or protected variables in my code, unless it's dumb data class (like a struct in C). Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Class syntax question...
On Wed, Jan 7, 2009 at 4:13 PM, Sander Schuurman wrote: > I want to make a Class that contains MotionBlur methods that I can call like > this: MotionBlur.coordBlur(mc, 1.5); [snip] > But I get the following error: (even if I just call the method outside > tweenmax like this MotionBlur.coordBlur(chick, 2);) > 1120: Access of undefined property MotionBlur. I don't see anything wrong with your code. You've probably put your class into a package (?), in which case you'll have to import it. import my.package.MotionBlur; The compiler is unable to find the class. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ActionScript syntax enhancements?
On Wed, Jan 7, 2009 at 3:59 AM, Matthias Kramm wrote: > I'm currently in the process of writing a compiler for > ActionScript 3.0. > (In case you're interested, the "development snapshot" at > http://www.swftools.org/download.html already contains > a pre-alpha command-line tool, called as3compile(.exe)) > > Now, I'm thinking about adding an "extended mode" to this > compiler, which will support some additional convenience > features which are not currently part of the ECMA spec. The first enhancement I can think of is a language extension called 'properties'. private var _myProperty:int = 0; public function get myProperty():int { return _myProperty; } public function myProperty(value:int):void { _myProperty = value; } This pattern is so common, it could be a language feature. public property myProperty:int = 0; There, much better. You can override the property in a subclass, of course. override public property myProperty:int = 1; Or: override public property myProperty:int { var _myProperty:int = -1; function get ():int { return _myProperty == -1 ? Math.floor(Math.random() * 0x100) : _myProperty; } function set (value:int):void { _myProperty = value; } } Then you can make them read-only, write-only, or read-write. Okay, maybe that's overkill. But I'm tired of having to write 7 lines of code just to add one property to a class. Another one is events. I wish events were part of the interface of an object, and I wish all objects were event dispatchers (i.e. Object and EventDispatcher were one). This is much too advanced to call it a small extension to the language though. There's probably a lot of small things you could pick up from other languages like C, Java, etc. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] convert data passed to swf to be a sound or video object in flash player 10?
On Tue, Jan 6, 2009 at 9:32 PM, Joel Stransky wrote: > I thought maybe the ByteArray could pull this off in some way but I've never > looked into it. As far as I remember now, NetStream.play can only take a URL. Wish it'd take a ByteArray or some other type of object, but no such luck. I don't think it'd be hard for the player to do this, so I don't see why the API isn't available. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] convert data passed to swf to be a sound or video object in flash player 10?
On Sun, Jan 4, 2009 at 8:30 PM, Anthony Pace wrote: > I heard that you can take data and convert it into sound and video objects > in flash player 10? Am I wrong? > > I am wondering if it is possible to pass data to the swf in chunks and then > piece it together to make sound or video object? Just wondering if this is > possible in flash player 10. I don't believe it is possible to play FLV in that way, even in Flash Player 10 (I'd love to be wrong). If it's an AIR application, the best you can do is write the data to disk and load it from there as a local file. Manish ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] multi language support and font embed/styling best practices?
On Tue, Dec 30, 2008 at 2:23 AM, Jason Boyd wrote: > - Resource bundles appear to be an elegant way to handle localization > of any type of resource -- strings, fonts, animations, code classes, > etc. They allow "cascading" from specific to default locales, mixing > statically compiled locales with dynamically loaded ones as needed, > and very little code to make it all work. The caveat is that it is > within the Flex framework, which may or may not be compatible with > "ActionScript" projects or apps built entirely in CS3/4. Sorry about jumping in like this. I've just signed up for this list, and I don't have the context for this conversation, but it seems like there's something I could add. I've successfully used Flex resource bundles with my plain AS3 projects. You just have to write your own 'ResourceBundle' API that mimics the one in the Flex framework. It doesn't even have to be so advanced. For instance, you don't need "chaining" (cascading) in most cases, so you can just write something simple. It's worked for me. Manish -- http://manishjethani.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders