Re: [Flashcoders] Papervision Help
Well, papervision will be able to do that, and the docs are quite helpful. You'll have to be specific when you search google for this stuff though. I did find some nice tutorials on lighting and shaders that should be helpful but that I can't remember offhand. However, you might want to re-evaluate using the default flash 10 stuff. Lighting and shadowing live is only necessary if your object are going to change enough to make a difference. You might find you can get away with baking all that into textures and saving your processing power. Ashim The Random Lines My online portfolio www.therandomlines.com 2009/5/24 Omar Fouad omarfouad@gmail.com: Hi all, I am working on a project where I need to create 6 circles (planes) with different colors. the cirlces are placed one over the other and centered, so when I move the mouse down those they rotate to show something like a piramid. I could just use the native 3d in Flash but my boss needs each circle to be clickable, have a shadow and be shaded (lighted). I actually played around with papervision lately, using BasicView and some kind of materials, but now I feel frustrated as I just can't figure out how to do this work. Any Ideas? I also cannot find a decent papervision explanation on the net. What I am looking for is a conceptual explanation about papervision not just how to create some shapes and put them on the stage. -- Omar M. Fouad - www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ 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] stop() not working
Hello, if I create a new Flash file (AS3), press F9 and enter stop(); trace(-); then it will print that line just once as expected. But if I enter: stop(); trace(-); var user:User = new User(); addChild(user); user.x = user.y = 200; user.userid = 53; user.username = 'Алекс'; user.trix = 4; user.bid = 117; user.scaleX = user.scaleY = 0.8; user.avatar = '2_1211369175.jpg'; user.avatar = '458_1211369175.jpg'; Then I will see - being printed again and again. I wonder what's happening here. My class User uses a Loader and is listed at http://pastebin.com/m60cbb775 Thank you for any hints Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] stop() not working
Any chance that you are actually putting the code on the symbol definition instead of a frame on the main timeline, thereby creating User within User within ... ? You'd probably get a recursion crash, but it's possible. I would at this point try to isolate the problem a little more. If you think it's the loader, what happens when you comment out the loader? What about if user is an empty class? -jonathan 2009/5/24 Alexander Farber alexander.far...@gmail.com Hello, if I create a new Flash file (AS3), press F9 and enter stop(); trace(-); then it will print that line just once as expected. But if I enter: stop(); trace(-); var user:User = new User(); addChild(user); user.x = user.y = 200; user.userid = 53; user.username = 'Алекс'; user.trix = 4; user.bid = 117; user.scaleX = user.scaleY = 0.8; user.avatar = '2_1211369175.jpg'; user.avatar = '458_1211369175.jpg'; Then I will see - being printed again and again. I wonder what's happening here. My class User uses a Loader and is listed at http://pastebin.com/m60cbb775 Thank you for any hints Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] stop() not working
Thank you. Yes, I should investigate more myself. I was just hoping that maybe it's some known issue ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] stop() not working
I suspect you have some code somewhere that you've forgotten about - a gotoAndPlay hidden on a component someplace. - Original Message - From: Alexander Farber alexander.far...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, May 24, 2009 8:49 PM Subject: Re: [Flashcoders] stop() not working Thank you. Yes, I should investigate more myself. I was just hoping that maybe it's some known issue ___ 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] Papervision Help
Well my concern now is, how can I apply a light and a shadow to a MovieMaterial. I've searched the whole google for it but invain. On Sun, May 24, 2009 at 9:18 AM, Ashim D'Silva as...@therandomlines.comwrote: Well, papervision will be able to do that, and the docs are quite helpful. You'll have to be specific when you search google for this stuff though. I did find some nice tutorials on lighting and shaders that should be helpful but that I can't remember offhand. However, you might want to re-evaluate using the default flash 10 stuff. Lighting and shadowing live is only necessary if your object are going to change enough to make a difference. You might find you can get away with baking all that into textures and saving your processing power. Ashim The Random Lines My online portfolio www.therandomlines.com 2009/5/24 Omar Fouad omarfouad@gmail.com: Hi all, I am working on a project where I need to create 6 circles (planes) with different colors. the cirlces are placed one over the other and centered, so when I move the mouse down those they rotate to show something like a piramid. I could just use the native 3d in Flash but my boss needs each circle to be clickable, have a shadow and be shaded (lighted). I actually played around with papervision lately, using BasicView and some kind of materials, but now I feel frustrated as I just can't figure out how to do this work. Any Ideas? I also cannot find a decent papervision explanation on the net. What I am looking for is a conceptual explanation about papervision not just how to create some shapes and put them on the stage. -- Omar M. Fouad - www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ 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 -- Omar M. Fouad - Adobe Flash™ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] calling an event function with a parameter that is a number
Agreed! 2009/5/24 Steven Sacks flash...@stevensacks.net The latter is cleaner and better, IMO. Write a function that your event handler calls. Then, you can call it from elsewhere and from your button click handler. function onThumbClick(event:MouseEvent):void { loadImage(event.target.name); } function loadImage(num:int):void { // loadImage(num); } Juan Pablo Califano wrote: You have a couple of options: You could add an optional parameter to the function that handles the click, like this: function clickThumb(e:MouseEvent,index:int = 0):void{ } Setting a default value for the index parameter allows the function to be called without passing it. That's what will happen when a thumb is clicked. When you want to call the function directly, you'd do: clickThumb(null,image_num + 1); In clickThumb, check whether the event object is null or not. If it's not, do what you're currently doing. If it's null, use the index parameter as the index into my_images. Another thing you could do is a bit of refactoring. Have the click handler only resolve the index and calling another function to actually load the image. function clickThumb(e:MouseEvent):void { loadImage(e.target.name); } function loadImage(index:int):void { if (my_full_images[index] == undefined){ var full_url = my_images[inde...@full; ... etc ... } Then, from your other button's handler, call loadImage(image_num + 1); Cheers Juan Pablo Califano 2009/5/23 Isaac Alves isaacal...@gmail.com Hello! In my code there's a function that shows an image on the screen (or load the image and show a progress bar) that is called by clicking on a thumbnail, and uses a parameter [e.target.name] refering to the property name of the thumbnail clicked, which is an integer. The thumbnails are placed inside the cointaner_mc MovieClip. container_mc.addEventListener(MouseEvent.CLICK, clickThumb); function clickThumb(e:MouseEvent):void{ if (my_full_images[e.target.name] == undefined){ var full_url = my_images[e.target.nam...@full; etc... but I want to call this function by clicking on a button, which would need to pass another type of parameter, in this case, a variable which refers to the number of the image displayed on the screen plus one. I tried this: clickThumb(image_num + 1) But it doesn't work, I get the following error: 1067: Implicit coercion of a value of type Number to an unrelated type flash.events:MouseEvent. How could I call the function clickThumb and make it use image_num + 1 instead of e.target.name ? Could I dispatch the event (MouseEvent.CLICK, clickThumb), passing this value image_num + 1 ? Thanks in advance !! Isaac ___ 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