ActionScript 3.0 :: Flash Small & Negative X / Y Coordinates Gliding And Creeping
Nov 11, 2010
I noticed this when testing a (physics) project where particles are moved across the screen by adding their velocity to their x/y coordinates.[code]The problem is that the sprite gets moved with steps of approx one twip (0.05 pixel) even at ridiculously low values of vx/vy like "-6.0277093305460 02e- 10". This only happens when the amounts that get added to the x/y coordinates (vx/vy in this case) are negative. No problem with positive numbers. The creeping stops when the square hits a stage edge.
View 5 Replies
Similar Posts:
Apr 27, 2011
<s:Group id="g1">
<s:Group id="g2" width="100" x="-40"/>
</s:Group>
I have a group that contains elements placed at negative coordinate values. I would like to get the total width of the group including parts of elements placed at negative values. In the example above g1.width returns 60 (100-40) but i like to get the value 100. In the example bellow g3.width returns 0 and still i like to get the value 100. How can I do this.I have debugged the application and no property of g1 or g3 is 100.I get the values I want if I use the Box class instead but how do I get the values i want with the Group class?
<s:Group id="g3">
<s:Group id="g4" width="100" x="-150"/>
</s:Group>
[code]......
View 1 Replies
Jul 17, 2011
check if a negative number is less than another negative number. The if condition logic seems to be in order as far as i can tell but it doesent work for some reason :
Code:
public function minuscheck(testnumber:int):void
{
if (testnumber < -1)
[code]....
View 6 Replies
Jun 10, 2011
Is there any Fastest way for this line?
ballAngelRadianVector = -ballAngelRadianVector;
And also this:
ballDegree = fee - ballDegree ;
View 1 Replies
Aug 4, 2011
I have an .swf navigation carousel that is 650 pixels high, the bottom 200 pixels being reserved for the reflection of the carousel. The reflection is very subtle and is not considered important information, so we would like to remove vertical scrollbars when the window is high enough to fit the topmost 450 pixels, but not the reflection.
I tried to accomplish this by setting a margin-bottom: -200px to the flash <object> but this only made the container's height shrink 200 pixels, causing the background pattern to cut before the bottom of the page.the Flash itself is still taking up 650 pixels.
Is there some "proper" fix to this, other than hiding/showing the scrollbars actively using javascript?
View 1 Replies
Dec 19, 2011
I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue
var lp:Point = new Point(e.localX,e.localY);
I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2
var lp2:Point = new Point(e.localX,e.localY);
now surprisingly it was giving correct values as expected and I went back and changed the code as
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);
now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.
View 1 Replies
May 21, 2007
I was reading the 'Isometric Transformations' tutorial by Danko Kozar and I have a few questions. I understand what all the code does, but not how it does it. First of all, how does the following code work:
transforms x,y,z coordinates into Flash x coordinate
xFla = function (x, y, z) {
// cartesian coordinates[code].....
I understand that it converts 3d coordinates to 2d coordinates, but I don't understand how. What numbers whould be punched into x, y, and z to acquire certain desired effects?Also, what's the difference between moveTo and lineTo:
red line
style(1, "0xFF0000", 100);
plot(0, 0, 0);
draw(200, 0, 0);
View 4 Replies
Dec 17, 2010
I have a large movieclip (2336 x 1752) and a stage of 800 x 600. I want to be able to drag the movieclip around the stage so no white is visible:
minimum x before I get whitespace: -1536
minimum y before I get whitespace: -1152
maximum x before I get whitespace: 0
maximum y before I get whitespace: 0
I have tried this:
Code:
var mcBounds = new Rectangle(-1536, -1152, 0, 0);
mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
mc.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
[code]...
But it doesn't drag at all...when I try it just moves it to it's maximum position and stays there.Is it because the rectangle can't have negative values?
View 2 Replies
May 3, 2010
Im making a little app in flash using papervision I want to make a regular movieClip show up in the same place as a papervision object. The coordinates seem like perspective is affecting the number displayed.
View 2 Replies
Dec 11, 2009
I have to place a flash movie into an existing layout. It is replacing placeholder image of the same size. The DIV holding the image has a negative top margin. When the flash movie is placed in the same spot there is a gap at the top of the DIV equal to the amount of negative margin. I cannot seem to get the movie to move to the top of the DIV (FF3).
View 1 Replies
Apr 3, 2009
I need to export a 60 animation from flash. It has text and image animation on the timeline, no actionscript. The swf file when published is 5 mb. When I export as an .mov, it is 768 mb. Also, there is some jumping and stuttering.
View 1 Replies
Mar 29, 2011
i want to find a easy tool to make a small flash
View 1 Replies
May 21, 2009
I have made a small rectangle in the flash with the tweening effect and export in to the FLEX. When i publish in the FLEX i could see the rectangle with out tweening effects.How can i see the tweening effects.
View 1 Replies
Mar 29, 2010
flash and working on two flash files for a website. They are small, 2.20KB and 4.10 KB. I am testing them on localhost and notice the object creates a box and an icon on the screen for both of them before they load and appear
View 3 Replies
Oct 12, 2009
I have made a total flash site but the exported site is 50 mb!! Not a usable size, so I want to know how to make this site 'smaller'. there are a ton of flash sites on the www, so I must do something wrong.. What is the normal file-size for a flash site?
View 1 Replies
Nov 11, 2011
I know how to use Source Path ( which is just an another source folder). But could never figure out how to make use of library path.I know using SWCs too.. but how can i use a bunch of classes which are not in SWC form, in my library path ?
View 1 Replies
Aug 8, 2010
I made a gear and created a 40 frame long tween for it using this: i36.tinypic.com/97tk0h.png @ 24 fps. But when the tween reaches the 40th frame and starts again from 1st frame there is a small small lack. I mean i pauses for very very very small time (almost not noticeable, but i see it anyway as developer). So is there any way how to make it work perfect with out the small lack/pause?
View 1 Replies
Jan 26, 2009
after loads of attempts trying to get my mail contact form to work ( very new to action script + php ) I finally got there! The only problem is i receive all this under the message..
[Code]...
The message is in there, but you can see this is a bit of a problem. Does anyone know how I can resolve the issue?
View 3 Replies
Oct 1, 2009
i have to put a news feed into a small flash app that i use as digital signage for my restaurant. I want to get some local news or maybe some sports news form sky sports.
What i need to know is what actual file i am looking for on the news site server, is it just a rss file or a xml file??Also i be able to automatically update the ticker when the news site updates their news??
View 1 Replies
Apr 19, 2010
I am just trying to write a small actionscript in Flash CS4 for a navigation button and I am really lost.
I turned Script Assist and can not figure out even the first line nor can I turn Script Assist off. Should I be using Script Assist and, if not, how do I deactivate it so that I can type directly into the text box?
View 9 Replies
Nov 29, 2010
I'm trying develop small iphone game with flash cs5, the first step i'm trying to do is scrolling big background with my finger .. the iphone application document size is width 320 x height 480 px, on the stage there is a big image 1280x800 px i want start scroll this big image with touching iphone screen in any direction to make the hidden parts appears ..
View 2 Replies
Aug 24, 2011
I've recently began learning flash after extensive training with photoshop. Anyway, I have created a forum signature, in photoshop. I want to add a small background video into it using flash. I was wondering how I can insert a video into an image in flash. If this is even possible.
View 3 Replies
Feb 11, 2010
I have a pure Actionscript 3 project, using flash.* libraries, compiles down to about 6k (using mxmlc). Program handles about 1k shapes, a few sprites, a sockets connection, works great (tastes less filling).
Now, how would I add a ComboBox control without incurring excessive bloat?[code]...
View 5 Replies
Jun 18, 2010
I have posted the following in the Adobe forums a couple of days ago. I didn't get a respond and I also think I accidentally posted it in the wrong forum. So here's the post:Let me introduce myself. My name is Wisse and I have been working with Adobe products since I was a child at the age of 8 (10 years ago). Well, then it was called Macromedia Flash but you understand what I mean. I have always been using flash for making animations and small simple applications (for presentations and games) in my spare time. I also use photoshop and dreamweaver for making sites and other things. So I will soon order the new CS5 web design collection.
I have a big (biggest so far) project coming up and before I really started I thought it'd be best to orient on what Flash application(s) to use and how I will make this project. So here is the plan:I am making a dutch driving exam site where people can take practice exams for a small text message fee. The application will have to look slick and work smoothly. I made this to clarify what the application has to do.I have never worked with Flash Builder and Catalyst but I kind of like the idea of making nice looking interfaces using Catalyst and then export them to Flash Builder. But as I just said, I have never worked with Flash builder and so I don't know whether I will be able to make this on Flash Builder (due to it's complexity). Flash builder also has some nice options for accessing external data (the XML, HTTP API and PHP in this case). Catalyst's data list designer and transition animator will save a lot of time and effort when compared to doing it manually in Flash Pro. The big issue here is that I have no idea how to script the rest in Flash builder. but I want to make to be sure that Builder is the best way to go before doing so.But on the other hand, I am quite familiar with flash and that could also save time. Flash is a bit harder to use when I want to make a good UI and Flash builder wins when you look at the server communication and the debugging tools.
View 5 Replies
Jun 21, 2010
I'm developing a little site for a friend. Though the filesize is v. small and it seems to load quickly, there is a delay playing. There are many objects duplicated in AS so undoubtedly this is the problem, but is there any way of initializing them so that the delay is slower? I'm using flash cs3.
View 3 Replies
Apr 28, 2010
I posted to the flash forum but really looking for feedback from flash, flex, AIR users as well.I'm looking for the forums thoughts and advice on which of Adobe's current technology set (CS5) is best suited for creating small interactive applications/packages by users who would not have any background in coding and very little interest in learning coding.
The idea is that users would know basic drag & drop development and maybe extend it to include some basic scripting to wire up elements of it. The ability to develope applications for a range of access points (website, mobile, desktop) would also an added benefit.The over arching idea would be to let the users create some apps/programmes/packages quickly on any topic they like but not bog them down with coding.Which CS5 technologies would be best for that
View 5 Replies
Jan 1, 2012
I need assitance in creating start button to a small flash movie I created.I like to put start button on very fist frame of the move .I did incest actionscrip stop() to prevent of it start running on load but now I need a button and scrip to start running.My skill in action script are limited.I try create simbol as button or movieclip.
View 4 Replies
Jun 10, 2011
We have recently made a new Flash website for our company (URL...). The Flash module itself is 800 pixels tall. We have CSS that centers a div horizontally and vertically that's wrapped around the Flash module (you can see the source of URL...) and when someone is on a browser on a netbook or a smaller laptop (sub 15-inch, generally), they don't have enough vertical resolution (after the real estate used by the Windows start bar and browser toolbars) to see the entire site.Whether you view the html page I've made (again, at URL...) or you view the Flash module itself (URL...) the top of the Flash module clips off the top of the browser. (To see the problem if you don't have a small laptop, just don't maximize your browser window and shrink it's vertical height.)I understand why my CSS is behaving the way it is, due to the nature of the negative top margin, but is there any way to solve this issue?
View 1 Replies
Feb 26, 2012
[URL]how do i stretch the movie to fill the entire white area which is set to be 500 to 350 px (please see pic)
the code:
<object type="application/x-shockwave-flash" data="videos/player.swf" width="500" height="350">
<param name="movie" value="videos/player.swf">
<param name="quality" value="Best">
<param name="allowFullScreen" value="true">
[code].....
View 2 Replies
Feb 23, 2009
Eversince I've worked with AS3, Flash always seems to have some odd way in rendering pixel-precise vectors. For instance, Friday I tried to draw a roundRect with a line around it. However, when zoomed at 100% it looks crappy and not how it's meant to look:So, when zoomed in in Photoshop you'll see more clearly that it's off:But whenever I zoom in with Flash itself, it looks OK:The quality is set to High, so that can't be it. Is there any flag in AS3 to make Flash render vectors more accurate?
View 1 Replies