Re: [Flashcoders] clearing loaded classes in IDE?
delete ASO files I'm having some weird behavior. The short version is, when I edit one of my classes, and re-run the FLA in the IDE which absolutely is dependent on this class, it is not getting the new behavior, and is clearly running some older version of the class. Is there some reason the IDE would get confused and keep classes in memory? It's been a long day. ___ 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] xml thumbnail gallery reverse order problem
reverse the order of your xml?? hi y'all i tried to subscribe to the flash forums on kirupia and on actionscript.org, but for some reason i never receive the confirmation emails. i'm at my wit's end with this problem and i need help!!! there is an xml gallery w/thumbnail tutorial on kirupia which i followed and altered. i want to have variable thumbnail sizes and have them appear 1 pixel apart from each other instead of relying on all thumbs being equal widths, as in their gallery. i came up with a solution, but for some reason flash does things in reverse order (?!? why?) so it lists my thumbs in reverse order from the way they are supposed to be. i'm kind of a noob, so there is probably a really simple solution i'm overlooking. i was thinking: how would one reverse the order in which flash is processing/placing the thumbs? or maybe instead of using my script, there's some kind of for loop that might work? any help is truly appreciated! link to rough example: http://www.andreahendel.com/maxgallery/portraits.swf here's the whole gallery code, the problem bit is towards the end: import xml data and create arrays function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; thumbnails = []; total = xmlNode.childNodes.length; for (i=0; i image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; thumbnails[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; thumbnails_fn(i); } firstImage(); } else { content = "file not loaded!"; } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("portraits.xml"); left and right key listener for large images keylisten = new Object(); keylisten.onKeyDown = function() { if (Key.getCode() == Key.LEFT) { prevImage(); } else if (Key.getCode() == Key.RIGHT) { nextImage(); } }; Key.addListener(keylisten); preloader p = 0; this.onEnterFrame = function() { filesize = picture.getBytesTotal(); loaded = picture.getBytesLoaded(); preloader._visible = true; if (loaded != filesize) { preloader.preload_bar._xscale = 100*loaded/filesize; } else { preloader._visible = false; if (picture._alpha<100) { picture._alpha += 10; } } }; next image and previous image function nextImage() { if (p<(total-1)) { p++; if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[p], 1); picture_num(); } } } function prevImage() { if (p>0) { p--; picture._alpha = 0; picture.loadMovie(image[p], 1); desc_txt.text = description[p]; picture_num(); } } function firstImage() { if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[0], 1); picture_num(); } } thumbnail scroller function thumbNailScroller() { this.createEmptyMovieClip("tscroller", 1000); scroll_speed = 10; tscroller.onEnterFrame = function() { if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) { if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) { thumbnail_mc._x -= scroll_speed; } else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) { thumbnail_mc._x += scroll_speed; } } else { delete tscroller.onEnterFrame; } }; } thumbnail strip HERE IS WHERE MY TROUBLES ARE w = 0 function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { /// place thumbs HOW DO I MAKE THEM NOT LIST BACKWARDS target_mc._x = w w = target_mc._x + target_mc._width + 1 /// make thumbs functional target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1; nextImage(); }; target_mc.onRollOver = function() { this._alpha = 50; thumbNailScroller(); }; target_mc.onRollOut = function() { this._alpha = 100; }; }; image_mcl = new MovieClipLoader(); image_mcl.addListener(tlistener); image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k); } stop(); ___ 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 Pre
Re: [Flashcoders] getting 5 random numbers out of 0-16 no dups
http://www.actionscript.org/forums/showthread.php3?s=&threadid=28769 Quick question. Whats the fastest way to get 5 random numbers out of a list of X number of numbers without having any duplicates? Kinda like the script below excpet it graps duplicates... var loopNum:Number = 16; function getRandomNums(){ for(i=0; i<5; i++){ lastNum = newNum; while(newNum == lastNum){ newNum = random(loopNum); } questionOrder[i] = newNum; } trace(questionOrder); // 0,1,3,2,3 "how do I get no duplicates?" } ___ 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] swfobject - make it failproof
I've had no worries with swfobject and express install myself... Maybe you can run some tests for yourself... Grab the uninstaller and some old versions and give it a crack.. Version 6 is working fine for me. http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14157 http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266 I use the html code thus: To view the Website, you need to have Flash Player Installed, and Javascript enabled.. According to our tests: Javascript is Disabled in your browser, turn it on then refresh this page to view the website Unsure if Flash is Installed - http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";>Install it Now // Javascript is Enabled in your browser" var version = deconcept.SWFObjectUtil.getPlayerVersion(); if (document.getElementById && (version['major'] > 0)) { document.getElementById('flok').innerHTML = "Flash Player "+ version['major'] +"."+ version['minor'] +"."+ version['rev'] +" installed."; }else{ document.getElementById('flok').innerHTML = "Flash Player Not Installed - Install it Now" } // ]]> var fo = new SWFObject("data/flash/preloader.swf", "flashPanel", "900", "600", "8", "#FF", true); fo.setAttribute('xiRedirectUrl', 'http://www.yoursite.com'); fo.addParam("allowScriptAccess", "sameDomain"); fo.addParam("swLiveConnect", "true"); fo.addParam("quality", "high"); fo.addParam("wmode", "transparent"); fo.addParam("scale", "noscale"); fo.addParam("loop", "false"); fo.write("masthead"); For people publishing to Player 8, what steps are you taking when swfobject + express Install fails? For example, I don't think express install works with Flash Player 6 and some early versions of Player 7, which is causing me problems sometimes. I have text in the div id="flashcontent" so, they _should_ see my text links and my link to upgrade the flash player, but sometimes I'm hearing that the flash loads, but the Player 8 features (important stuff like the text) is not showing up. Here is my var so: var so = new SWFObject("images/header_01.swf", "header_01", "800", "150", "8.0.23", "#00", true); so.write("flashcontent"); It mostly works, but, it's still not 100% and it's causing me strife. ___ 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] Attach sound problem
var soundHolder:MovieClip = this.createEmptyMovieClip("soundHolder", this.getNextHighestDepth()); thesong = new Sound(soundHolder); Hey guys here is the deal I have a shell with 2 movieclips one that loads my main site and another that loads my music which an swf file. I in main site I have controls, play,stop and volume slider. What I want to do is this: thesong = new Sound(); thesong.attachSound("mainloop"); main.audiocontrols.Audio_playbutton.onRelease = function() { thesong.start(); }; thesong = new Sound(); thesong.attachSound("mainloop"); main.audiocontrols.Audio_stopbutton.onRelease = function() { thesong.start(); }; Nothing is working. I am nt asking someone to do it for me but to give me a concept of how to achieve this. Thank you. Tony... ___ 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 vicous ___ 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] Re: Flex vs. Flash IDE
its like trying to compare adobe indesign and illustrator, sure they share a lot of common underlying elements but the usage is much different. If I want to layout a 100 page book i will use indesign... If i want to design a poster with rich graphic elements i will use illustrator Flex is for large scale apps, ease of use with ui components and so on... Flash will be for animations on the ole time line and for doing smaller scale apps that need to be much more visually customised. Theres enough space for all of us to play in! If you have tried Flex 2 and can't tell the difference between the 2 IDE's, I don't know what to say.. http://labs.adobe.com/flexproductline/ some video's http://labs.adobe.com/flexproductline/videos/ breeze presentation: http://www.adobe.com/products/flex/productinfo/brz_flex2/ FAQ: http://www.adobe.com/products/flex/productinfo/faq/flex2_faq.html Now, none of the above actually 'compare' both IDE's, but maybe that's because there's no comparing them ;-) Beta 3 comes with a "start page" similar to the one in Flash and other Adobe products that has a list of sample applications, tutorials etc.. I think they've done a great job regarding documentation and stuff to get you going. regards, Muzak - Original Message - From: "Adam Pasztory" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, May 24, 2006 3:03 AM Subject: Re: [Flashcoders] Re: Flex vs. Flash IDE Someone suggested that Adobe hasn't done a good job explaining the difference between the two. I can't see how you can say that. There has been a public beta available for over 6 months and a site almost entirely devoted to it. The Samples Explorer is as clear an explanation as any developer should need. The only way to really understand the difference is to attempt to build something with it. While I think the concept of a beta program is great, I spent quite a few hours poring over the documentation, and followed a few tutorials, and I did not find the clear explanations I was hoping for. Maybe that makes me a bad developer. But I assume Adobe wants to sell to bad developers as well as good ones. :) This was a few months ago, so maybe things have improved. If I'm wrong, please point me to the documentation, FAQs, etc. from Adobe that clearly explain the diferences between Flex IDE and Flash IDE, or details about how to integrate Flex into my workflow. Maybe this is all coming after the release. Or maybe it's been added since I looked through the labs site. Where is the practical tutorial for Flash Developers who want to transition to Flex? I want to like Flex. I really do. I'm not trying to attack any Flex developers or any of the smart people who work at Macromedia/Adobe. I'm just sharing my personal observations around it so far. There's enough contradictory info in this thread alone to make me think they're not doing a good enough job getting the message out. The ongoing success of Flash is important to me personally, and to my career, so I that's why I've felt the need to say this. ___ 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] Publish my swf direct to server
You could run a local webserver like apache or IIS then just copy the published files to the server directory on your harddrive then view in your browser? Hi all Is there any methods to publish and upload my flash files directly to my webserver. Tried network places but doesnt work. I now know. At the moment I'm exporting movie, then using dreamweaver ftp to upload files to server, seems a long winded way of doing a simple task, and slightly annoying considering i'm a type of guy that makes changes and want to see the results from my website rather then locally. Any suggestions or tips on this?? Any help would be cool. Kind regards Johnny ___ 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] yet another screwing from micrsoft
I couldnt give a stuff about the lost lawsuit, 0.001% revenue loss for MS compared to all legacy flash sites that I will have to dig up log in details for and fix, much bigger impact for me personally than bill will fell personally I'll wager microsoft is a wee bit more upset about the eolas patent than you are... Here is a workaround for it... http://www.flashinto.com/phpBB2/viewtopic.php?t=3215&sid=a69d2b96fbe275f8ae573b0ad09600c0 On 3/29/06, Andy Johnston <[EMAIL PROTECTED]> wrote: anyone care to comment on this little gem? http://www.eweek.com/article2/0,1895,1943847,00.asp looks bad to me, thats a lot of reauthoring ___ 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] yet another screwing from micrsoft
anyone care to comment on this little gem? http://www.eweek.com/article2/0,1895,1943847,00.asp looks bad to me, thats a lot of reauthoring ___ 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] preloader, again (ugh)
G'Day Edward, Heres my code for a preloader. I use the movieClipLoader for good call backs and now onEnterFrame functions (sooo flash 5 ;)) var mcl:MovieClipLoader = new MovieClipLoader(); var loadingListener:Object = new Object(); mcl.addListener(loadingListener); var target_mc = this.createEmptyMovieClip(loadClipInstance, loadClipDepth); loadingListener.onLoadStart = function(target:MovieClip) { // starting load }; loadingListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) { progressBar._xscale = (loadedBytes/totalBytes)*100; }; loadingListener.onLoadInit = function(target:MovieClip) { // stuff is loaded }; mcl.loadClip(loadClipPath, target_mc); you can only test preloaders on a live website.. testing locally or within flash will not work, so upload your stuff to a server and test it out. cheers andy So you guys tell me that a single frame, single file site with a preloader 100% dynamic is pretty much impossible, ok i accept that. here is my external preloader, any ideas ... site loads, no progress appearance at all. // begin code // - // text formats section var format1_fmt:TextFormat = new TextFormat(); with (format1_fmt) { color = 0xFF; font = "swfitslim99"; size = 8; }; // - function preloader() { // create movieclip to load swf in _root.createEmptyMovieClip("target_mc", this.getNextHighestDepth() ); _root.target_mc.loadMovie("site.swf"); // draw preloader _root.createEmptyMovieClip("preloader_mc", _root.getNextHighestDepth() ); _root.preloader_mc.createTextField("preloader_txt", _root.getNextHighestDepth, 0, 0, 200, 20); with (_root.preloader_mc.preloader_txt) { embedFonts = true; selectable = false; setNewTextFormat(format1_fmt); text = "LOADING SITE: 00" }; _root.preloader_mc._x = (Stage.width/2) - (_root.preloader_mc.preloader_txt._width/2); _root.preloader_mc._y = (Stage.height/2) - (_root.preloader_mc.preloader_txt._height/2); // - // preload _root.onEnterFrame = function() { tBytes = _root.target_mc.getBytesTotal(); bLoaded = _root.target_mc.getBytesLoaded(); percent = Math.round((bLoaded/tBytes)*100); if (bLoaded < tBytes) { _root.preloader_mc.preloader_txt.text = "loading site: " + percent; } else { trace("completed loading!"); _root.preloader_mc.removeMovieClip(); _root.preloader_mc.preloader_txt.removeTextField(); delete this.onEnterFrame; }; }; }; // - preloader(); // - // http://www.murderdesign.com/preloader.swf ___ 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] movieclip actions not working
if thats the case you should have a movieClip that contains your buttons in the library. Set its linkage then attach it under your m1 movieClip... _ || m1 - main button menu_mc - library linkage _ || button1_mc // these are all instance named in the menu_mc clip in the library || button2_mc || button3_mc m1.onRollOver = function():Void{ var subMenu:MovieClip = attachMovie("menu_mc", menu_mc, 100); // grab the menu from library subMenu._x = this._x+this._height; // set the menu._x to the m1's x location plus its height subMenu._y = this._y; // set the menu._y to the m1's y location } maybe something along those lines? Yes, something like that, but i wanted: a) only use movieclips b) all actionscript in main timeline in frame 1 I can and have done it plenty of times using movieclip and regular buttons, no problem. Wanted to try something new, guess it was a bad idea :-) Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: maandag 20 maart 2006 1:55 To: Flashcoders mailing list Subject: Re: [Flashcoders] movieclip actions not working what are you trying to achieve with this anyhow? a drop down menu type of system or what? thanks for the help. If you say it can never work, then I assume it can never work... I'll do a little rethinking as you suggest and use the oldstyle buttons where needed. Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: maandag 20 maart 2006 1:41 To: Flashcoders mailing list Subject: Re: [Flashcoders] movieclip actions not working ben, you cannot have a button inside another button... That is why your code wont work. paste this over your current code m1.onRollOver = function ():Void { this.gotoAndStop (20); }; m1.onRollOut = function ():Void { this.gotoAndStop (1); }; m1.m2.onPress = function ():Void { trace("HI") getURL ("http://www.cnn.com";, "_blank"); }; as you will see the trace("HI") will never fire because the m1 button movieClips hit area will expand to the total size of the movieClip. rethink your setup, this will never work despite all the help in the world have you tried that Byron, and does that work for you? I've tried it here, and makes no difference at all... strange that such a simple thing is so hard to solve... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Byron Canfield Sent: maandag 20 maart 2006 1:18 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] movieclip actions not working Actually try this, instead. m1.onRollOver = function(){ delete this.onRollOver; //this.play(); this.gotoAndStop(20); } ___ 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 ___ 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] movieclip actions not working
what are you trying to achieve with this anyhow? a drop down menu type of system or what? thanks for the help. If you say it can never work, then I assume it can never work... I'll do a little rethinking as you suggest and use the oldstyle buttons where needed. Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: maandag 20 maart 2006 1:41 To: Flashcoders mailing list Subject: Re: [Flashcoders] movieclip actions not working ben, you cannot have a button inside another button... That is why your code wont work. paste this over your current code m1.onRollOver = function ():Void { this.gotoAndStop (20); }; m1.onRollOut = function ():Void { this.gotoAndStop (1); }; m1.m2.onPress = function ():Void { trace("HI") getURL ("http://www.cnn.com";, "_blank"); }; as you will see the trace("HI") will never fire because the m1 button movieClips hit area will expand to the total size of the movieClip. rethink your setup, this will never work despite all the help in the world have you tried that Byron, and does that work for you? I've tried it here, and makes no difference at all... strange that such a simple thing is so hard to solve... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Byron Canfield Sent: maandag 20 maart 2006 1:18 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] movieclip actions not working Actually try this, instead. m1.onRollOver = function(){ delete this.onRollOver; //this.play(); this.gotoAndStop(20); } ___ 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] movieclip actions not working
ben, you cannot have a button inside another button... That is why your code wont work. paste this over your current code m1.onRollOver = function ():Void { this.gotoAndStop (20); }; m1.onRollOut = function ():Void { this.gotoAndStop (1); }; m1.m2.onPress = function ():Void { trace("HI") getURL ("http://www.cnn.com";, "_blank"); }; as you will see the trace("HI") will never fire because the m1 button movieClips hit area will expand to the total size of the movieClip. rethink your setup, this will never work despite all the help in the world have you tried that Byron, and does that work for you? I've tried it here, and makes no difference at all... strange that such a simple thing is so hard to solve... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Byron Canfield Sent: maandag 20 maart 2006 1:18 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] movieclip actions not working Actually try this, instead. m1.onRollOver = function(){ delete this.onRollOver; //this.play(); this.gotoAndStop(20); } ___ 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] Position objects evenly around ellipse
heres a js library has an oval function... might be of some use to get you going http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm Thanks very much Ryan - looks like a good start - I can use maybe a little of that, but an ellipse is also mathematically quite different, and I'm not sure how I would go about modifying your example to fit an ellipse shape. Plus, it seems (though I haven't tested it) you are hard coding values in there, assuming there are 20 clips and thus have hard coded values such as 41 80, so that determines the spacing - I need a function that will dynamically spread them out evenly, not knowing how many there will be. But seriously, thanks very much, for sending what you did. I'm just not mathematically adept enough to translate that to my problem. Other ideas? Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: Thursday, March 16, 2006 7:01 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Position objects evenly around ellipse I have some code I used in a project todo a similiar idea.. this should get you started.. puts the clips around a perfect circle.. you'll have to play with it a bit. var clipPosition:Number = 0; function setPosition(p_clip:MovieClip):Void { clipPosition += 60; var r:Number = clipPosition*Math.PI/180; var d:Number = 80; if (r/Math.PI*180>760) { r += 180; d += 155; clipPosition -= 41; } else if (r/Math.PI*180>360) { d += 80; clipPosition -= 30; } p_clip._x = Math.cos(R)*d; p_clip._y = Math.sin(R)*d; } for (var i = 0; i<20; i++) { var clip = this.attachMovie("clip", "clip_"+i, i); setPosition(clip); } Cheers, Ryan On 3/16/06, Merrill, Jason <[EMAIL PROTECTED]> wrote: Would anyone have a function, class, formula, idea whatever that would allow me to calculate X and Y values to place an "n" number of movie clips evenly spaced around an ellipse/oval shape? The number of clips can vary based on external data. The ellipse would also have to be calculated I suppose, but not actually drawn - the representation of it would be a separate graphic. I found the algebraic formula for an ellipse on a Cartesian plane to be: Ax2 + Bxy + Cy2 + Dx + Ey + F = 0 But no idea how to make a translation to my problem. Thanks! Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ 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] best flash actionscript book/reference
I would highly recommend Colin Moock's Essential Actionscript 2.0 it is an excellent guide to the package system and object oriented goodness. so after not having coded in flash for about 5 years (lots of changes) and getting hardcore back into actionscript, and ESPECIALLY this list :P (love you all!) ... whats a good reference with examples for all flash as2.0 etc methods objects properties etc. whats the best all around intermediate or beginner to advanced flash AS book out there.? thanks guys! -edward ___ 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] dynamically naming sound objects?
function loadSounds() { for (var i:Number = 0; i < mySounds.length; i++) { sRef = _root["sound"+i] // I assume sRef is a already created movieClip var testSound:Sound = new Sound(sRef); sounds_array.push(testSound); testSound.loadSound(mySounds[i], False); } } I am trying to create a reusable function to load sound objects, dynamically naming them in sequence, and dynamically placing them into an array to hold a pointer to them. however, they do not seem to be being created. any ideas? // begin code var mySounds:Array = new Array(); var sPath:String = "sound/loops/"; mySounds[0] = sPath + "Accident-Broadkas-8819.mp3"; mySounds[1] = sPath + "5-jakkob-2501.mp3"; mySounds[2] = sPath + "albert-Mikkel_M-204.mp3"; mySounds[3] = sPath + "delerium-queali-1634.mp3"; var sounds_array:Array = new Array(); var sBaseName:String = "sound"; function loadSounds() { for (var i:Number = 0; i < mySounds.length; i++) { sRef = _root["sound"+i] sounds_array.push(sRef = new Sound()); sRef.loadSound(mySounds[i], False); } } // end code i have no problems dynamically creating mcs and naming them dynamically, but this method does not seem to be appliying to this scenario. just a direction would be helpful.. -edward ___ 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] Doh! Converting a floating point string to number loses precision
For this reason people usually use server side scripts to supply flash with correct calculations for finance apps. It might not look like a big deal until you are using Flash to do some financial app, where you obtain a number from a string variable, convert it to a number, divide it with something and Math.floor it, all the while thinking it's the same as taking a number, divide it with something and Math.floor it. (The diff can be as big as 1 because of Math.floor). - boon Yotam Laufer <[EMAIL PROTECTED]> wrote: -1.13686837721616e-13 is as close to zero as you get matey 13 places after the decimal... On 07/03/06, Boon Chew wrote: How do you usually deal with the loss in precision (a bit oxymoron since floating point can't be exactly represented) when converting a floating point string to a number? var s:String = "952.86"; var i:Number = parseFloat(s); trace(i); trace(i - 952.86); // Not zero! - boon - Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. ___ 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 -- Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 | skype: ubermutt ___ 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 - Yahoo! Mail Use Photomail to share photos without annoying attachments. ___ 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] preloader issue?
did you try Math.round or math.round? this code does work, however the percent displays something like 15 places ... onClipEvent (load) { this.loadMovie("bigfile.swf"); } onClipEvent (enterFrame) { tBytes = this.getBytesTotal(); trace("tBytes: "+tBytes); bLoaded = this.getBytesLoaded(); trace("bLoaded: "+bLoaded); percent = (bLoaded/tBytes)*100; if (bLoadedhttp://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] Help with timeline Script
Not going to code up your whole app but here are some utility methods I use for quick dev. They make use of the fuse kit http://www.mosessupposes.com/Fuse/ You should send moses an email for the code and he will get it back to ya quickly. Once you have the code you can do something with the utils below to slide clips on & off the screen have fun! // // Fuse Utility Methods var anim// = application.anim; // Slides a clip on screen from 4 possible directions function slideOnScreen(target:MovieClip, direction:String, alpha:Number, time:Number, ease:String, callback:String, scope:Object, delay:Number){ if(delay==undefined){ delay = 0; } if(scope==undefined){ scope = this; } if(alpha==0){ target._alpha = 0; } var dirObj:Object = getOutOfBounds(target, direction); anim = new Fuse( [ { target:target, start_alpha:alpha, seconds:time }, { target:target, seconds:time, ease:ease, start_y:dirObj.y, start_x:dirObj.x, y:target._y, x:target._x, delay:delay } ], { func:callback } ) anim.scope = scope; anim.start(); } // Slides a clip off screen from 4 possible directions function slideOffScreen(target:MovieClip, direction:String, alpha:Number, time:Number, ease:String, callback:String, scope:Object, delay:Number ){ if(delay==undefined){ delay = 0; } if(scope==undefined){ scope = this; } if(alpha==0){ target._alpha = 0; } var dirObj:Object = getOutOfBounds(target, direction); anim = new Fuse( [ { target:target, alpha:alpha, seconds:time }, { target:target, seconds:time, ease:ease, y:dirObj.y, x:dirObj.x , delay:delay } ], { func:callback } ) anim.scope = scope; anim.start(); } // Determines position that will place the target clip // off the screen in one of four directions. function getOutOfBounds(target:MovieClip, direction:String){ var oX:Number = target._x; var oY:Number = target._y; var pad:Number = 100; switch(direction){ case "top": oY = (0-target._height)-pad; break; case "bottom": oY = (Stage.height+target._height)+pad; break; case "right": oX = (Stage.width+target._width)+pad; break; case "left": oX = (0-target._width)-pad; break; } var dirObj:Object = { x:oX, y:oY }; return(dirObj); } ___ 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] Documenting my code
also could try: http://www.jellyvision.com/actiondoc/ stand alone and nice ryanm wrote: Or, can anyone suggest an alternative software that takes the java-doc style comments and create documentation? Check out NaturalDocs. It's free (open course), and it reads almost any style of comments. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Q:Tracing out objects in an array
for(var i:Number=0; i Hi I'm populating an array with objects. When I trace out the array I get ==[object Object] Whats the best way to trace out the contents of the objects once they're in the array? Thansk in advance Jim Bachalo [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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Class Error Message
A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private var theDate:String; private var now:Date; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var messageDisplay:Function = displayGreeting; public var message:String = ""; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); now = new Date(); var timeNow = formatTime(now) placeGreeting(timeNow); } private function placeGreeting(time) { messageFormat = new TextFormat(); messageFormat.font = "Verdana"; messageFormat.color = 0xff; messageFormat.bold = true; container_mc.createTextField("messageText", textFieldDepth, 75, 100, 150, 25); container_mc.messageText.text = time; container_mc.messageText.border = false; container_mc.messageText.setTextFormat(messageFormat); } private function formatTime(theDate){ var hour=theDate.getHours(); var minute=theDate.getMinutes()>9 ? theDate.getMinutes() : "0" + theDate.getMinutes(); if (hour > 12){ var timeString = (hour-12) + ":" + minute + "PM"; }else{ var timeString = hour + ":" + minute + "AM"; } return timeString; } } } Hi All, In the following code my attempt at formatting the date returns this to the output window: // **Error** BushidoDeep:Users:chris:Desktop:hello:com:bushidodeep:Hello.as: Line 55: This statement is not permitted in a class definition. now = new Date(); **Error** BushidoDeep:Users:chris:Desktop:hello:com:bushidodeep:Hello.as: Line 56: This statement is not permitted in a class definition. trace ("The Time is " + formatTime(now)); **Error** BushidoDeep:Users:chris:Desktop:hello:com:bushidodeep:Hello.as: Line 61: ActionScript 2.0 class scripts may only define class or interface constructs. } Total ActionScript Errors: 3 Reported Errors: 3 // /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private var theDate:String; private var now:Date; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var messageDisplay:Function = displayGreeting; public var message:String = ""; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); placeGreeting(); } private function placeGreeting() { messageFormat = new TextFormat(); messageFormat.font = "Verdana"; messageFormat.color = 0xff; messageFormat.bold = true; container_mc.createTextField("messageText", textFieldDepth, 75, 100, 150, 25); container_mc.messageText.text = messageDisplay(); container_mc.messageText.border = false; container_mc.messageText.setTextFormat(messageFormat); } //for testing only will use am/pm passed from formatTime() to output message private function displayGreeting() { if (now == "afternoon") { message = "Disco Rules"; } else { message = "Samba Rules"; } return message; } private function formatTime(theDate){ var hour=theDate.getHours(); var minute=theDate.getMinutes()>9 ? theDate.getMinutes() : "0" + theDate.getMinutes(); if (hour > 12){ var timeString = (hour-12) + ":" + minute + "PM"; }else{ var timeString = hour + ":" + minute + "AM"; } return timeString; } now = new Date(); trace ("The Time is " + formatTime(now)); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Can't redefine class method
yup Did you create 2 .as files called A.as and B.as and import B into your .fla file before calling B.doit()? On 1/16/06, Andy Johnston <[EMAIL PROTECTED]> wrote: when I try to replicate that B.doit doesnt even appear as a method? I have 2 classes, A and B. B extends A:- class A { private function A(){}; public static function doit() { dothis(); } private static function dothis() { trace("A.dothis"); } } import A; class B extends A { private function B(){}; private static function dothis() { trace("B.dothis"); } } and when I call B.doit(), the trace output is:- A.dothis whereas I'm expecting B.dothis. I using Flash Professional v 8.0. Has anyone seem this problem before? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Can't redefine class method
when I try to replicate that B.doit doesnt even appear as a method? I have 2 classes, A and B. B extends A:- class A { private function A(){}; public static function doit() { dothis(); } private static function dothis() { trace("A.dothis"); } } import A; class B extends A { private function B(){}; private static function dothis() { trace("B.dothis"); } } and when I call B.doit(), the trace output is:- A.dothis whereas I'm expecting B.dothis. I using Flash Professional v 8.0. Has anyone seem this problem before? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using a Function as Variable[code]
class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var now:String = "afternoon"; private var container_mc:MovieClip; public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); placeGreeting(); } private function placeGreeting() { messageFormat = new TextFormat(); messageFormat.font = "Verdana"; messageFormat.color = 0xff; messageFormat.bold = true; container_mc.createTextField("messageText", textFieldDepth, 75, 100, 150, 25); container_mc.messageText.text =displayGreeting(); container_mc.messageText.border = false; container_mc.messageText.setTextFormat(messageFormat); } private function displayGreeting() { if (now == "afternoon") { return("Disco Rules"); } else { return("Samba Rules"); } } } The following returned undefined: /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var messageDisplay:Function = displayGreeting; public var message:String = ""; public var now:String = "afternoon"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); placeGreeting(); } private function placeGreeting() { messageFormat = new TextFormat(); messageFormat.font = "Verdana"; messageFormat.color = 0xff; messageFormat.bold = true; container_mc.createTextField("messageText", textFieldDepth, 75, 100, 150, 25); container_mc.messageText.text = messageDisplay(); container_mc.messageText.border = false; container_mc.messageText.setTextFormat(messageFormat); } private function displayGreeting() { if (now == "afternoon") { message = "Disco Rules"; } else { message = "Samba Rules"; } } } On Jan 12, 2006, at 2:39 PM, Johannes Nel wrote: public function get displayGreeting():String { if (now == "afternoon") { message = "Disco Rules"; } else { message = "Samba Rules"; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using a Function as Variable[code]
Whats the problem? Hi, The code would be helpful :) /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var messageDisplay:Function = displayGreeting; public var message:String = ""; public var now:String = "afternoon"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); placeGreeting(); } private function placeGreeting() { messageFormat = new TextFormat(); messageFormat.font = "Verdana"; messageFormat.color = 0xff; messageFormat.bold = true; container_mc.createTextField("messageText", textFieldDepth, 75, 100, 150, 25); container_mc.messageText.text = messageDisplay; container_mc.messageText.border = false; container_mc.messageText.setTextFormat(messageFormat); } private function displayGreeting() { if (now == "afternoon") { message = "Disco Rules"; } else { message = "Samba Rules"; } } } On Jan 12, 2006, at 2:29 PM, Chris Kennon wrote: Hi, In the following, I'm attempting to apply the value os an expression in a function to a textField. A pit of quicksand has developed. Would someone lend a hand? Respectfully, Christopher Kennon Bushidodeep.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating An OOP MC Via Composition
if you want the class to actually do the creating of the clip you should: [CODE] import com.bushidodeep.*; var myHello:Hello = new Hello(this); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip("blah", 1); displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } Hi, This worked on the FLA timeline test is displayed in the textField, but shouldn't this functionality be in the class? Respectfully, Chris On Jan 11, 2006, at 5:56 PM, Andy Johnston wrote: nah actually should be [CODE] var myHelloClip:MovieClip = createEmptyMovieClip("hello_mc", 1); import com.bushidodeep.*; var myHello:Hello = new Hello(myHelloClip); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target; displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } Hi, Thanks for the prompt response. When I create the Hello object on the AS timeline, nothing is rendered to screen. [CODE] import com.bushidodeep.*; var myHello:Hello = new Hello(); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip ("messageDisplay", 1); container_mc.displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } [/CODE] On Jan 11, 2006, at 5:32 PM, Martin Wood wrote: passing the target into the constructor. martin. Chris Kennon wrote: Hi, I attempting to create a mc, then attach a textField via composition, instead of extending the movieClip class. Could someone point out what I missed? -- Martin Wood http://relivethefuture.com/choronzon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating An OOP MC Via Composition
nah actually should be [CODE] var myHelloClip:MovieClip = createEmptyMovieClip("hello_mc", 1); import com.bushidodeep.*; var myHello:Hello = new Hello(myHelloClip); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target; displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } Hi, Thanks for the prompt response. When I create the Hello object on the AS timeline, nothing is rendered to screen. [CODE] import com.bushidodeep.*; var myHello:Hello = new Hello(); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip ("messageDisplay", 1); container_mc.displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } [/CODE] On Jan 11, 2006, at 5:32 PM, Martin Wood wrote: passing the target into the constructor. martin. Chris Kennon wrote: Hi, I attempting to create a mc, then attach a textField via composition, instead of extending the movieClip class. Could someone point out what I missed? -- Martin Wood http://relivethefuture.com/choronzon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating An OOP MC Via Composition
public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip ("messageDisplay", 1); displayGreeting(); } Hi, Thanks for the prompt response. When I create the Hello object on the AS timeline, nothing is rendered to screen. [CODE] import com.bushidodeep.*; var myHello:Hello = new Hello(); [/CODE] [CODE] /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private static var textFieldDepth:Number = 0; public static var message:String = "Hello It's Me"; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // public function Hello(target:MovieClip) { container_mc = target.createEmptyMovieClip ("messageDisplay", 1); container_mc.displayGreeting(); } private function placeGreeting() { } private function displayGreeting() { container_mc.createTextField("messageText", textFieldDepth, 200, 100, 250, 125); container_mc.messageText.text = "test"; container_mc.messageText.border = true; } } [/CODE] On Jan 11, 2006, at 5:32 PM, Martin Wood wrote: passing the target into the constructor. martin. Chris Kennon wrote: Hi, I attempting to create a mc, then attach a textField via composition, instead of extending the movieClip class. Could someone point out what I missed? -- Martin Wood http://relivethefuture.com/choronzon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Massive XML files and Flash
I've found this as version of xpath very very handy.. easy to implement and use also.. http://www.xfactorstudio.com/ActionScript/AS2/XPath/ Thanks Jester, but databases are not my forte, to do it quickly I'd like to just use ActionScript only. Is there anyway I can just load specific sections of the XML or do I have to load the whole file into memory? On 05/01/06, JesterXL <[EMAIL PROTECTED]> wrote: Does it have to stay in that format? Meaning, can you convert it and throw it into a database? Paging is still an effective methodology, and if you can throw it in a database, you can then do what Flash does best and load what you need on the fly. - Original Message - From: "Jonathan Clarke" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, January 05, 2006 7:21 PM Subject: [Flashcoders] Massive XML files and Flash Hi, I find myself in a situation where I need to build a tool to analyse lots of xml data. Thousands of records containing a lot of strings as well as numericals. I'm sure there are lots of more suitable applications and languages, but I the only one I know is Actionscript. Luckily, I know it very well and am more than confident at parsing XML; however, I've never delt with data on this scale before. So, I'm interested to know if anyone has any experience of dealing with this sort of build, and whether it is feasible to expect Flash to handle it. More on the data: I need to cross-reference and check data accross 3 xml files. They are all big, but the biggest, by way of an example in Excel form, has 25,000 records each with around 30 fields, often very string heavy. Any tips would be greatly appreciated? -- Jonathan Clarke 1976 Ltd http://19seventysix.co.uk e: [EMAIL PROTECTED] m (UK): +44 773 646 1954 m (Barbados): +1246 259 9475 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Jonathan Clarke 1976 Ltd http://19seventysix.co.uk e: [EMAIL PROTECTED] m (UK): +44 773 646 1954 m (Barbados): +1246 259 9475 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Actionscript 2.0 Class involving XML
Dunno if you have looked at this before but is very nice for dealing with xml in flash http://www.xfactorstudio.com/ActionScript/AS2/XPath/ Hey Everyone, I am wondering if there is anyone out there who knows Actionscript 2.0 Classes and XML extremely well. I have an Open Source Actionscript 2.0 class that is used to parse an XML file into Flash. Currently this class is only capable of reading 1 recordset of data from a specially formatted XML file which is causing a significant limitation. I need to modify the class so it can reference/parse multiple datasets. I have not posted the code or the XML here as it is kinda substancial, however I am looking to see if there is any expert out there who is up to the challenge. Please let me know and I will send the code. Al Veldhuis ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] strange compiler error
*Shrug* http://www.epresenterplus.com/blog/archives/30.html I tried deleting the aso files and restarted my computer - nothing helped :-( ---Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Friday, 9 December 2005 2:25 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] strange compiler error Are your classes on a network drive? This usually is a time stamp syncing error Try restarting your machine or deleting the aso files Hi there, I try compile a fla file with the flash 8 IDE. It always gives me this pointless error message. **Error** E:\vss_data\ActionScriptClasses\org\hubb\flashBrowser\UserVO.as: Line 2: The name of this class, 'org.hubb.flashBrowser.UserVO', conflicts with the name of another class that was loaded, 'org.hubb.flashBrowser.UserVO'. Where's the conflict here? That's the same class? All my project classes are in the same directory "org.hubb.flashBrowser"; My main class imports all required classes. e.g. import org.hubb.flashBrowser.UserVO' And here's the wired thing: When I try to compile this fla at home it works just fine. Also if I do a syntax check with MTASC it's not giving me an error. Any ideas? Robin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] strange compiler error
Are your classes on a network drive? This usually is a time stamp syncing error Try restarting your machine or deleting the aso files Hi there, I try compile a fla file with the flash 8 IDE. It always gives me this pointless error message. **Error** E:\vss_data\ActionScriptClasses\org\hubb\flashBrowser\UserVO.as: Line 2: The name of this class, 'org.hubb.flashBrowser.UserVO', conflicts with the name of another class that was loaded, 'org.hubb.flashBrowser.UserVO'. Where's the conflict here? That's the same class? All my project classes are in the same directory "org.hubb.flashBrowser"; My main class imports all required classes. e.g. import org.hubb.flashBrowser.UserVO' And here's the wired thing: When I try to compile this fla at home it works just fine. Also if I do a syntax check with MTASC it's not giving me an error. Any ideas? Robin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] simulating narrowband connection
Run Bit Torrent at full downloads ;) Hi there, Are there any tools out there that enable you to simulate a low bandwidth connection (e.g. modem or "slow" broadband connection) I'm currently working on a project which uses flv files that interact with my flash movie. In the past I always used the "simulate download" option in flash but this obviously doesn't work for flvs. Robin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] water simulation
Hey Miles, Thanks for that one, I have to admit twas a wee bit over my head, really need some working as2 code if anyone has anything similar. Thanks for the link though I will have a more in depth read when I got some time. Cheers Andy Andy, Didn't think this link would be much help. butthere's a quicktime animation at the end which demonstrates his equation, and there seems to be a slosh effect ... http://www.osc.edu/education/su_programs/si/si2005/projects/wave_motion/ Regards - Miles At 08:02 PM 11/28/2005, Andy Johnston wrote: Hi all, Looking for some actionscript to simulate a body of water that is contained in a rectangular box. Think cutting a swimming pool in half then shaking it from side to side. Anyone got some physics code that would generate a constrained sloshing around motion? any help or pointer mucho appreciated! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] water simulation
Hi all, Looking for some actionscript to simulate a body of water that is contained in a rectangular box. Think cutting a swimming pool in half then shaking it from side to side. Anyone got some physics code that would generate a constrained sloshing around motion? any help or pointer mucho appreciated! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
Nothing is "wrong" with it. Just seems an ugly way to deal with differences in scope. Why what's wrong about it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Friday, 25 November 2005 2:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP newbie question I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method "handleIncoming" can not access () or maybe even find) the method "parseMessages". If I give the complete path to the instance of the OSC class (made in my fla - for example "_root.OSC_Obj.parseMessages (xmlIn);" ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
http://www.javaworld.com/javaworld/javaqa/2001-09/01-qa-0914-delegate.html Thanks for all your helps. The Delegate class makes it works like a charm... On the other hand the self referencing is not working. Would it work that way (The Delegate class "solution") is an other OOP language like Java or C++ ? //h -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Thursday, November 24, 2005 10:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP newbie question I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method "handleIncoming" can not access () or maybe even find) the method "parseMessages". If I give the complete path to the instance of the OSC class (made in my fla - for example "_root.OSC_Obj.parseMessages (xmlIn);" ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method "handleIncoming" can not access () or maybe even find) the method "parseMessages". If I give the complete path to the instance of the OSC class (made in my fla - for example "_root.OSC_Obj.parseMessages (xmlIn);" ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
import mx.utils.Delegate; class OSC { var mySocket : XMLSocket; public function OSC () { connect (); } function connect () { mySocket = new XMLSocket (); mySocket.onXML = Delegate.create(this,handleIncoming); } function handleIncoming (xmlIn){ parseMessages (xmlIn); } function parseMessages (node){ } } Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method "handleIncoming" can not access () or maybe even find) the method "parseMessages". If I give the complete path to the instance of the OSC class (made in my fla - for example "_root.OSC_Obj.parseMessages (xmlIn);" ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Particle class
Now that we have open gl support on mac would be nice as as3 for 8.5 It's AS2 flash 7 minimum, but the particleFilters parameter only works with 8 (allows you to apply filter arrays to all particles individually). I've been looking at an actionscript 3 conversion but I'm not up to speed on AS3 yet so that may be a while yet. I'd be great to see the performance benefits though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Monday, 21 November 2005 11:04 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Particle class nah just messing with ya, it's real nice, is it 8.5 only? hows the speed in 7? and the real deal breaker 7 on mac? Hi Andy I've seen that, it's very nice but not quite what I'm trying to achieve. If you've ever used particle playground in after effects you'll see what I'm getting at. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Monday, 21 November 2005 10:41 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Particle class http://www.bit-101.com/Particles/ Hi all I've been working on a particle simulation class, and I've put the current source and an example on my site http://www.lookmumimontheinternet.com/blog/?p=13 It's a bit rough around the edges but if people could have a look and let me know what they think, that'd be great Cheers Phil Douglas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Particle class
nah just messing with ya, it's real nice, is it 8.5 only? hows the speed in 7? and the real deal breaker 7 on mac? Hi Andy I've seen that, it's very nice but not quite what I'm trying to achieve. If you've ever used particle playground in after effects you'll see what I'm getting at. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Monday, 21 November 2005 10:41 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Particle class http://www.bit-101.com/Particles/ Hi all I've been working on a particle simulation class, and I've put the current source and an example on my site http://www.lookmumimontheinternet.com/blog/?p=13 It's a bit rough around the edges but if people could have a look and let me know what they think, that'd be great Cheers Phil Douglas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Particle class
http://www.bit-101.com/Particles/ Hi all I've been working on a particle simulation class, and I've put the current source and an example on my site http://www.lookmumimontheinternet.com/blog/?p=13 It's a bit rough around the edges but if people could have a look and let me know what they think, that'd be great Cheers Phil Douglas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Apple using Flash for their new retail store reservation system
mmm flex Check it out! http://genius.apple.com/customer/?store=R050 Any news behind the developers? -Carlos- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Style sheet does not load - SOLVED
No worries miles, whenever im stuck on a bug I just can't figure it's usually something easily overlooked... Fresh eyes minds can make all the difference, helps to come at the blighters from a different perspective. Andy, Thank you - cut and pasted your styles into styles.css, and it worked. Hmmm. Looked VERY CAREFULLY at my definitions. Sure enough, in one style definition I had a "(" instead of "{". They look v. different here, but that pathetic parenthetic error looked like a bodacious brace in UltraEdit, and I had only a half-dozen styles to check!! Regards, and thanks again - Miles Thompson At 10:12 PM 11/17/2005, you wrote: I copied that into a test fla and all works fine for me... is your css valid? Heres some simple test rules: p { color: #00; font-family: Arial,Helvetica,sans-serif; font-size: 12px; display: inline; } a:link { color: #FF00FF; text-decoration: underline; } a:hover{ color: #99; text-decoration: none; } .headline { color: #FF; font-family: Arial,Helvetica,sans-serif; font-size: 18px; font-weight: bold; display: block; } .byline { color: #00; font-style: italic; font-weight: bold; display: inline; } Following examples from livedocs, help and a couple of tutorials, I've tried to load a style sheet into my movie. Nothing radical, the style sheet is named "styles.css" and is located in the same directory as the .swf. A new TextField.StyleSheet() object has been created. (Actually, all of the code I just cut and pasted from MM's livedocs, changing a couple of variable names. So I have the .load and .onLoad methods, yet never success - always the "Styles failed to load" message. Do I have to place styles.css on the web server alongside the scripts which feed data to the movie and fetch it from there? Suggestions and guidance, as always, will be welcome, code fragment is below. Thanks for looking at this - Miles Thompson Here's the code, much of it will look familiar ... var myCSS:TextField.StyleSheet = new TextField.StyleSheet(); var cssURL:String = "styles.css"; myCSS.onLoad = function(success:Boolean) { if (success) { trace("Styles loaded:"); var styles_array:Array = myCSS.getStyleNames(); trace(styles_array.join(newline)); txtNews.styleSheet = myCSS; txtHead.styleSheet = myCSS; } else { trace("Styles failed to load."); } }; myCSS.load(cssURL); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Style sheet does not load - puzzled.
I copied that into a test fla and all works fine for me... is your css valid? Heres some simple test rules: p { color: #00; font-family: Arial,Helvetica,sans-serif; font-size: 12px; display: inline; } a:link { color: #FF00FF; text-decoration: underline; } a:hover{ color: #99; text-decoration: none; } .headline { color: #FF; font-family: Arial,Helvetica,sans-serif; font-size: 18px; font-weight: bold; display: block; } .byline { color: #00; font-style: italic; font-weight: bold; display: inline; } Following examples from livedocs, help and a couple of tutorials, I've tried to load a style sheet into my movie. Nothing radical, the style sheet is named "styles.css" and is located in the same directory as the .swf. A new TextField.StyleSheet() object has been created. (Actually, all of the code I just cut and pasted from MM's livedocs, changing a couple of variable names. So I have the .load and .onLoad methods, yet never success - always the "Styles failed to load" message. Do I have to place styles.css on the web server alongside the scripts which feed data to the movie and fetch it from there? Suggestions and guidance, as always, will be welcome, code fragment is below. Thanks for looking at this - Miles Thompson Here's the code, much of it will look familiar ... var myCSS:TextField.StyleSheet = new TextField.StyleSheet(); var cssURL:String = "styles.css"; myCSS.onLoad = function(success:Boolean) { if (success) { trace("Styles loaded:"); var styles_array:Array = myCSS.getStyleNames(); trace(styles_array.join(newline)); txtNews.styleSheet = myCSS; txtHead.styleSheet = myCSS; } else { trace("Styles failed to load."); } }; myCSS.load(cssURL); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] When migrate to Flash 8?
we have only just moved into full support for flash 7 a few months ago. Any project which requires a broad section of the community to be able to participate needs to stay away from flash 8 for a fair while I would think. 8 has lots and lots of nice stuff for experimenting, and it would be great for controlled environments (intranets... etc), but I would take the macromedia stats regarding player penetration with a grain of salt I reckon. Hello flashcoders, I haven't upgrade to Flash 8 so far. Of course I'll do it soon ;-). But I have already read some of the manuals (AS reference, components etc) New features are great, definitely worth buying/using/migrating. The only question is "when"? Example: My product, Dynamic Blend v.2 Flash MX 2004 component, uses Color class (Flash 5-7). Have a look: http://www.gousable.com/flash/dynBlend.html Now in Flash 8 Color class became deprecated (in favor of the flash.geom.ColorTransform class). No doubt flash.geom.ColorTransform class is better, but it's "flash8-only". Most other deprecated functions are from Flash 4, so I think Color class will be supported until version 10 (or even 12 ;-). On the other hand, during the last year approx. 80% of my clients require compatibility with Flash Player 6, and approx 30% - with Flash Player 5! If possible, I don't want to force user to install something... I'd like to hear your opinion regarding this. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders