Actionscript 3 :: Flash Mysterious Blinking MovieClip?

May 26, 2010

I'm creating bullets for a tank object to shoot.The tank is a child of the document class. The way I am creating the bullet is:

var bullet:Bullet = new Bullet();
(parent as MovieClip).addChild(bullet);

The bullet itself simply moves itself in a direction using code like this.x += 5; The problem is the bullets will trace for their creation and destruction at the correct times, however the bullet is sometimes not visible until half way across the screen, sometimes not at all, and sometimes for the whole traversal.Oddly removing the timer I have on bullet creation seems to solve this.The timer is implemented as such:

if(shot_timer == 0) {
shoot(); // This contains the aforementioned bullet creation method
shot_timer = 10;

My enter frame handler for the tank object controls the timer and decrements it every frame if it is greater than zero.

Bullet.as
package {
import flash.display.MovieClip;[code].......

View 1 Replies


Similar Posts:


Flash :: Blinking Movieclip With Timer?

Jul 22, 2011

i am trying to make my movieclip blink, it blinks when it is hit by something, to create the effect of a game.i have a hit test when it is hitted, caught is called on the object.the caught function of the object will make it stop and start to blink based on a timer.My timer is set on new Timer(400); why does my object not blink? my conditions seem to be correct.

if (hit.hitTestObject(f.hit))
f.caught();
private function blinkingHandler(evt:TimerEvent):void

[code].....

View 2 Replies

ActionScript 2.0 :: Blinking Text (as A MC) Effect With Optional Blinking Speed?

Mar 31, 2004

how one can use AS for blinking text (as a MC) effect with optional blinking speed? Mx-guest2004

View 4 Replies

ActionScript 2.0 :: Images Loading Without Blinking Into MovieClip

Jan 27, 2009

I have an issue with blinking (appear-disappear). I am calling 18 images into the empty .mc from the local drive.
MasterHomePage_mc.ImgButton1_btn.Img1_mc.Img1Holde r_mc.
isn't working fine and images are NOT blinking when they called up. But, once I have done a simple thumbnail image bar with spinning 18 images they start blinking. I think there is a problems with speed of loading images.

View 5 Replies

ActionScript 3.0 :: XML Mysterious Line Breaks?

Sep 1, 2008

I'm new to flash and AS3, and have just figured out how toload an external XML document into a textField, which is thenstyled via an external CSS document. The styling works fine,colours change, font size changes etc... But! And here's myproblem, when the xml data is loaded into the textfield, where Ihave nested styles, it creates a line break.I have created a textField on the stage with an instance nameof: eventsContentTextFieldWhich is set to dynamic, scrolling (with a UIScrollBarcomponent), html and multiline.

View 6 Replies

ActionScript 2.0 :: Mysterious Flicker When Reversing Playback

Jan 3, 2009

Take a look at this page [url]...

I have a movieclip with 100 frames which contain happy and sad faces alternatively. the playhead starts from frame 100 and skips a frame to 98 then 96 and so on until 2. it skips the sad faces.... but for some strange reason .. it flickers. [code]...

View 0 Replies

ActionScript 2.0 :: Mysterious Slow Down In MovieClips Process On Screen

Aug 1, 2009

My mc's move across the screen at the exact same speed. After a minute or so, they start to clump together. I think it's some type of inefficiently in my code slowing down the processing. I've attached the files. test.zip

View 1 Replies

Cursor Blinking When Flash App Opened?

Feb 17, 2009

I had written movie player for my website few months ago and I'm upgrading it by adding some new functionality from time to time. Not long ago I've observed quite curious behavior of my browser. If my site is opened in one of tabs in browser, the cursor is blinking, from arrow to handcursor, when I'm rolling over links. Interesting is that it happens in every tab opened in browser, if only one of them contains my website. Closing my site returns every other tab to normality. I tried opening my site with blocked this one .swf file (my player) and also was everything ok. I've tested this on few different browsers and systems and it seems to happen in MacOS (tested in Safari, FF2, FF3 and Opera) Windows (in FF2, FF3, Safari, Opera IE6, IE7 and Chrome), no matter if installed version of FlashPlayer is 9 or 10. On Ubuntu Linux it doesn't happen in FF3, nor in Opera (only this two browsers tested).

I've built my player in Flash CS3, using AS2. Unfortunately, I don't know in which version of my application the problem has occurred. Of course I could examine whole code line by line, but that's about 2.5k lines and it is not the work I want to do if not necessary... I've searched lot of forums, but I found solution nowhere. Maybe someone had spotted such a strange browser behavior or simply does know, what may cause it?

The problematic site is [URL]. If you want, open it in one of tabs and try to play with links in other, you'll see what I'm writing about.

View 2 Replies

ActionScript 3.0 :: Blinking An Image In Flash?

Jan 23, 2010

I have to display a movieclip image in flash depending on a variable is set or not, and when the variable is set to True it should blink as below.Show the movie clip for 500msec. Hide for 500msec and then show again for 500msec etc..

If the variable is set to false then it should be hidden immediately.

Presently i tried this using Timers and visible property of image.But this is not looking like natural blinking.Is there a way to achieve the blinking effect with built in properties of flash?

View 2 Replies

Flash :: TextArea Has Blinking Cursor?

Jun 16, 2009

Is there a way to tell if a Flex TextArea has a blinking cursor? One indication is if the component is focused: focusManager.getFocus() == textArea

But it's possible to have a blinking cursor without having the focus. I'm not sure if the converse is possible (focus without blinking cursor).

Edit: The rub here appears to be a distinction between "component-level" focus and "player-level" focus (per the FocusManager docs). I haven't yet found any great explanation of the latter or APIs to it.

View 1 Replies

Android :: Screen Blinking When Using A Webview With Flash

Feb 23, 2011

Edit: I made a demo apk, so you can understand what I mean: [URL]

For my application, I want a kind of "Super Power Point", or a keynote (the commercial team will present the product to their customers) using all the Android goodness, gestures, etc... on an Android tablet. As Honeycomb is not yet ready and because we need it before march, we choose some random Froyo Tablet (Archos 101), but my issue is for every tablet/phone I tried.

I made a really great application, but for some animations during the presentation, the customer wanted to use flash animations. Because I couldn't code animations (sort of little movies/ animated graphics) that easily in Android and the lack of time, that seemed to be a good idea.

So, after some search on the Web, I used webview and this code:

WebView mWebView1 = (WebView) findViewById(R.id.webview1);
mWebView1.getSettings().setJavaScriptEnabled(true);
mWebView1.getSettings().setPluginsEnabled(true);
mWebView1.loadUrl("file:///android_asset/graph_01.swf");

This work pretty well, but on every device I tried (Archos 101, Nexus One, Nexus S, Galaxy S, Xperia, Desire, HTC Hero, and really more) every activity with a webview blink, a few milliseconds of black screen, then the animation finally appear.

PS: My layout is quite simple too:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"

[Code]....

I cannot imagine I am the only one to face this issue.

View 1 Replies

Android :: Screen Blinking When Using A Webview With Flash?

Jun 5, 2006

For my application, I want a kind of "Super Power Point", or a keynote (the commercial team will present the product to their customers) using all the Android goodness, gestures, etc... on an Android tablet. As Honeycomb is not yet ready and because we need it before march, we choose some random Froyo Tablet (Archos 101), but my issue is for every tablet/phone I tried.

I made a really great application, but for some animations during the presentation, the customer wanted to use flash animations. Because I couldn't code animations (sort of little movies/ animated graphics) that easily in Android and the lack of time, that seemed to be a good idea.So, after some search on the Web, I used webview and this code:

WebView mWebView1 = (WebView) findViewById(R.id.webview1);
mWebView1.getSettings().setJavaScriptEnabled(true);
mWebView1.getSettings().setPluginsEnabled(true);
mWebView1.loadUrl("file:///android_asset/graph_01.swf");

This work pretty well, but on every device I tried (Archos 101, Nexus One, Nexus S, Galaxy S, Xperia, Desire, HTC Hero, and really more) every activity with a webview blink, a few milliseconds of black screen, then the animation finally appear.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"

[code]....

View 5 Replies

ActionScript 3.0 :: "Error #1006: Value Is Not A Function" With Mysterious Cause?

Jun 19, 2009

This is the line throwing the error:

Code:
trace((root as MovieClip), (root as MovieClip).manager, (root as MovieClip).manager.gotoAndFade)

[code].....

View 5 Replies

ActionScript 1/2 :: Play FLV After Another Without Blinking?

Jun 30, 2009

I have a flv player on stage, along with several buttons. Everytime I press a button, I change the flv file played by the flv player.

I would like to make the transition seamless - since the last frame of the first video is identical to the first frame of the second video, the second flv would start right away.However, the flv player blinks between a video and another, probably because it is loading the local file.

View 1 Replies

ActionScript 2.0 :: Blinking .swf When Loading

Mar 15, 2006

I was working lately on this tutorial: http:[url]....and I wanted to make sth similar but a little more complicated (only in looks - not in code).Its sth like this: I got a sheet of paper with loaded .swf file on it (same as in that tutorial); then the sheet wraps itself (the .swf file on it disapears because the sheet is a MASK); when it is wraped another .swf file is loaded (cannot be seen yet); and at the end the sheet unwraps and the new contet (new .swf) is revealed.

And I got this problem: when the new .swf file is being loaded it appears for a half of a second (even if there is NO MASK on it - and it shouldn't be seen!) before even the sheet begins to unwrap and then disapears and everything is going ok. No code errors. Why do I have such effect of blinking on load ? It completely ruins the cool thing with wraping. Can you give me any advice ? There is no such thing in mentioned tutorial

View 6 Replies

ActionScript 2.0 :: Random Eye Blinking?

Nov 24, 2010

This may seem trivial but for some reason I am having a difficult time getting the answer to this seemingly simple problem. I am trying to make an eye blink at random between 1-15 second intervals. I have a MC of the eye blinking, only 10 frames long, set on my stage (an outline of a head/face). On the first frame of the eye blinking MC labeled "Eye" I have this code:

stop();
random_number = Math.ceil(Math.random()*15000);
delay = setInterval(this, "play", random_number);

At first it seems like the code will work, then it appears to overlap itself over and over and over until the eye starts to blink rapidly without hesitation. Am I missing something? Or is the idea of getting this to work more complicated then it lets on...

View 1 Replies

ActionScript 2.0 :: Use AS And Blinking Text (MC)?

Mar 31, 2004

How one can use AS for blinking text (as a MC) effect with optional blinking speed?

View 4 Replies

Pages Blinking In Firefox & Safari?

Jun 3, 2009

When I go back and forth between pages they "blink" in FF & in Safari. For once IE is working how I would like it to and FireFox is not  Here is my url:  [URL]... I have a .swf file for the "icon rollovers" on the left hand side that I think is causing the problem.

View 2 Replies

ActionScript 1/2 :: Move Blinking Cursor Too?

Aug 15, 2009

I've got a main textfield myTextfield01. When I put focus on another textfield which is empty (either manually by clicking on another field, or like below using setFocus) I want the focus to go back to myTextField01 again. And put the blinking cursor and the very end of whatever is typed into it. So I tried this.
 
myTextfield01.onKillFocus = function(newFocus:Object) {    if (newFocus.text == "") {        Selection.setFocus(myTextfield01);        Selection.setSelection(myTextfield01.text.length-1, myTextfield01.text.length);    }}; 

But that didn't work. It went back to myTextfield01, but the blinking cursor stayed at the empty textfield and any text typed would be added to that empty field.When I put this in frame one:
 
myTextfield01.onKillFocus = function(newFocus:Object) {    if (newFocus.text == "") {        nextFrame());    }}; 
And this in frame two:
Selection.setFocus(myTextfield01);        Selection.setSelection(myTextfield01.text.length-1, myTextfield01.text.length);   

it did work. Both focus and cursor where in myTextfield01 again.So why doesn't it work when I combine it all in one frame?

View 10 Replies

Professional :: Blinking Buttons When Mouse Over Them?

Jan 31, 2011

I mouse over my buttons and they blink as I move my mouse accross a row of buttons like stop, rewind, reset and home.How can I stop them from blinking as I move the mouse in between them. All the buttons are iniside a movie clip so they shouldn't blink when I put the mouse in between them since they are all in one movie clip call controls_btn?

controls_btn.buttonMode = true;/help_btn.buttonMode = true;cover.visible = false;gotoAndStop(5);
controls_btn.addEventListener(MouseEvent.MOUSE_OVER,

[code]........

View 3 Replies

ActionScript 3.0 :: Unwanted 'blinking' On Roll_Over?

Nov 11, 2009

Basically I'm creating two (can be more or less) rows of layered MC treaten as Buttons.In each MC there is a small thumbnail hidden behind a coloured layer. When roll_over the coloured layer, this alpha goes to 0(zero) and entire MC resize +10% over x and y.On roll_out the opposite occurs, everything should get to the original alpha and size.

The Problem: when moving the mouse really fast over the MC's and stop suddenly over one of them it starts 'blinking' (size and alpha goes in and out and won't stop unless you move the mouse a little)

ActionScript Code:
for(var i:uint =0; i<16; i++){
var miniPnt:MovieClip=new LittlePantone();
miniPnt.x=_xc;

[code]....

View 2 Replies

ActionScript 2.0 :: Blinking Car Lights With The Rhythm Of The Music?

Mar 17, 2009

I am making a website for myself and I want to make something like:That the carlights are blinking with the rhythm of the music from my flashmusicplayer. [URL]

View 1 Replies

ActionScript 3.0 :: Link Button Blinking Continuously?

Nov 21, 2010

Link button blinking continuously. The link button should only change property when on mouse-hover.

View 1 Replies

ActionScript 3.0 :: 3D : Z-Sorting Make Blinking My Sprites?

Jan 16, 2011

It seems that I can get working the z-Sorting on my projects.I have created 3 bubbles, which are moving following an ellipsis rotation on a 2D plan laid out in 3D on the scene. During the z-Sorting, my bubbles are blinking, as if they were constantly interchanged between them.Here is the code responsible:

private var bubbles:Vector.<Bubble> = new Vector.<Bubble>();
public function ReorderChildren()
 {[code].....

However, it seems that removing the for loop (which performs root.addChild), and apply the same sorting function upon the vector, bubbles are still blinking.

var bubbles:Vector.<Bubble> = new Vector.<Bubble>();

Adding bubbles to the scene for each (var flyer:FlyerVO in flyers) {
   
var bubble:Bubble = new Bubble(flyer);
    root.addChildAt(bubble);
    bubbles.push(bubble);[code]....
 
The simple fact that sorting the vector (which contains only references to Bubble object) make them blink.Is there any way to attach my project folder to illustrate the bug ?

View 16 Replies

ActionScript 3 :: Blinking Tooltip When AddChild (Textfield)

Sep 21, 2011

Here is piece of class which called right after I already drawn some objects in it, problem is when I have sprite.addChild(textfield) included it starting to blink alot.

addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
} private function mouseOverHandler(e:MouseEvent):void{
//creating a new tooltip instance
[Code] .....

View 1 Replies

Java :: Update Photo In Flex Without Blinking

Oct 27, 2011

i am trying to simulate a live view using a canon Camera. I am interacting with the cam using the CanonSDK, i get an image every a short period in order to simulate a video frame by frame. This works fine, i am using java to do the backend and send the images trough BlazeDS to flex. The problem is not getting the image, the problem is that when i load a new image using something like:

[Code]....

View 1 Replies

ActionScript 2.0 :: Thumbnail Images Blinking While Animating?

Jan 27, 2009

I am calling 18 images into the empty .mc from local drive. MasterHomePage_mc.ImgButton1_btn.Img1_mc.Img1Holde r_mc. ist working fine and images are NOT blinking when they called up.

But, once I have done a simple thumbnail image bar with spinning 18 images they start blining.

I think there is a probles with speed of loading images.

View 0 Replies

ActionScript 3.0 :: How To Move Blinking Text Cursor

Apr 30, 2010

I am using a text Input component that captures a phone number. What I am trying to do is have an "-" be inserted after the first 3 (area code) digits have been typed and again after the next set of 3 digits.

[Code]...

Everything is working fine except that the type cursor does not move to right after the "-" has been added.

View 1 Replies

Actionscript 3.0 :: Link Button Blinking Continuously

Nov 22, 2010

When I tested my flash file, the link button kept on blinking continuously, then the Compiler Error shows this error message- "Tweener.as, Line 1 5007: An ActionScript file must have at least one externally visible definition." I am attaching the flash file for those good samaritans

View 1 Replies

IDE :: Movie Clip Blinking On Published WebSite?

Mar 16, 2010

I'm having the following problem. The menu movie clip on my website keeps blinking when I publish on the web. I don't have that problem when I'm testing on the CS4 flash player. I've gone over the code to check for something funny but everything looks good. May be this looks familiar to somebody. Here is the url.

View 1 Replies







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