Re: [Flashcoders] Need help creating an old-skool arc or circularscrollbar
Mark is true. Respect! :-) I used Math.atan(), too and if/else to know, in which quadrant of the circle the drag element is moved. I uploaded my quick&dirty source now. Please be kind! :-) http://lizu.net/circle.swf http://lizu.net/circleSrc.zip it consists of the circle drag mechanism, but I think, the scrolling can be easily applied then with a 'rule of three' and the angle. hth, Matthias 2007/5/23, Mark Winterhalder <[EMAIL PROTECTED]>: On 5/23/07, Jesse Graupmann <[EMAIL PROTECTED]> wrote: > > Trigonometry No need, apart from Math.atan2() to get the result -- assuming the anchor point of the container is in the middle, just normalize the vector from the centre to the mouse and then scale it to the desired radius, that's the position of the handle. About like this: var xmouse = ... var ymouse = ... var radius = ... var magnitude = Math.sqrt( xmouse * xmouse + ymouse * ymouse ); var x = xmouse / magnitude * radius; var y = ymouss / magnitude * radius; var angle = Math.atan( ymouse, xmouse ); // devide by Math.PI * 180 if you wish // now set the position of the handle to x, y and broadcast an event with the angle. If you want to set it to a certain angle (in radians), it should be something like... var x = Math.cos( angle ) * radius; var y = Math.sin( angle ) * -radius; ...which might turn into the wrong direction or be set off by Math.PI/2, in that case, flip the sign of y and/or add/subtract Math.PI/2 to the angle. HTH, Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] splitting the list?
Consider using a Yahoo! or gmail account specifically for this list. Helps a lot by threading e-mails with the same header and isolates it from your normal or work e-mail account. On 5/16/07, Nimrod Huberman <[EMAIL PROTECTED]> wrote: This list include very interesting and helpful subjects, but for me its large amount of posts each day make it less useable. Nimrod -- count_schemula ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] help with a menu in xml : solved
Thanks man, it works... Regards Gustavo Duenas On May 22, 2007, at 5:32 PM, Jesse Graupmann wrote: Your problem might be that your buttons are sharing the same scope when attempting to access individual variables. When you do something like: _root.screenTxt.myText_txt1.text=menuTitle+":"+textMenu; each button points to the last variable you created in the loop. By attaching the data to the button, you can access individual information using 'this' inside the function. I haven't tested this, but it looks better to me... menus = new XML(); menus.ignoreWhite = true; menus.onLoad = function(success) { var target = _root.screenTxt.myText_txt1; var holder = _root.menu; var titleMenus = this.firstChild.childNodes.length; var menuContent = this.firstChild; for (var i = 0; i < titleMenus; ++i ) { var depth = holder.getNextHighestDepth(); var btn = holder.attachMovie( "buttons", 'btn_' + i , depth ); btn._x = 0; btn._y = -10 * i * 4; btn.data = { text: menuContent.childNodes[i].attributes.text, title: menuContent.childNodes[i].attributes.title }; btn.poa.text = btn.data.text; btn.onRelease = function(){ target.text = this.data.title + ":" + this.data.text; } } } menus.load("txt/poa.xml"); _ Jesse Graupmann www.jessegraupmann.com www.justgooddesign.com/blog/ _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Tuesday, May 22, 2007 1:20 PM To: Flashcoders mailing list Subject: [Flashcoders] help with a menu in xml Hi coders, this is thread is the second part of the other. well I have the buttons created and I have this onRelease behavior attached to a every single button, but when I tried to read into a text field part of the xml(text) this one only reads one, not the others and when I traced them , they are there(in the output window) but not into the field as they are supposed to. This is my code in as2 again: stop(); menus = new XML(); menus.ignoreWhite = true; menus.onLoad = function(success) { //portfolioTag = this.firstChild; titleMenus = this.firstChild.childNodes.length; menuContent = this.firstChild; for (var i = 0; i < 4; i++){ // either "menu" or "item" menuContent.childNodes[i].nodeName; // name of the item menuTitle= menuContent.childNodes[i].attributes.title; var buttonsMenu= _root.menu.attachMovie("buttons", menuTitle, 10+i); buttonsMenu._x=0; buttonsMenu._y=-10*i*4; var newText = buttonsMenu.poa.text=menuTitle; // action of the item textMenu= menuContent.childNodes[i].attributes.text; trace(textMenu); buttonsMenu.onRelease = function(){ _root.screenTxt.myText_txt1.text=menuTitle+":"+textMenu; // loads good but only one, the rest appears not to be there:( }; } } menus.load("txt/poa.xml"); and this is xml Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem creating multiple instances
Finally found the problem!! In the end it was very simple. I did not define _myMouseListener:Object in the correct place, and it was being overwritten. Thanks for the help! Cheers, - Bill On May 24, 2007, at 6:41 AM, Bill Mackin wrote: Yes it is. It is the name the person designates to the plane at runtime. On May 23, 2007, at 9:58 PM, David Ngo wrote: Where are you getting 'myName'? Is that a unique name per instance? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Mackin Sent: Wednesday, May 23, 2007 6:33 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] problem creating multiple instances After reading your first e-mail I did go through and make a change here, but it did not resolve the issue. _mcLibrary = _scope.attachMovie(libraryLink, "mcLibrary"+myName, _scope.getNextHighestDepth()); The line you mention is not the MovieClip reference for the plane, but a MovieClip created to create a BitmapData object. _bd = new BitmapData(_mcLibrary._width, _mcLibrary._height, true, 0x00); This BitmapData object is later placed into the plane reference MovieClip. At least that is my understanding... YIKES! _di = new DistortImage(_mc, _bd, vQuality, hQuality); I'm not able to post the class inside the e-mail anymore, it exceeds the maximum file size allowed by flashcoders. If you need the class file again I will create a link to all of the files. Thanks for your response! On May 23, 2007, at 4:03 PM, David Ngo wrote: Yeah, you're using the same MovieClip name reference. I do believe you can't have two objects share the same name. You'll get concurrency issues with that on this line: _mcLibrary = _scope.attachMovie(libraryLink,"mcLibrary", _scope.getNextHighestDepth()); You'll need to create a unique ID for it. I would probably suggest either within your creation object, or have an ID factory (should probably be a hybrid Singleton/Factory) that just generates unique ID's that you can append to your instance names. As for the custom class, it's nothing more than a blank class with public variables (or private ones and getter/setter methods) that contain the data you want to pass. OR, since you use two separate objects, just have a single object compose both. There are many ways to go about doing it, so it just boils down to preference I guess. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] sendandload method fails inside a frameset.
Hi, With LoadVars.sendAndLoad() the second parameter is the name of an object not a frame that will receive data, e.g. mSendVars = new LoadVars(); mLoadVars = new LoadVars(); mSendVars.sendAndLoad(mPostURL, mLoadVars, "POST"); The onload event should be fired for the target, so. mLoadVars.onLoad = function(success:Boolean) { trace(stMail); }; You don't have to use 2 LoadVars objects, you can use them both to send and receive data if you like: mLoadVars.sendAndLoad(mPostURL, mLoadVars, "POST"); Hope this helps... Glen Rodrigo Augusto Guerra wrote: hi all, I'm having some problems using sendandload method within a html frame. I have an asp page that is a frameset with 2 rows, header and content. the content frame name is "principal". Took me some time to discover first of all that I need pass the frame name in the sendandload method, as a return object otherwise the values *are not* received correctly by the asp page (at least I wasn't able to do it). In the principal frame, I have a swf that calls a asp page that do some DB check and return a variable/value to flash( eg: stMail=0) . Testing with *send* method it works and I can see the result displayed inside the frame by the asp response.write. But when I try to use sendAndLoad looks like that it doesn't execute the onLoad method. I believe that this is due to the fact that I specify the *frame name* in the LoadVars return object,but if i don't the asp page will not receive the values from flash and continue the processing in the asp page. I also tried specify a function for the onLoad without success. How the object knows what it should execute when loads if in the object parameter i specify the frame name? my code: lvEmailSnd = new LoadVars(); lvEmailSnd.email = txtEmail.text; lvEmailSnd.dataRecup = myDateStr; lvEmailSnd.onLoad = _root.retornoBuscaEmail; lvEmailSnd.sendAndLoad("usuarios/procuraemail.asp","principal","POST"); here dosen't work // lvEmailSnd.send("usuarios/procuraemail.asp","principal","POST");// here works and my onload function (never ever called back) : function retornoBuscaEmail(success){ mytext.text = success } any help will be *very* welcome. thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [flashcoders] Q: binary data (JPG) in XML
A quick google turned up the following: http://fever.customactions.net/doc/fever/data/encoder/Base64.html And there's plenty more out there: http://www.google.com/search?q=base64+ActionScript+2.0 ActionScript 3 http://www.dynamicflash.com/goodies/base64 regards, Muzak - Original Message - From: "eric e. dolecki" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 11:12 PM Subject: Re: [flashcoders] Q: binary data (JPG) in XML >I found this: > > http://board.flashkit.com/board/archive/index.php/t-720498.html > > which makes it seem like it might be impossible to parse. I would be getting > 200x200 px images base64 encoded in XML. > > Not sure what to do here yet... perhaps I should try to get a path instead, > although being able to do this with Flash seems pretty powerful ;) > > On 5/23/07, T. Michael Keesey <[EMAIL PROTECTED]> wrote: >> ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] HELP!! cannot seem to embed fonts
@font-face{ src: url(./assets/ARIAL.TTF); fontFamily: "aArial"; fontStyle: regular; } .mystyle1 { fontFamily:"aArial"; fontSize: 12pt; } backgroundAlpha="0" horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off" title="test embed" id="d_mail" color="#FF" borderStyle="solid" borderAlpha="0" styleName="mystyle1"> This is my tale of frustration. I've tried every which way but loose within the AS3/Flex docs to embed fonts. Once I set the style of the control or container to style1 it justs defaults to BL***Dy Times Roman. Please save a man from going mad> [a /] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to check if a URL is invalid?
as a side note. killing the stream (or calling stop) does not halt the progressive download. you have to pass it a url that def does not exist. On 5/23/07, Bob Wohl <[EMAIL PROTECTED]> wrote: Hi Bruce, So you're getting a path to the flv file via xml, correct? you could create a video object, connect a netstream of the flv and on success kill the stream telling your function handler to load up the component with the path to the url. With proper use of buffer time, this route would be pretty close to weightless. B. On 5/23/07, Bruce Drummond <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a Video Player application using the FLVPlayback component. > I've already built the entire thing so building a custom video player > component is out of the question. > I want to build in an error handling capability, that will check a > URL's validity before setting it as the FLVPlayback components > contentPath. The URL is pulled out of an XML file. I'm trying to do > this to avoid the component become unresponsive when an invalid URL > is passed to it. It's recommended to use try-catch-finally but I just > can't get anything to work. I'm getting very frustrated. > Appreciate any help. Let me know if you need more information. > > Thanks, > Bruce. > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:Create and animate diagonal slices from Bitmap
Jesse, Pretty cool! H... Would be great if the you were able to add filters to the image below just within the bounds of that slice. Cheers, - Bill On May 24, 2007, at 12:15 AM, Jesse Graupmann wrote: Stage.scaleMode = 'noScale' import flash.display.* import flash.geom.* function drawSlices ( image:MovieClip, drawMC:MovieClip, rotation:Number, sliceWidth:Number ) { var slice_info = getSliceInfo ( image, rotation ); // DOT IS JUST A VISUAL MARKER dot._x = image._x + slice_info.pt.x; dot._y = image._y + slice_info.pt.y; dot.swapDepths ( dot._parent.getNextHighestDepth() ) var angle = rotation * (Math.PI/180); var slices_top = Math.ceil(image._width/sliceWidth); var slices_bottom = Math.ceil((slice_info.pt.x)/sliceWidth) var slice_array = []; for ( var i = -slices_bottom; i < slices_top; i++ ) { var slice = drawMC.createEmptyMovieClip ( 'slice_' + i, drawMC.getNextHighestDepth() ); slice._x = i * ( sliceWidth-(sliceWidth/1.7)); var bmp_temp = new BitmapData ( sliceWidth+1, slice_info.diagonal_height+sliceWidth, true, 0x00FF ); var bmp_temp_matrix:Matrix = new Matrix(); bmp_temp_matrix.rotate( angle ); bmp_temp_matrix.translate( -(sliceWidth) * i, -sliceWidth * i ); bmp_temp.draw ( image, bmp_temp_matrix, null, null, null, true ); var slice_bmp = new BitmapData ( slice_info.diagonal_width , slice_info.diagonal_height, true, 0x00FF ); var slice_bmp_matrix:Matrix = new Matrix(); slice_bmp_matrix.rotate(-angle); slice_bmp_matrix.translate( (sliceWidth )*i, 0 ); slice_bmp.draw ( bmp_temp, slice_bmp_matrix, null, null,null, true ); slice.attachBitmap ( slice_bmp, 1, true, true ); slice_array.push ( slice ); } drawMC.slice_array = slice_array; } function getSliceInfo ( image, angle) { var pt = new Point ( image._width, image._height ); var len = pt.length; var degrees = 90 - angle; var radians = degrees * (Math.PI/180); var dpt = new Point ( len * Math.cos ( radians ), len * Math.sin ( radians ) ); dpt.x = Math.max ( 0, Math.min ( pt.x, dpt.x )); dpt.y = Math.max ( 0, Math.min ( pt.y, dpt.y )); var info = { pt:dpt, diagonal_width: dpt.x, diagonal_height: dpt.length } return info; } function drawSlicedImage () { // ORIGINAL IMAGE mc._alpha = 40 // SLICE HOLDER var drawMC = this.createEmptyMovieClip ( 'drawMC', this.getNextHighestDepth() ); drawMC._x = mc._x; drawMC._y = mc._y; // CREATE SLICES var sliceWidth = 30 var angle = 45; drawSlices ( mc, drawMC, angle, sliceWidth ); } function addSliceInteraction ( ) { drawMC.onMouseMove = function() { var xper = Math.max ( 0, Math.min ( 1, this._xmouse / mc._width ) ) var yper = 1-Math.max ( 0, Math.min ( 1, this._ymouse / mc._height ) ) var per = (xper+yper)/2 var inx = Math.round ( this.slice_array.length * per ) for ( var i in this.slice_array ) { var slice = this.slice_array [ i ]; if ( i == inx ) { slice._alpha = 10; } else { slice._alpha = 100; } } } } // function INIT () { drawSlicedImage (); addSliceInteraction (); } INIT (); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Need help creating an old-skool arc or circularscrollbar
On 5/23/07, Jesse Graupmann <[EMAIL PROTECTED]> wrote: Trigonometry No need, apart from Math.atan2() to get the result -- assuming the anchor point of the container is in the middle, just normalize the vector from the centre to the mouse and then scale it to the desired radius, that's the position of the handle. About like this: var xmouse = ... var ymouse = ... var radius = ... var magnitude = Math.sqrt( xmouse * xmouse + ymouse * ymouse ); var x = xmouse / magnitude * radius; var y = ymouss / magnitude * radius; var angle = Math.atan( ymouse, xmouse ); // devide by Math.PI * 180 if you wish // now set the position of the handle to x, y and broadcast an event with the angle. If you want to set it to a certain angle (in radians), it should be something like... var x = Math.cos( angle ) * radius; var y = Math.sin( angle ) * -radius; ...which might turn into the wrong direction or be set off by Math.PI/2, in that case, flip the sign of y and/or add/subtract Math.PI/2 to the angle. HTH, Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to check if a URL is invalid?
Hey Bob, Thanks, that totally makes sense! I tried it out and it works great! I'm having a strange issue where Flash crashes every second time I publish the fla (this happens with some other files too). Could it be because there's many POSTs to server scripts and some browser specific functionality? I'm using Flash 8 on a MacBook Pro. Would you happen to know anything about that? Regards, Bruce. On May 23, 2007, at 11:30 AM, Bob Wohl wrote: Hi Bruce, So you're getting a path to the flv file via xml, correct? you could create a video object, connect a netstream of the flv and on success kill the stream telling your function handler to load up the component with the path to the url. With proper use of buffer time, this route would be pretty close to weightless. B. On 5/23/07, Bruce Drummond <[EMAIL PROTECTED]> wrote: Hi, I have a Video Player application using the FLVPlayback component. I've already built the entire thing so building a custom video player component is out of the question. I want to build in an error handling capability, that will check a URL's validity before setting it as the FLVPlayback components contentPath. The URL is pulled out of an XML file. I'm trying to do this to avoid the component become unresponsive when an invalid URL is passed to it. It's recommended to use try-catch-finally but I just can't get anything to work. I'm getting very frustrated. Appreciate any help. Let me know if you need more information. Thanks, Bruce. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [flashcoders] Q: binary data (JPG) in XML
I found this: http://board.flashkit.com/board/archive/index.php/t-720498.html which makes it seem like it might be impossible to parse. I would be getting 200x200 px images base64 encoded in XML. Not sure what to do here yet... perhaps I should try to get a path instead, although being able to do this with Flash seems pretty powerful ;) On 5/23/07, T. Michael Keesey <[EMAIL PROTECTED]> wrote: On 5/23/07, eric e. dolecki <[EMAIL PROTECTED]> wrote: > I have been asked if its possible to have Flash display a JPG thats stored > in XML as a binary object (ie. I don't get a path to the JPG, I get the > JPG). I have NO idea what this XML looks like yet, but perhaps someone has > done this already? > > I am not very good with BitmapData, etc. yet and unsure if one needs > ByteArray stuff or not. > > Any insight would be good ;) I haven't tried it myself, but look into base64 encoding. -- Mike Keesey ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- eric e. dolecki senior interactive engineer http://www.ericd.net ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Detect Flash version in AS3
Joe, In my experience, using some kind of javascript like SWFObject or UFO is the best way to go. There is a project named SWFFix that looks promising, but it appears that no work has been done on it since Feb. http://www.swffix.org/devblog/ As for using AS3 to detect for the version of flash, you are correct to assume that older versions of the Flash player will have problems. Cheers, - Bill On May 24, 2007, at 12:48 AM, Joe Cutting wrote: Hello, I'm building a web project in AS3 using Flash CS3. Originally my idea was that the swf would do a version check at the start of the program and if the user wasn't running Flash 9 they would be redirected to download the upgrade. Now, I've done some thinking about this and realised that if the user isn't running Flash 9 then they won't be able to run the swf at all so it wouldn't be able to run the version check. Can anyone confirm that this is the case? If so it looks like that the only ways to check if users can run AS3 swfs are: - use some kind of javascript like SWF Object - use another version detection swf written in AS2. My understanding is that this would have to call the AS3 swf rather than wrapping it. I'd be interested to know how other people have got on with this issue. Cheers Joe Joe Cutting Computer exhibits and installations www.joecutting.com The Fishergate Centre, 4 Fishergate, York, YO10 4FB 01904 624681 As of 30th October 2006 I have a new office so please note my new address and phone number ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem creating multiple instances
Muzak, Thanks for your suggestion, I will look into XRay for future projects. I have of course placed several trace commands throughout my code, but I am still unable to find the problem. Cheers, - Bill On May 23, 2007, at 9:46 PM, Muzak wrote: I suggest you start placing some trace()'s in your code so you can track what happens. And get XRay.. http://osflash.org/xray regards, Muzak ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem creating multiple instances
Yes it is. It is the name the person designates to the plane at runtime. On May 23, 2007, at 9:58 PM, David Ngo wrote: Where are you getting 'myName'? Is that a unique name per instance? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Mackin Sent: Wednesday, May 23, 2007 6:33 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] problem creating multiple instances After reading your first e-mail I did go through and make a change here, but it did not resolve the issue. _mcLibrary = _scope.attachMovie(libraryLink, "mcLibrary"+myName, _scope.getNextHighestDepth()); The line you mention is not the MovieClip reference for the plane, but a MovieClip created to create a BitmapData object. _bd = new BitmapData(_mcLibrary._width, _mcLibrary._height, true, 0x00); This BitmapData object is later placed into the plane reference MovieClip. At least that is my understanding... YIKES! _di = new DistortImage(_mc, _bd, vQuality, hQuality); I'm not able to post the class inside the e-mail anymore, it exceeds the maximum file size allowed by flashcoders. If you need the class file again I will create a link to all of the files. Thanks for your response! On May 23, 2007, at 4:03 PM, David Ngo wrote: Yeah, you're using the same MovieClip name reference. I do believe you can't have two objects share the same name. You'll get concurrency issues with that on this line: _mcLibrary = _scope.attachMovie(libraryLink,"mcLibrary", _scope.getNextHighestDepth()); You'll need to create a unique ID for it. I would probably suggest either within your creation object, or have an ID factory (should probably be a hybrid Singleton/Factory) that just generates unique ID's that you can append to your instance names. As for the custom class, it's nothing more than a blank class with public variables (or private ones and getter/setter methods) that contain the data you want to pass. OR, since you use two separate objects, just have a single object compose both. There are many ways to go about doing it, so it just boils down to preference I guess. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Need help creating an old-skool arc or circular scrollbar
yes, Trigonometry! :-) would this one help you: http://lizu.net/circle.swf Mail to me offlist for the source! hth, Matthias 2007/5/23, Ash Warren <[EMAIL PROTECTED]>: A lng time ago it seems these things were all over flashkit etc. and now well not so much ;) Anyway, I wanted to create a scroller on an arc or radius like this example: http://s12987.gridserver.com/arc_scroller_example.jpg Can anyone point me in the right direction to create something like this? I have no problem coding a simple single-axis scrollbar but have been having problems with this one trying to keep it on the curved track. Thank you so much in advance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [flashcoders] Q: binary data (JPG) in XML
On 5/23/07, eric e. dolecki <[EMAIL PROTECTED]> wrote: I have been asked if its possible to have Flash display a JPG thats stored in XML as a binary object (ie. I don't get a path to the JPG, I get the JPG). I have NO idea what this XML looks like yet, but perhaps someone has done this already? I am not very good with BitmapData, etc. yet and unsure if one needs ByteArray stuff or not. Any insight would be good ;) I haven't tried it myself, but look into base64 encoding. -- Mike Keesey ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[flashcoders] Q: binary data (JPG) in XML
I have been asked if its possible to have Flash display a JPG thats stored in XML as a binary object (ie. I don't get a path to the JPG, I get the JPG). I have NO idea what this XML looks like yet, but perhaps someone has done this already? I am not very good with BitmapData, etc. yet and unsure if one needs ByteArray stuff or not. Any insight would be good ;) - Eric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Q:Blend mode bug
I have a container mc (lets call it parent) which in turn contains several nested mc's (lets call these the children) Each 'child' has an attached Bitmap slice. The container or parent mc is in a layer above another mc . Essentially I'm animating the 'children' mc's on to the stage to create my transition. Everything works fine. However, if I change the blend mode of the container or parent mc to anything other than Normal, after a few test runs in the Flash IDE, Flash crashes!! Does this sound like a Bitmap memory issue? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca "...all improvisation is life in search of a style." - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:Dynamically change blend mode
Certainly! I use it all the time. DisplayObjects have a property called blendMode. If you know the name of the blendMode you want, assign its name in lowercase to the property of your MovieClip like so: myClip.blendMode = "blendmodename"; Note that the "erase" and "alpha" blendModes require their parent to have a non-"normal" blendMode in order to work. -Rez On May 23, 2007, at 3:53 PM, [EMAIL PROTECTED] wrote: This has come up fairly often and I haven't found a solution. Is there a way to change the blend mode on a Movieclip that is created at runtime? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:Dynamically change blend mode
movieClip.blendMode = "[mode]" blendMode (MovieClip.blendMode property) http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp .htm?context=LiveDocs_Parts&file=2444.html Daniel Holth I.S. Programmer x5217 || J401 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 2:53 PM To: flashcoders Subject: [Flashcoders] Q:Dynamically change blend mode This has come up fairly often and I haven't found a solution. Is there a way to change the blend mode on a Movieclip that is created at runtime? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca "...all improvisation is life in search of a style." - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Q:Dynamically change blend mode
This has come up fairly often and I haven't found a solution. Is there a way to change the blend mode on a Movieclip that is created at runtime? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca "...all improvisation is life in search of a style." - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Indesign to xml
try the export to xml the indesign has in the file tab. Regards Gustavo Duenas On May 23, 2007, at 8:56 AM, Merrill, Jason wrote: I want to convert an Indesign document to xml how do I do it? Regards, Unfortunately for you, you've asked the wrong list. This list is about Actionscript. Maybe someone knows, but you should probably try elsewhere. Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] limits to EI and Local Connection calls
informative articles...thanks muzak. - Original Message - From: "Muzak" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 2:39 PM Subject: Re: [Flashcoders] limits to EI and Local Connection calls LC limit is said to be around 40k. Not sure about EI. A quick google turns up nothing useful in regards to size limit. Only thing I found is that performance seriously degrades with larger data chunks. http://weblogs.macromedia.com/jd/archives/2006/02/neuberg_on_exte.cfm Which is a response from John Dowdell to this article http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html In the article they mention sending 1.2mb of data, so if there is an EI limit, it's alot higher than LC. regards, Muzak - Original Message - From: "Johannes Nel" <[EMAIL PROTECTED]> To: "Matthew Ganz" <[EMAIL PROTECTED]>; Sent: Wednesday, May 23, 2007 6:12 PM Subject: Re: [Flashcoders] limits to EI and Local Connection calls yes, not sure about how much it is (we tested this and i forgot again i think LC is 30kb or something) On 5/23/07, Matthew Ganz <[EMAIL PROTECTED]> wrote: Is there a KB limit to passing data via an External Interface call? and for that matter, what about a local connection call? i couldn't find anything about external interface. thanks for any helpful tips. -- matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] [OT] How to capture swf to .avi?
I've used SUPER Video Encoder in the past but it only works for SWFs that dont use any actionscripting. Its free so its probobly worth a shot to check out at least http://www.erightsoft.com/S6Kg1.html -Drakkon On 5/23/07, Marc Hoffman <[EMAIL PROTECTED]> wrote: What software are you using to capture a swf (including audio) and save as .avi? Note: I'm not talking about exporting from the .fla -- this .swf uses scripted tweens and other scripting, so I need to capture the entire animation sequence, including audio, from the .swf in either the browser or the standalone Flash player. Must be Windows-based. Prefer something under U.S. $100. I see some programs online but can't tell if they're professional quality. Thanks, Marc Hoffman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Fwd: [Flashcoders] limits to EI and Local Connection calls
my gut instinct on EL would be 1024 bytes as it would call getURL and a url can only be 1024 bytes On 5/23/07, Matthew Ganz < [EMAIL PROTECTED]> wrote: thanks johannes. i couldn't find anything on EI limits but our tests on LC show the same as you, approximately 40kb. - Original Message - *From:* Johannes Nel <[EMAIL PROTECTED]> *To:* Matthew Ganz <[EMAIL PROTECTED]> ; flashcoders@chattyfig.figleaf.com *Sent:* Wednesday, May 23, 2007 12:12 PM *Subject:* Re: [Flashcoders] limits to EI and Local Connection calls yes, not sure about how much it is (we tested this and i forgot again i think LC is 30kb or something) On 5/23/07, Matthew Ganz < [EMAIL PROTECTED]> wrote: > > Is there a KB limit to passing data via an External Interface call? and > for that matter, what about a local connection call? > > i couldn't find anything about external interface. > > thanks for any helpful tips. -- matt. > ___ > Flashcoders@chattyfig.figleaf.com <[EMAIL PROTECTED]> > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > -- j:pn http://www.lennel.org -- j:pn http://www.lennel.org -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] External Interface: Empty Strings Return as "null"
Hey folks, Working on a problem I'm betting there's no solution for. I've got an .swf embedded in a page which exposes several methods using ExternalInterface.addCallback(...), all of which return values. The problem comes in when I return an empty string "". Empty strings are converted to the string "null" (not even the JavaScript value null, an actual string). I could easily solve this in JavaScript by evaluating against "null", but unfortunately I'm writing the .swf to a spec which says that the .swf must return an empty string as a part of an error condition. In googling around, I've found a couple mentions of this problem, both on Adobe's site. The Flash Player 9 Release notes lists "Empty strings passed through External Interface API via JavaScript are converted to null. (184474)" as a known issue, and a user on LiveDocs lists this as a problem with the "internal serializer". What I'm wondering is if there's a work around that can be accomplished within flash. The only other solution I can come up with is to wrap my .swf in a JS object that'll evaluate against "null" and return "", but that seems a serious waste. Anyone have a clue? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: SPAM-LOW: [Flashcoders] Detect Flash version in AS3
If you load a Flash 9 SWF into _level0 the SWF won't be contained in the Flash 8 (or previous) SWF, it will be the main movie. So, technically you could use a SWF published for a previous version and detect the version of Flash Player installed, then display a message or load the Flash 9 SWF into _level0 (loadMovieNum). However, if the user doesn't have the Flash Player installed at all you'll have to use another solution anyhow. SWFObject or another would be a better option. Derek Vadneau - Original Message - From: Joe Cutting To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, May 23, 2007 10:48 AM Subject: SPAM-LOW: [Flashcoders] Detect Flash version in AS3 Hello, I'm building a web project in AS3 using Flash CS3. Originally my idea was that the swf would do a version check at the start of the program and if the user wasn't running Flash 9 they would be redirected to download the upgrade. Now, I've done some thinking about this and realised that if the user isn't running Flash 9 then they won't be able to run the swf at all so it wouldn't be able to run the version check. Can anyone confirm that this is the case? If so it looks like that the only ways to check if users can run AS3 swfs are: - use some kind of javascript like SWF Object - use another version detection swf written in AS2. My understanding is that this would have to call the AS3 swf rather than wrapping it. I'd be interested to know how other people have got on with this issue. Cheers Joe ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] limits to EI and Local Connection calls
LC limit is said to be around 40k. Not sure about EI. A quick google turns up nothing useful in regards to size limit. Only thing I found is that performance seriously degrades with larger data chunks. http://weblogs.macromedia.com/jd/archives/2006/02/neuberg_on_exte.cfm Which is a response from John Dowdell to this article http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html In the article they mention sending 1.2mb of data, so if there is an EI limit, it's alot higher than LC. regards, Muzak - Original Message - From: "Johannes Nel" <[EMAIL PROTECTED]> To: "Matthew Ganz" <[EMAIL PROTECTED]>; Sent: Wednesday, May 23, 2007 6:12 PM Subject: Re: [Flashcoders] limits to EI and Local Connection calls > yes, not sure about how much it is (we tested this and i forgot again i > think LC is 30kb or something) > > On 5/23/07, Matthew Ganz <[EMAIL PROTECTED]> wrote: >> >> Is there a KB limit to passing data via an External Interface call? and >> for that matter, what about a local connection call? >> >> i couldn't find anything about external interface. >> >> thanks for any helpful tips. -- matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to check if a URL is invalid?
Hi Bruce, So you're getting a path to the flv file via xml, correct? you could create a video object, connect a netstream of the flv and on success kill the stream telling your function handler to load up the component with the path to the url. With proper use of buffer time, this route would be pretty close to weightless. B. On 5/23/07, Bruce Drummond <[EMAIL PROTECTED]> wrote: Hi, I have a Video Player application using the FLVPlayback component. I've already built the entire thing so building a custom video player component is out of the question. I want to build in an error handling capability, that will check a URL's validity before setting it as the FLVPlayback components contentPath. The URL is pulled out of an XML file. I'm trying to do this to avoid the component become unresponsive when an invalid URL is passed to it. It's recommended to use try-catch-finally but I just can't get anything to work. I'm getting very frustrated. Appreciate any help. Let me know if you need more information. Thanks, Bruce. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Detect Flash version in AS3
http://www.google.com/search?hl=en&q=flash+version+detection&meta= have a look at: http://blog.deconcept.com/swfobject/ - Original Message - From: "Joe Cutting" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 4:48 PM Subject: [Flashcoders] Detect Flash version in AS3 > Hello, > I'm building a web project in AS3 using Flash CS3. Originally my idea was > that the swf would do a version check at the start of the program and if the > user wasn't running > Flash 9 they would be redirected to download the upgrade. > Now, I've done some thinking about this and realised that if the user isn't > running Flash 9 then they > won't be able to run the swf at all so it wouldn't be able to run the version > check. > Can anyone confirm that this is the case? If so it looks like that the only > ways to check if > users can run AS3 swfs are: > - use some kind of javascript like SWF Object > - use another version detection swf written in AS2. My understanding is that > this would have to call the > AS3 swf rather than wrapping it. > > I'd be interested to know how other people have got on with this issue. > > Cheers > > Joe ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] A class that uses LoadVars to return XML
I can't test this yet (stub code really for now), but I am writing a class to handle all kinds of requests of an HTTP XML service. My question is mainly in having the .onLoad fired properly and generally the setup being adequate to dispatch the resulting XML to a listener in my application. Below is a simple login method on the class. Can I get some opinions on this? The class: import mx.utils.Delegate; import mx.events.EventDispatcher; class Conduit { private var owner; private var replyXML:XML; function dispatchEvent() {}; function addEventListener() {}; function removeEventListene function Conduit() { owner = this; mx.events.EventDispatcher.initialize( owner ); replyXML = new XML(); } public function attemptLogin( sUserName:String, sPassword:String ):Void { replyXML = new XML(); replyXML.onLoad = Delegate.create( owner, loginLoaded ); var send_lv:LoadVars = new LoadVars(); send_lv.username = sUserName; send_lv.password = sPassword; send_lv.sendAndLoad( **URL**, replyXML, "POST" ); }; private function loginLoaded( success:Boolean ):Void { if( success ) { dispatchEvent( { target:owner, type:"loginResult", data:replyXML } ); } else { dispatchEvent( { target:owner, type:"error" } ); } } } /// eric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] How to check if a URL is invalid?
Hi, I have a Video Player application using the FLVPlayback component. I've already built the entire thing so building a custom video player component is out of the question. I want to build in an error handling capability, that will check a URL's validity before setting it as the FLVPlayback components contentPath. The URL is pulled out of an XML file. I'm trying to do this to avoid the component become unresponsive when an invalid URL is passed to it. It's recommended to use try-catch-finally but I just can't get anything to work. I'm getting very frustrated. Appreciate any help. Let me know if you need more information. Thanks, Bruce. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Need help creating an old-skool arc or circular scrollbar
link seems broken here. 2007/5/23, Ash Warren <[EMAIL PROTECTED]>: A lng time ago it seems these things were all over flashkit etc. and now well not so much ;) Anyway, I wanted to create a scroller on an arc or radius like this example: http://s12987.gridserver.com/arc_scroller_example.jpg Can anyone point me in the right direction to create something like this? I have no problem coding a simple single-axis scrollbar but have been having problems with this one trying to keep it on the curved track. Thank you so much in advance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Need help creating an old-skool arc or circularscrollbar
Trigonometry http://www.codylindley.com/Tutorials/trigonometry/ Trig Tutorial http://www.albinoblacksheep.com/flash/trig -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ash Warren Sent: Wednesday, May 23, 2007 9:58 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Need help creating an old-skool arc or circularscrollbar A lng time ago it seems these things were all over flashkit etc. and now well not so much ;) Anyway, I wanted to create a scroller on an arc or radius like this example: http://s12987.gridserver.com/arc_scroller_example.jpg Can anyone point me in the right direction to create something like this? I have no problem coding a simple single-axis scrollbar but have been having problems with this one trying to keep it on the curved track. Thank you so much in advance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] [OT] How to capture swf to .avi?
What software are you using to capture a swf (including audio) and save as .avi? Note: I'm not talking about exporting from the .fla -- this .swf uses scripted tweens and other scripting, so I need to capture the entire animation sequence, including audio, from the .swf in either the browser or the standalone Flash player. Must be Windows-based. Prefer something under U.S. $100. I see some programs online but can't tell if they're professional quality. Mixed answer: To capture the output from video, you'd use something like HyperCam DX (PC) or equivalent video grabber. You'd usually have trouble with the framerate, encoding speed, etc, so losing framerate is always an issue. Some of those softwares also capture sound, or you can capture with sndrec32.exe (PC). However, here's something: Flash CS3's video export feature *does* export movies with actionscript-based tweening. There's no user interaction allowed when exporting, but you can set the amount of time you want to capture, and it will automatically save the movie file. I'm not sure what kind of user interaction you'd need, if any, but quality-wise, this export from Flash is the best because you won't depend on HD/CPU speed. Zeh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Need help creating an old-skool arc or circular scrollbar
A lng time ago it seems these things were all over flashkit etc. and now well not so much ;) Anyway, I wanted to create a scroller on an arc or radius like this example: http://s12987.gridserver.com/arc_scroller_example.jpg Can anyone point me in the right direction to create something like this? I have no problem coding a simple single-axis scrollbar but have been having problems with this one trying to keep it on the curved track. Thank you so much in advance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Need help creating an old-skool arc or circular scrollbar
A lng time ago it seems these things were all over flashkit etc. and now well not so much ;) Anyway, I wanted to create a scroller on an arc or radius like this example: http://s12987.gridserver.com/arc_scroller_example.jpg Can anyone point me in the right direction to create something like this? I have no problem coding a simple single-axis scrollbar but have been having problems with this one trying to keep it on the curved track. Thank you so much in advance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] ActionScript coder needed for pay
My apologies if you are receiving this when you would have preferred not to, but I have a fairly urgent need to find an ActionScript coder, IN THE USA, who would like to take on either some part-time work over the next 8 to 10 weeks, or full time for several weeks. I have a client who has a Flash application and one of their two ActionScript coders is leaving for another job and they would like to keep the project on schedule. The client is in Manhattan, but physical presence isn't necessary, it would just be a bonus and probably make the job pay slightly better. I am told by the coders that it is not especially tricky work and can be handled by any well-experienced ActionScript coder. If you would like more details, I'd be happy to hear from you. A notarized NDA will be required before I could give you FULL details, as it is a commercial application, but I can give a fair amount more information prior to an NDA. I again emphasize that I can ONLY consider coders who have permanent residence in the USA. Thanks, Paul Hinds ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] [OT] How to capture swf to .avi?
What software are you using to capture a swf (including audio) and save as .avi? Note: I'm not talking about exporting from the .fla -- this .swf uses scripted tweens and other scripting, so I need to capture the entire animation sequence, including audio, from the .swf in either the browser or the standalone Flash player. Must be Windows-based. Prefer something under U.S. $100. I see some programs online but can't tell if they're professional quality. Thanks, Marc Hoffman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] limits to EI and Local Connection calls
yes, not sure about how much it is (we tested this and i forgot again i think LC is 30kb or something) On 5/23/07, Matthew Ganz <[EMAIL PROTECTED]> wrote: Is there a KB limit to passing data via an External Interface call? and for that matter, what about a local connection call? i couldn't find anything about external interface. thanks for any helpful tips. -- matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] limits to EI and Local Connection calls
Is there a KB limit to passing data via an External Interface call? and for that matter, what about a local connection call? i couldn't find anything about external interface. thanks for any helpful tips. -- matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Fwd: Timeline label question
"Colin Moock's book Essential ActionScript 2.0 - page 288 - set2/#6 6. At frames 4 and 15 of the labels layer, add a new keyframe." "Colin Moock's book Essential ActionScript 2.0 - page 288 - set3/#1&2 1. At frame 5 of the scripts layer, add a new keyframe 2. With frame 5 of the scripts layer selected, enter the following code if (_framesloaded == _totalframes){ gotoAndStop ("main" ); } else { gotoAndPlay ( "loading" ); } " The actions for frame 1 only ran once, when you were on frame 1. You may have access to any variables created then, but 'overlapping' doesn't call those each time you step onto frame 4. Going to frame 4 is a way to put a delay of one frame between the next check on frame 5 - kind of like waiting a bit before asking "are we there yet?" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman Sent: Wednesday, May 23, 2007 7:30 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Fwd: Timeline label question I haven't seen the book so this is completely a guess, but is it possible he wants the actions in frame 1 to happen before the loading display (maybe some pre-loading initialization) but the actions in frame 5 need to happen after the loading display has been shown? -Andy On 5/22/07, Jeff Chadwell <[EMAIL PROTECTED]> wrote: > Hi, > > I saw something in Colin Moock's book Essential ActionScript 2.0 and I was > wondering if someone could explain it. > > In Chapter 11, he outlines an OOP application framework. In the part where > he sets up the timeline in the .fla file, he attaches actions on frames 1, 5 > and 15 (these frames are also keyframes). However, the "loading" label > starts on frame 4 so it actually overlaps the actions associated with frame > 1. > > My questions: > > 1. Why doesn't he start the "loading" label on frame 5 to correspond to the > actions that start on that frame? > > 2. What is the effect of starting the label on frame 4 instead of frame 5? > > Jeff Chadwell > > -- > When everyone is against you, it means that you are absolutely wrong-- or > absolutely right. -- Albert Guinon > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Detect Flash version in AS3
Hello, I'm building a web project in AS3 using Flash CS3. Originally my idea was that the swf would do a version check at the start of the program and if the user wasn't running Flash 9 they would be redirected to download the upgrade. Now, I've done some thinking about this and realised that if the user isn't running Flash 9 then they won't be able to run the swf at all so it wouldn't be able to run the version check. Can anyone confirm that this is the case? If so it looks like that the only ways to check if users can run AS3 swfs are: - use some kind of javascript like SWF Object - use another version detection swf written in AS2. My understanding is that this would have to call the AS3 swf rather than wrapping it. I'd be interested to know how other people have got on with this issue. Cheers Joe Joe Cutting Computer exhibits and installations www.joecutting.com The Fishergate Centre, 4 Fishergate, York, YO10 4FB 01904 624681 As of 30th October 2006 I have a new office so please note my new address and phone number ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Fwd: Timeline label question
I haven't seen the book so this is completely a guess, but is it possible he wants the actions in frame 1 to happen before the loading display (maybe some pre-loading initialization) but the actions in frame 5 need to happen after the loading display has been shown? -Andy On 5/22/07, Jeff Chadwell <[EMAIL PROTECTED]> wrote: Hi, I saw something in Colin Moock's book Essential ActionScript 2.0 and I was wondering if someone could explain it. In Chapter 11, he outlines an OOP application framework. In the part where he sets up the timeline in the .fla file, he attaches actions on frames 1, 5 and 15 (these frames are also keyframes). However, the "loading" label starts on frame 4 so it actually overlaps the actions associated with frame 1. My questions: 1. Why doesn't he start the "loading" label on frame 5 to correspond to the actions that start on that frame? 2. What is the effect of starting the label on frame 4 instead of frame 5? Jeff Chadwell -- When everyone is against you, it means that you are absolutely wrong-- or absolutely right. -- Albert Guinon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:Create and animate diagonal slices from Bitmap
Any suggestions eh...? This is not perfect at all but I think works fine as a quick test and only using a 45 degree rotation. To see it working, put any image in a MovieClip and call it 'mc' and then this code on the same frame. - Stage.scaleMode = 'noScale' import flash.display.* import flash.geom.* function drawSlices ( image:MovieClip, drawMC:MovieClip, rotation:Number, sliceWidth:Number ) { var slice_info = getSliceInfo ( image, rotation ); // DOT IS JUST A VISUAL MARKER dot._x = image._x + slice_info.pt.x; dot._y = image._y + slice_info.pt.y; dot.swapDepths ( dot._parent.getNextHighestDepth() ) var angle = rotation * (Math.PI/180); var slices_top = Math.ceil(image._width/sliceWidth); var slices_bottom = Math.ceil((slice_info.pt.x)/sliceWidth) var slice_array = []; for ( var i = -slices_bottom; i < slices_top; i++ ) { var slice = drawMC.createEmptyMovieClip ( 'slice_' + i, drawMC.getNextHighestDepth() ); slice._x = i * ( sliceWidth-(sliceWidth/1.7)); var bmp_temp = new BitmapData ( sliceWidth+1, slice_info.diagonal_height+sliceWidth, true, 0x00FF ); var bmp_temp_matrix:Matrix = new Matrix(); bmp_temp_matrix.rotate( angle ); bmp_temp_matrix.translate( -(sliceWidth) * i, -sliceWidth * i ); bmp_temp.draw ( image, bmp_temp_matrix, null, null, null, true ); var slice_bmp = new BitmapData ( slice_info.diagonal_width , slice_info.diagonal_height, true, 0x00FF ); var slice_bmp_matrix:Matrix = new Matrix(); slice_bmp_matrix.rotate(-angle); slice_bmp_matrix.translate( (sliceWidth )*i, 0 ); slice_bmp.draw ( bmp_temp, slice_bmp_matrix, null, null,null, true ); slice.attachBitmap ( slice_bmp, 1, true, true ); slice_array.push ( slice ); } drawMC.slice_array = slice_array; } function getSliceInfo ( image, angle) { var pt = new Point ( image._width, image._height ); var len = pt.length; var degrees = 90 - angle; var radians = degrees * (Math.PI/180); var dpt = new Point ( len * Math.cos ( radians ), len * Math.sin ( radians ) ); dpt.x = Math.max ( 0, Math.min ( pt.x, dpt.x )); dpt.y = Math.max ( 0, Math.min ( pt.y, dpt.y )); var info = { pt:dpt, diagonal_width: dpt.x, diagonal_height: dpt.length } return info; } function drawSlicedImage () { // ORIGINAL IMAGE mc._alpha = 40 // SLICE HOLDER var drawMC = this.createEmptyMovieClip ( 'drawMC', this.getNextHighestDepth() ); drawMC._x = mc._x; drawMC._y = mc._y; // CREATE SLICES var sliceWidth = 30 var angle = 45; drawSlices ( mc, drawMC, angle, sliceWidth ); } function addSliceInteraction ( ) { drawMC.onMouseMove = function() { var xper = Math.max ( 0, Math.min ( 1, this._xmouse / mc._width ) ) var yper = 1-Math.max ( 0, Math.min ( 1, this._ymouse / mc._height ) ) var per = (xper+yper)/2 var inx = Math.round ( this.slice_array.length * per ) for ( var i in this.slice_array ) { var slice = this.slice_array [ i ]; if ( i == inx ) { slice._alpha = 10; } else { slice._alpha = 100; } } } } // function INIT () { drawSlicedImage (); addSliceInteraction (); } INIT (); _ Jesse Graupmann www.jessegraupmann.com www.justgooddesign.com/blog/ _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 11:38 AM To: flashcoders Subject: [Flashcoders] Q:Create and animate diagonal slices from Bitmap I'm trying to create and animate diagonal slices from a bitmap object. The easiest way to create slices from Bitmaps is via the Rectangle class, but I need diagonal slices. Can this be done via a matrix transform of my bitmap BEFORE I create my slices, or si there an easier way that involves skewing the slices I create using the Recta
Re: [Flashcoders] Indesign to xml
- Original Message - From: "Merrill, Jason" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 2:56 PM Subject: RE: [Flashcoders] Indesign to xml >>>I want to convert an Indesign document to xml how do I do it? >>>Regards, > > Unfortunately for you, you've asked the wrong list. This list is about > Actionscript. Maybe someone knows, but you should probably try > elsewhere. > And.. ever heard of Google? http://www.google.com/search?hl=en&q=indesign+document+to+xml&meta= ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatchEvent within another event handler
That's not how bubbling works. Bubbling only occurs for objects that are on the display list. http://livedocs.adobe.com/flash/9.0/main/0137.html regards, Muzak - Original Message - From: "Sam" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 2:31 PM Subject: Re: [Flashcoders] dispatchEvent within another event handler > Why is that a problem if bubbling is set to true? > > On May 23, 2007, at 8:06 AM, David Ngo wrote: > >> You're listening for an event from your view class that's being fired from >> your service class, that's why. > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatchEvent within another event handler
You're listening for an event on the view, which doesn't dispatch that event. The event is dispatched from the service, to which you never subscribe. regards, Muzak - Original Message - From: "Sam" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, May 23, 2007 1:46 PM Subject: [Flashcoders] dispatchEvent within another event handler > I'm trying to do what i think should be pretty simple. > I want to dispatch an event when my xml has completed lodaing. > For the life of me i can't figure out why event does not get dispatched from > "handleXML", I know the listner works because I've > tested it by dispatching the same event from a button click. > Any ideas what I may be doing wrong? > > package { > import flash.display.Sprite; > import com.acme.AppController; > import com.acme.MyService; > > public class MyView extends Sprite > { > public function MyView() > { > var controller:MyController = new MyController(this); > } > } > } > > > package com.acme > { > import flash.events.EventDispatcher; > import flash.events.Event; > import flash.display.Sprite; > import com.acme.MyService; > > public class MyController extends EventDispatcher > { > private var _view:Sprite; > private var _service:MyService; > public function MyController(target:Sprite){ > _view = target; > _view.addEventListener("xmlLoaded", doSomething); > _service = new MyService(); > } > > public function doSomething(e:Event):void{ > trace("doSomething CALLED"); > } } > } > > package com.acme > { > import flash.events.EventDispatcher; > import flash.events.Event; > import flash.net.URLLoader; > import flash.net.URLRequest; > > public class MyService extends EventDispatcher > { > private var _loader:URLLoader; > private var _xml:XML; > > public function MyService(){ > _loader = new URLLoader(); > _loader.addEventListener(Event.COMPLETE, handleXML); > _loader.load(new URLRequest("xml/data.xml")); > } > > public function handleXML(event:Event):void{ > dispatchEvent(new Event("xmlLoaded", true)); // this never fires > _xml = new XML(_loader.data); > } > } > } > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatchEvent within another event handler
good god I'm a moron. thanks guys On May 23, 2007, at 8:31 AM, Adrian Ionut Beschea wrote: yeah. maybe it should be _service = new MyService(); _service.addEventListener("xmlLoaded", doSomething); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Indesign to xml
>>I want to convert an Indesign document to xml how do I do it? >>Regards, Unfortunately for you, you've asked the wrong list. This list is about Actionscript. Maybe someone knows, but you should probably try elsewhere. Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatchEvent within another event handler
Why is that a problem if bubbling is set to true? On May 23, 2007, at 8:06 AM, David Ngo wrote: You're listening for an event from your view class that's being fired from your service class, that's why. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] dispatchEvent within another event handler
yeah. maybe it should be _service = new MyService(); _service.addEventListener("xmlLoaded", doSomething); David Ngo <[EMAIL PROTECTED]> wrote: You're listening for an event from your view class that's being fired from your service class, that's why. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Sent: Wednesday, May 23, 2007 7:46 AM To: Flashcoders mailing list Subject: [Flashcoders] dispatchEvent within another event handler I'm trying to do what i think should be pretty simple. I want to dispatch an event when my xml has completed lodaing. For the life of me i can't figure out why event does not get dispatched from "handleXML", I know the listner works because I've tested it by dispatching the same event from a button click. Any ideas what I may be doing wrong? package { import flash.display.Sprite; import com.acme.AppController; import com.acme.MyService; public class MyView extends Sprite { public function MyView() { var controller:MyController = new MyController(this); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.display.Sprite; import com.acme.MyService; public class MyController extends EventDispatcher { private var _view:Sprite; private var _service:MyService; public function MyController(target:Sprite){ _view = target; _view.addEventListener("xmlLoaded", doSomething); _service = new MyService(); } public function doSomething(e:Event):void{ trace("doSomething CALLED"); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; public class MyService extends EventDispatcher { private var _loader:URLLoader; private var _xml:XML; public function MyService(){ _loader = new URLLoader(); _loader.addEventListener(Event.COMPLETE, handleXML); _loader.load(new URLRequest("xml/data.xml")); } public function handleXML(event:Event):void{ dispatchEvent(new Event("xmlLoaded", true)); // this never fires _xml = new XML(_loader.data); } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com - The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] dispatchEvent within another event handler
You're listening for an event from your view class that's being fired from your service class, that's why. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Sent: Wednesday, May 23, 2007 7:46 AM To: Flashcoders mailing list Subject: [Flashcoders] dispatchEvent within another event handler I'm trying to do what i think should be pretty simple. I want to dispatch an event when my xml has completed lodaing. For the life of me i can't figure out why event does not get dispatched from "handleXML", I know the listner works because I've tested it by dispatching the same event from a button click. Any ideas what I may be doing wrong? package { import flash.display.Sprite; import com.acme.AppController; import com.acme.MyService; public class MyView extends Sprite { public function MyView() { var controller:MyController = new MyController(this); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.display.Sprite; import com.acme.MyService; public class MyController extends EventDispatcher { private var _view:Sprite; private var _service:MyService; public function MyController(target:Sprite){ _view = target; _view.addEventListener("xmlLoaded", doSomething); _service = new MyService(); } public function doSomething(e:Event):void{ trace("doSomething CALLED"); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; public class MyService extends EventDispatcher { private var _loader:URLLoader; private var _xml:XML; public function MyService(){ _loader = new URLLoader(); _loader.addEventListener(Event.COMPLETE, handleXML); _loader.load(new URLRequest("xml/data.xml")); } public function handleXML(event:Event):void{ dispatchEvent(new Event("xmlLoaded", true)); // this never fires _xml = new XML(_loader.data); } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] problem creating multiple instances
Where are you getting 'myName'? Is that a unique name per instance? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Mackin Sent: Wednesday, May 23, 2007 6:33 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] problem creating multiple instances After reading your first e-mail I did go through and make a change here, but it did not resolve the issue. _mcLibrary = _scope.attachMovie(libraryLink, "mcLibrary"+myName, _scope.getNextHighestDepth()); The line you mention is not the MovieClip reference for the plane, but a MovieClip created to create a BitmapData object. _bd = new BitmapData(_mcLibrary._width, _mcLibrary._height, true, 0x00); This BitmapData object is later placed into the plane reference MovieClip. At least that is my understanding... YIKES! _di = new DistortImage(_mc, _bd, vQuality, hQuality); I'm not able to post the class inside the e-mail anymore, it exceeds the maximum file size allowed by flashcoders. If you need the class file again I will create a link to all of the files. Thanks for your response! On May 23, 2007, at 4:03 PM, David Ngo wrote: > Yeah, you're using the same MovieClip name reference. I do believe > you can't > have two objects share the same name. You'll get concurrency issues > with > that on this line: > > _mcLibrary = _scope.attachMovie(libraryLink,"mcLibrary", > _scope.getNextHighestDepth()); > > > You'll need to create a unique ID for it. I would probably suggest > either > within your creation object, or have an ID factory (should probably > be a > hybrid Singleton/Factory) that just generates unique ID's that you can > append to your instance names. > > As for the custom class, it's nothing more than a blank class with > public > variables (or private ones and getter/setter methods) that contain > the data > you want to pass. OR, since you use two separate objects, just have > a single > object compose both. There are many ways to go about doing it, so > it just > boils down to preference I guess. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem creating multiple instances
I suggest you start placing some trace()'s in your code so you can track what happens. And get XRay.. http://osflash.org/xray regards, Muzak ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] dispatchEvent within another event handler
I'm trying to do what i think should be pretty simple. I want to dispatch an event when my xml has completed lodaing. For the life of me i can't figure out why event does not get dispatched from "handleXML", I know the listner works because I've tested it by dispatching the same event from a button click. Any ideas what I may be doing wrong? package { import flash.display.Sprite; import com.acme.AppController; import com.acme.MyService; public class MyView extends Sprite { public function MyView() { var controller:MyController = new MyController(this); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.display.Sprite; import com.acme.MyService; public class MyController extends EventDispatcher { private var _view:Sprite; private var _service:MyService; public function MyController(target:Sprite){ _view = target; _view.addEventListener("xmlLoaded", doSomething); _service = new MyService(); } public function doSomething(e:Event):void{ trace("doSomething CALLED"); } } } package com.acme { import flash.events.EventDispatcher; import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; public class MyService extends EventDispatcher { private var _loader:URLLoader; private var _xml:XML; public function MyService(){ _loader = new URLLoader(); _loader.addEventListener(Event.COMPLETE, handleXML); _loader.load(new URLRequest("xml/data.xml")); } public function handleXML(event:Event):void{ dispatchEvent(new Event("xmlLoaded", true)); // this never fires _xml = new XML(_loader.data); } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem creating multiple instances
After reading your first e-mail I did go through and make a change here, but it did not resolve the issue. _mcLibrary = _scope.attachMovie(libraryLink, "mcLibrary"+myName, _scope.getNextHighestDepth()); The line you mention is not the MovieClip reference for the plane, but a MovieClip created to create a BitmapData object. _bd = new BitmapData(_mcLibrary._width, _mcLibrary._height, true, 0x00); This BitmapData object is later placed into the plane reference MovieClip. At least that is my understanding... YIKES! _di = new DistortImage(_mc, _bd, vQuality, hQuality); I'm not able to post the class inside the e-mail anymore, it exceeds the maximum file size allowed by flashcoders. If you need the class file again I will create a link to all of the files. Thanks for your response! On May 23, 2007, at 4:03 PM, David Ngo wrote: Yeah, you're using the same MovieClip name reference. I do believe you can't have two objects share the same name. You'll get concurrency issues with that on this line: _mcLibrary = _scope.attachMovie(libraryLink,"mcLibrary", _scope.getNextHighestDepth()); You'll need to create a unique ID for it. I would probably suggest either within your creation object, or have an ID factory (should probably be a hybrid Singleton/Factory) that just generates unique ID's that you can append to your instance names. As for the custom class, it's nothing more than a blank class with public variables (or private ones and getter/setter methods) that contain the data you want to pass. OR, since you use two separate objects, just have a single object compose both. There are many ways to go about doing it, so it just boils down to preference I guess. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com