ActionScript 2.0 :: Question About Lenses And Light Bending?
Apr 12, 2009
So, I'm in physics, but we didn't get to the light and lenses part yet... Anyway, I'm making a simple program showing how a laser would pass through a circular lens. I have the design down and it works and stuff... but the light bending isn't accurate. My source of the light is at an infinite distance (meaning the beams are parallel) My question is:How would light bend as it passed through a circular lens?
View 3 Replies
Similar Posts:
Feb 15, 2011
I have written a framework that facilitates RPC calls between AS3 and PHP 5 called FlashMOG. I recently got a forum request that has introduced a pretty bizarre question regarding access control.This will be a lot easier to discuss if you have access to the FlashMOG 0.3.1 client source which is here:[URL]...
The basic idea is that I have a FlashMOGService class which has an RPCSocket member that it may share with other FlashMOGService objects. The idea is that you can create two distinct FlashMOGService objects and have them both connect to the same host/port via socket. I use my special RPCSocket class for two reasons:
1) Let developers use one port but separate functionality into two distinct services...a form of multiplexing i guess
2) RPCSocket adds functionality to the standard Socket class that works to serialize and unserialize data and get it where it needs to go. The essence of the problem here is that this guy has created a class with a FlashMOGService object as a member and has tried to assign a private method of his class as an event handler to the FlashMOGService object:
[Code]...
View 0 Replies
Feb 15, 2011
I have written a framework that facilitates RPC calls between AS3 and PHP 5 called FlashMOG. I recently got a forum request that has introduced a pretty bizarre question regarding access control. This will be a lot easier to discuss if you have access to the FlashMOG 0.3.1 client source which is here:
[code]...
The basic idea is that I have a FlashMOGService class which has an RPCSocket member that it may share with other FlashMOGService objects. The idea is that you can create two distinct FlashMOGService objects and have them both connect to the same host/port via socket. I use my special RPCSocket class for two reasons:
1) Let developers use one port but separate functionality into two distinct services...a form of multiplexing i guess
2) RPCSocket adds functionality to the standard Socket class that works to serialize and unserialize data and get it where it needs to go. The essence of the problem here is that created a class with a FlashMOGService object as a member and has tried to assign a private method of his class as an event handler to the FlashMOGService object:
[Code]....
My initial thought is that this should be fine because it's all done within the class. However, when I consider the monkey chain that results in this function being called, it seems almost logical that it wouldn't work. The problem is that the browser freezes when a socket message arrives that tries to call the service's client method, _service.client.firstClientMethod. This client firstClientMethod is attempted when data arrives from the server on the Socket (an RPCSocket, actually). The RPCSocket class deserializes the socket data and extracts an array with a service name, a method name, and an array of arguments. It looks into its own private class variable (an array of services using the RPCSocket) and tries to invoke whatever function was assigned thusly:
[Code]....
I'm guessing there's some kind of infinite loop going on to check access control for the various intertwined classes.
View 5 Replies
Apr 8, 2011
I have a 6 button menu system: when user clicks on a main menu link it will highlight red and light up a light right to the left of the link letting them know they have clicked successfully. After the initial click it will bring down a sub menu with links. However, after they release the mouse button, the little green indicator light goes off. I want that little green light to stay on until they move the mouse outside of the slide panel with the sublinks. how do I keep that light on until user moves mouse outside of the bounding area of the sub-panel with sub links? what code do I need to insert?SECOND:When I go to publish in html, my slide panel which contains the sublinks is chopped off. How do make it were the submenu goes over and on top of my webpage contents right below it instead of increasing the size of my table.
Here is a copy of my code. I will be posting an image in about 30 minutes or less:
// ON CLICK EFFECT - The main menu's sub-menus will slide down once user clicks on a button.// The sub-menu will raise up and disapper once the user's mouse leaves the sub-panel area.
import fl.transitions.Tween;import fl.transitions.easing.Regular;import fl.transitions.easing.Elastic;
stop();
[code].....
View 22 Replies
Oct 16, 2011
I want to make a pulsating spot that looks like red light. The pulsating effect is done but the circle with gradient red goes from red center to black. I want it to go from red to nothing/transparent, so that whatever background can be seen through the edge of the "light". Is that possible? I use Flash 8.
View 2 Replies
Sep 16, 2011
I am in the middle of designing a 16 x 16 grid sequencer with a row of buttons that light up and sweep across the screen as shown in the attached picture. Basically i was wondering would this be best done in flash cs5 as its hopefully going to be coded with actionScript or should i use other adobe apps like illustrator etc? I was also wondering how to get the lights to trail behind as the lights travel across the buttons?
Just a quick query, i work with Lightwave 10 on the mac and i was wondering it it can be incorporated into flash cs5 at all?
View 0 Replies
Oct 9, 2011
Does anyone know, is it possible to control the camera flash or light With as3.Also the camera flash on the android.For instance can I turn on the camera flash light on android?
View 2 Replies
Oct 16, 2011
in order to use removeMovieClip, I think I have to use attachMovieClip first, right? What I want to happen is drag and item with the mouse, and then on release make it stop dragging and make it look like it returns to its original spot.
ActionScript Code:
mirror_inv.onPress = function () {
mirror_inv.swapDepths(1);[code]....
Also the commands attachMovieClip and removieMovieClip don't light up in AS. However just attachMovie and removeMovie do light up, not sure if that is same thing..
View 4 Replies
Mar 9, 2012
Our game is a bird-eye view game, with a dark atmosphere. The player carries a flashlight which can be used to brighten up the environment.So far, we've tried using masks, and although it works, it's not very effective. Every object needs a seperate mask, it tends to use a lot of CPU and is generally a mess to work with.I've considered using a system of black tiles at 90% alpha all over the room, which change their transparancy when the player moves near - but I was unsure.
View 5 Replies
Nov 19, 2003
I am really new to Flash n Actionscript and have been dropped in to make a switch that will make a light come on in the first click and off on the second, on on the third and off on the forth etc... I have created the switch as a button and the light on/off as two movie clips....
What coding would i be looking to add to make this switch work...
Previously I have been given this... but its not working
//this is for the button (switch)
on(release) {
if (_root.light_on:active == 1) {
setProperty("_root.light on", _visible, "1");
_root.light_on:active = "0";
} else {
_root.light_on:active = "1";
setProperty("_root.light_on", _visible, "0");
}}
//This is for the light on
onClipEvent (load) {
active = "1";
setProperty("_root.light_on", _visible, "0");
}
View 7 Replies
Jun 12, 2007
I'm trying to get a light that is hanging from the top of the page by a chord to be drag-able and then for them to be able to let go and the light swing back and forth. Right now I've got a pretty cool as that is onLoad it will swing and gradually slows down until it is sitting still, but I'd like to have it have a little more elasticity added to it for them to be have some fun with the hanging light..
View 1 Replies
Dec 6, 2009
I'm using shapes drawn to sprites to try and get a fog of war effect.Basically, I have a large black rectangle that goes over the screen as darkness, and I need to have multiple towers that have vision fields that would cancel out the darkness.I'm using masks too, but I can't get the right effect.
View 2 Replies
Nov 19, 2003
n Actionscript and have been dropped in to make a switch that will make a light come on in the first click and off on the second, on on the third and off on the forth etc... etc...
i have created the switch as a button and the light on/off as two movie clips... what coding would i be looking to add to make this switch work...
previously i have been given this... but its not working
//this is for the button (switch)
on(release) {
if (_root.light_on:active == 1) {
[Code]....
View 7 Replies
Nov 12, 2010
Was just wondering that tool do i need (an open source tool) to create a very simple table with a blinking light on an image and turn that into an .exe?
View 1 Replies
Jan 24, 2009
So I was working on making a button that will light up when I scroll over it, not instantly but more realisticly. The button starts out gray and when I scroll over it I want it to fade to red.
So I made a new AS3 Flash file and drew a simple gray box, made it a button, and inside the button I made the box a Movie Clip, shape tweened it so that it fades from gray to red in a period of 5 frames.
Now I'm just stuck on the scripting part, I made a new layer inside the movie clip for the script and have this typed in:
Code:
import flash.events.MouseEvent;
rectangle_mc.addEventListener(MouseEvent.MOUSE_OVER, mcOver);
function mcOver(event:MouseEvent)void{
play.rectangle_mc
}
I don't even know what import flash.events.MouseEvent; even means.
But what I'm trying to accomplish here is to make the shape tween Movie Clip only play when the cursor is over the button. So that when I scroll over the button it fades from gray to red. Sounds like a plan, but I can't figure out the function part where it says play.rectangle_mc,
View 2 Replies
Feb 29, 2012
I have got this menu from intronet and got it working, now am trying to be tricky, I want to have a way to make certain buttons light up when on a particular page, so for example I have got Brian's Vision button taking me to frame 2. How can I get certain buttons to be highlighted on that frame?Basically in my code so far I can listen to a button that is clicked and determine what text it has.. so who can I identify a button with a certain text and make it do something (without clicking on it?)
Code:
ans1.ans1text.text="beans";
ans2.ans1text.text="chicken";
ans3.ans1text.text="rice";
[code]....
View 5 Replies
Nov 10, 2009
Does anyone knows why light colors are kinda blury...
View 2 Replies
Nov 21, 2005
I am following the code from a site in which a text has light rays effect. But it the light ray effect is continuing even after the end of the movie. stopping the light ray effect of the text. The code for the light ray effect is as follows: i = "1";
[Code]...
View 1 Replies
Sep 20, 2010
I want to make a game which uses a light effect similar to left4kdead (link). I just can't seem to be able to find how this effect is called. It will be strictly 2d top-down view.
View 13 Replies
Nov 29, 2009
I am trying to modify my personal/work site [URL]. Recently found this great little flash player at flabell - files here: [URL]. The .fla file is included so colours can be customised, I want to lose the green and go with grey tones - I've bumbled about and pretty much changed everything, but I am stuck on one part - if you see the example (link above), and hover over the white rounded box where the play button/pause button is, the white box will fade into a light green. I cannot find how to change this light green anywhere. I've checked other files for a reference to the colour and really cant find anything, the only thing possibly I thought it might be is within project/source/caurina/transitions/properties/ColorShortcuts.as, but I haven't a clue how to change it or what to change..or even if it is within that file.
View 3 Replies
Feb 22, 2012
I'm just re-learning Flash after a 12 year break. How can I make the 3d orbiting light trails that appear on the 2advanced video on YouTube? Here's the link: [URL] Is it simply a case of making a single trail and then animating a mask along the trail to give the effect of movement?
View 1 Replies
Feb 28, 2012
This might be trying to be too tricky, but I have a set of keyframes on the timeline that correspond to the buttons on my xml drop down. When I am on a particular frame, I want the button for that frame and the mainItem button that it drops down from to have some sort of highlight or extra glow. This is meant to be so that a user can see where they are in the project at any time. All the code is included in my previous posts on xml drop down menu..
I can find the buttons by checking if they have certain text on them, so now I want to
1) Set a variable on each keyframe
var a:String="page1";
and then have some code that says
if(a=="page 1")....[go and get the button] e.currentTarget.menuText.text=="Questions" [and do something to it ]<-- except it wont be the current target it will just be out there with that text on it..
View 7 Replies
May 14, 2010
With sifr, how do I make a font use the light weight version. I have...
var gillsans = { src: '/resources/swf/gillsans.swf' };
sIFR.activate(gillsans);
sIFR.replace(gillsans, {
[Code]....
which is displaying regular Gill Sans, the light version has been exported with the swf (said so in the export report), but how do I get it to display in sifr?
View 2 Replies
May 24, 2010
I have tried to do this here [URL] but what I want is not this
but rather the equivalent of this. I don't see how:
action script 3 code below:
package {
import flash.display.*;
import flash.text.*;
import flash.net.URLRequest;
[Code]....
View 1 Replies
Nov 5, 2005
I'm currently using flash with a teleo board (hooks flash up to little electronic inputs) and im trying to use light dependant resistors to change the alpha of a mc.
The light dependant resistors give flash a reading between 0 and 32. 32 being bright light, 0 being complete darkness. Now I want to use those numbers to make an object 100% opaque in complete darkness (reading 0), and 0% in complete lightness (reading 32) then all percentages inbetween
['Code]...
Now that code works. but it does it the wrong way round. everything is 100% on reading 32. and everything is 0% on 0. I need reading 32 to = 0% and reading 0 to = 100%...im tired and can't see what to do to swap the figures around.
View 6 Replies
Aug 9, 2006
i want to make my right click menu contain my website name as this in [URl]..
View 2 Replies
Jul 8, 2009
I decided to make a sliding, growing flash of light slide from the right of the underline to the left then fade out.My brother has dabbled in flash and says that, using key frames, I could do something like have the light be a layer that I manipulate over a certain amount of frames. His other option was to make individual frames and just use flash as a frame organizer or gif animator.
View 4 Replies
Jan 23, 2009
I'm a student currently trying to learn Flash CS3. However I've encountered a problem with the paint bucket. In my assignment I've created a simple rocket, each part with it's corresponding layer. Now I need to go back in and fill the body in a light gray color. I did so successfully with the nose cone. The problem now is that the bucket won't fill any other area no matter what I do, or which layer is selected.
View 10 Replies
Dec 1, 2010
I have a home page thing. all the buttlons fly in and such all i need is so when a mouse hovers over a button it lights up or the brightness increases and when you remove the mouse from the button it goes back to normal
please help me out.
View 5 Replies
Nov 3, 2010
I'm attempting to code a system to handle real-time refraction and reflection of light in 2 dimensions (on an x, y Cartesian plane, basically) and I'm hitting my head against the wall even figuring out where to start on this. My concept for how this should behave goes like this: There is an object that shoots a ray of light (a laser beam or something) toward a target object. When the ray intersects with the surface of the target, somehow I need to find the normal vector to the surface of the shape at the point of intersection and apply some equations from first year physics to alter the path of the ray appropriately. The same refraction effect takes place as the ray exits the object. At the moment, I'm grasping for straws. I'm not even sure what kinds of objects exist in Flash's libraries that will work for me with this. The existing libraries for shapes won't let me create lenses like I want to, and I'm not sure what I'll need to make for an adequate "light" projectile or line to take on this behaviour.
View 11 Replies