ActionScript 3.0 :: Width/2 Producing Strange Fluctuations?

Feb 9, 2009

I'm sure this is a really basic problem and hope someone can steer me in the right direction.I have moving objects on stage all with a width of exactly 100 pixels. They're part of a collision array. I need to know their radii so I created a variable that looks like this:radius = objectName.width/2;You would think that this would result in 50. However, when I do a trace of their values in an enterFrame loop, I get a range of numbers that looks like this when the objects are standing still:

Code:
51.325
52.075

[code]....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Button On Top Of Movie Clip Producing Strange Results?

Mar 23, 2009

So, at one time I w s fairly familliar with Flash, but I amnow returning to it I have a movie clip that Iam using AS3 to control, basically it slides out when your rolloverit and then slides out when you mouse off it. This is my code:

OPEN:
stop();
import flash.events.MouseEvent;

[code].....

View 6 Replies

Professional :: Settings When Producing For CD-ROM?

Feb 12, 2012

I am currently producing a CD-rom with educational content including film, quizzes, drag and drop and animation.some advice ?Here is what I am thinking so far..Stage 800x600frame rate 25 fpsIt has do have film and interactive goodness. Am I doing anything wrong so far? Film guys tells me that the film is 25 fps.Also I have production premiusm cs5.5 os is there a particular bit of software that I shoudl be authoring CD-rom with? or just make a projector file and use toast to burn it?

View 3 Replies

ActionScript 3.0 :: Getbounds Producing Insane Results?

Jan 14, 2012

I'm trying to get bounds of an object for more specific testing. but it's not functioning very well.The relevant code here, with some debug outputs:

Code:
private function getCorrectionVector(object:Array, block:Array):Array
{
var ret:Array = new Array();

[code]...

The debug output from running this , is this:

Code:
GCV: Checking objects: 95.7 344.2 0.35,1.35
GCV: Checking objects: 48 48 0,0

[code]...

View 2 Replies

Actionscript 3 :: OOP Not Producing Expected Result With If Statements And > Signs?

Nov 8, 2011

Below is my code:This code is used to find the surrounding nodes when supplied with a given node. i.e

for(var i:uint = 0;i < nodes.length; i++){
test_node = this.nodes[i];
if (test_node.row < node.row - 1 || tes

[code].....

View 1 Replies

ActionScript 3.0 :: Trace Array Not Producing Expected Results?

May 21, 2010

I am producing an array of numbers 1-25, shuffling and tracing the output. When I 'Test Movie' I am not getting the expected results. What I get is something like this.

[Code]...

View 7 Replies

Ionscript 3 :: OOP Not Producing Expected Result With If Statements And > Signs?

Jul 28, 2009

Below is my code:This code is used to find the surrounding nodes when supplied with a given node. i.e

for(var i:uint = 0;i < nodes.length; i++){
test_node = this.nodes[i];
if (test_node.row < node.row - 1 || test_node.row > node.row + 1) continue;

[code]....

View 1 Replies

ActionScript 3.0 :: ROLL_OVER And ROLL_OUT Producing Unwanted Results?

Jan 22, 2010

I want to create a MovieClip button that when the mouse rolls over it, it scales larger and then when the mouse rolls out of it, it scales back to normal size.If i move the mouse cursor over and out of it slowly, the animation is fine, but if enter the mouse over it on one side and out on the other side or jerk my mouse around it acts as if the EventListeners and their respective Tween code has been reversed. I have even seen on occasion the square filling the whole screen.Here's my code:(this is written from memory and not copy pasted from flash, but before you say anything, I do have the proper imports for classes in the code so I wont include them here.

Code:
var yTween:Tween = new Tween(myMc, "scaleY", Elastic.easeOut, 1, 2, 2, true);
yTween.stop();

[code].....

View 2 Replies

Professional :: Flash, Flex, AIR Which Is Best For Producing Small Interactive Apps?

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

Flash :: Professional - Producing For Desktop - Bypass Security Error?

Aug 9, 2011

We're producing a desktop application that includes html and swf in AS3. We get the following error: Adobe Flash Player has stopped a potentially unsafe operation. The following local application on your computer or network: C:UsersDave%20ZelenkaDesktopworld-source...world.swf is trying to communicate with this Internet-enabled location: C:UsersDave ZelenkaDesktopworld-sourcesample-htmlsample.html To let this application communicate with the Internet, click Settings. You must restart the applcation after changing your settings.

So, I know how to resolve this by clicking the settings. But our users won't want to do that. What doesn't make sense is that the swf file isn't pulling anything from the Internet. The world.swf file shouldn't be communicating with sample.html, and not only that, they are located in the same folder.

[Code]...

View 11 Replies

ActionScript 3.0 :: Add An Event Listener In A Class It Keeps Producing 1046 Error

Jul 31, 2009

When i try to add an event listener in a class it keeps producing 1046 error - Type was not found or was not a compile type constant

Code:
package {
import flash.display.Shape;
import flash.display.Sprite;

[code].....

View 9 Replies

ActionScript 3.0 :: Tweening - X And Y Properties Of Sprite Producing Jumpy Results

Feb 10, 2010

I'm trying to make a textfield inside a sprite zoom upon mousing over the sprite. I'm instantiating tweens on the x, y, scaleX, and scaleY properties of the sprite. The x and y tweens are needed due to the top left registration. Also, the tweens are added to an array to ensure they finish. Sometimes it works as I intended, but when I mouse over from the bottom right corner, the sprite jumps haphazardly towards the top left and back until I mouse out, instantiating another set of tweens to return the sprite to it's original state. I'm not sure what to do other than using a custom tweening engine such as Tweener. I'm using the built in tweening classes and I'm hoping to find a solution within these parameters.

View 5 Replies

Flash :: Move Objects In An Array Producing A Stadium Wave Effect?

Jan 29, 2010

I want to move all objects in an array producing a stadium wave effect, how do i do that?I want to move the objects based on their y-value on the stage... all my squares are of 50x50 in size. I want to move them up then move them down

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

[code].....

View 1 Replies

Strange Red Square Showing Up In .swf?

Apr 24, 2009

When I'm working on the .fla I don't see anything unexpected, but when I view the .swf or export it there's a little red square in the animation. It moves with some of the stuff I have moving in the animation like they're attached somehow, but I can't find it in the fla to get rid of it.

View 1 Replies

IDE :: Strange With Blur Function?

Mar 19, 2009

i've created a movieclip that i'm applying a simple blur filter to and in Flash when i play the timeline it runs with no problems although when i publish the movie the blur doesn't display - i've run out of ideas about why this could be! I've looked online and can't find any suggestions either - does anyone know what i'm doing wrong?

View 1 Replies

IDE :: An Xml Gallery With A Strange Effect

Apr 17, 2009

i really like this effect and i was wondering if anybody could point me to a tutorial that does something similar to this: i deleted the link because the site is not working anymore

View 2 Replies

IDE :: Strange Flv Player With Skins?

Jun 10, 2009

You click on tv, then on the first thumbnail and the video starts playing.When you resize the browser window the video stays centered.Thats exactly how I want it to
You can see the same example as before, but this time there are playbackcontrols which would be perfect if it wasnt for the fact that if you now resize thbrowser window, the video jumps almost its own width to the left.

View 3 Replies

IDE :: Strange Flash Occurence?

Mar 31, 2010

I have a website. You can see that website both by typing in(not REALLY my website...I'm just using examples here)This website has a flash intro that at the very end enables the user to either choose to go to the html version of my site or the flash version, each option represented by a button.The strange thing is that if I'm on theURL of my site, everything works ok there. However, if I'm on the version with the "www" added into the URL, those buttons don't work. You still get the little "finger" indicator, but when you press, nothing happens.

View 4 Replies

ActionScript 3.0 :: AIR Strange Lag On Buttons?

Jul 7, 2010

I'm working on a large AIR-app. When I run the project from Flash CS4, everything works fine. But when I run the installed app, some buttons will react very slow.

View 7 Replies

Actionscript 3 :: Canvas Total Width (visible Width + Hidden Scrollable Part)?

Apr 19, 2010

It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial.

I have a Canvas control with a fixed width and a horizontal scrollbar.I'm trying to find the actual width of the control.The .width (fixed width) + the part being revealed by the scrollbar.I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot.

View 1 Replies

Professional :: SimpleButton.width Doesn't Change - Width And Height Remain 0

Jun 1, 2010

I am looking at the SimpleButton entirely wrong. Here's what I'm doing (inside of a MovieClip):

[Code]...

the close_btn.width and height remain 0. Am I supposed to just rely on the DisplayObject members of the SimpleButton completely and ignore width/height/x/y or what?

View 2 Replies

Actionscript 2.0 :: Stage.width - Make A Minimum Width And Stop Resize?

May 27, 2009

is there a way to make a minimum width and stop resize? I have a menu I am building that is locked to the bottom of the browser and 3 buttons on the left and a movieClip on the right. When you resize the browser window - currently - you can make the button on the right sink under the three on the left.

[Code]..

View 6 Replies

CS3 Timer Acts Strange From Child Dir?

Apr 6, 2009

I created a movie clip that i want to act as a button. Inside that movie clip i place 2 graphic symbols (in different layers) that each have a tween of 30 frames. In a different layer i put a stop(); at frames 1 and 30. Then i create a fourth layer writing the following code for all 30 frames:

Code:
var rewind:Timer = new Timer(10);
var rootButton:MovieClip = MovieClip(parent);
rootButton.RR_mc.buttonMode = true;
rewind.addEventListener(TimerEvent.TIMER, rewindHandler);

[Code]...

1. On mouse over the movie clip (RR_mc) start playing normaly untill frame 30 where stops.

2. On mouse out the movie clip starts rewind going frames backwards. Now if i put my mouse over the movie clip, before rewind reach frame 1 the rewind stops and the movie start playing again. 2b. If the movie clip reach frame 1 after rewind, then is not stopping and continues to give frame 1 (if you put a trace(this.currentFrame(); you get infinite 1s). On mouse over the movie clip afterwards i can see that trying to start play but it's progress is max 2-3 frames before the rewind routine pull it back at frame 1.

3. If i transfer the timer and it's function to the parent directory then everything work fine.

I want to write all the code for the button inside the child directory of that button, is it possible?

View 3 Replies

ActionScript 3.0 :: Strange Bug Passing PHP Variables?

Dec 3, 2010

I've made [at least I'm trying to] a class that will make able to communicate flash with PHP [and MySQL].I've done this once before on the main time line and it worked perfect. This one is working as well but I get strange variables from PHP in Flash. Here are the codes:

[Code]...

View 1 Replies

Strange Display With Adjoining Buttons

Sep 23, 2009

I can't figure out why there is a display problem around the "Green Printing" button. Each of the button is created the same way, using the same graphics. Only this one displays incorrectly when the swf is produced.
 
[URL]
 
I have quadruple checked position and all the buttons are correct. No overlap.  If you right click and zoom in on the button in question, it looks perfect. only at 100% is the display problem visible and only on that button/area of the flash swf.

View 3 Replies

Php :: Strange Sequence Of Executing Commands?

Feb 27, 2011

I am beginner in FLEX programming , I am trying to implement a very simple LOGIN system using PHP, FLEX, MySQL.

protected function button2_clickHandler(event:MouseEvent):void
{
var create_new_user:Users= new Users();[code]..........

I have added the "alert.show" to check the sequence , it was really strange to find out the it is executing "6,5,4,3,2,1"..?? Which mean user is created before checking the verification result?

View 1 Replies

Actionscript 3 :: Strange Offset In Flash?

Dec 14, 2011

I need to check (for my own good reasons) whether the cursor is located within the bounds of a particular object. I'm using a simple code to do this...

if(mouseX > hsSlot1.x && mouseX < (hsSlot1.x + hsSlot1.width) && mouseY > hsSlot1.y && mouseY < (hsSlot1.y + hsSlot1.height))
{
//My code
}

This, theoretically, should work perfectly! However, there is an offset (and one I did NOT set, mind you!) of about 16 between the hsSlot1's visual position (where it appears to start on the screen) and hsSlot1.x. There is a similar offset on the y axis, but I haven't measured it yet.The only thing I can think of for this is that hsSlot1 is an instance of a button (one with only one state at that) that was scaled to fit. However, I don't think that is it, because the numbers show that the entire object is merely offset at its current size.

View 2 Replies

Put A Video In Website And Getting A Strange Result?

Oct 5, 2009

Im trying to put a video in my website and im getting a strange result. on my computer everything is working fine BUT when im trying to run it over the internet its showing me only the skin of the video player but not loading the video. The strange part is when im loading the file stright from the ftp server, its working fine...

View 2 Replies

IDE :: Tweenlite And Papervision Strange MouseEvents?

Mar 15, 2009

I made a spiral in pv3d using a mc for material and added a listener for the mouse events.Now the problem is that when i rollover my mc the rollover tween start and directly start the roll out tween.The clickhandler is rendered useless.So before adding tweenlite to the class everything works fine?

View 2 Replies

IDE :: Strange TweenMax When Fired By KeyPress()

May 12, 2009

Code:

base_scale = 70;
my_scale = 1;
scale_mod = 30;

[Code]....

EDIT: In fact, it is working now (behavior changed with updated TweenMax...?!), BUT still, when I zoom with mouseclick, everything goes well. When I zoom with a keypress, the image is resizing... but if the image is not centered, the registration point (set to center of the image) - the image is moving - for no reason...

Different results with the SAME function, no parameters etc.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved