ActionScript 2.0 :: Coding GotoAndPlay Variable Enemie_life Drops

Mar 25, 2012

I have trouble with a script for my game project. I can't figure out what I'm doing wrong. This is the code I'm using:

[Code].....

Now, if the variable enemie_life drops to 0 (which I'm tracking with a dynamic text box) it just ignores frame 241 and continues with the second part of the code. There I have another problem: from my understanding (and the way I'd like it to be) it should give me a 3/1 chance to go to 126 and otherwise go to 181. The latter almost never happens. It seems more like a 100/1 chance (and I tried it often ...).

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Simple Coding - Adding Variable To A String?

May 8, 2011

I can't figure out what the syntax is for this in Actionscript. Basically, I have a variable I want to add into a string that will call a certain frame based on user's language selection.

[Code]...

View 5 Replies

ActionScript 2.0 :: Coding Error : Left Side Of Assignment Operator Must Be Variable Or Property?

Nov 14, 2011

I have a swf that I want to edit.I decompiled it and edited the one value I wanted to change (It was how many items were displayed). Now, I get a few AS I cannot fix, I know enough AS to get by, but this is above my head.I have two errors, they both say: Left side of assignment operator must be variable or property.

ActionScript Code:
function goNext()[code]..........

I marked the lines that have syntax errors.they are hosted on my test server and I can PM you links. (I am building a website and don't want the link out there.

View 6 Replies

String Variable With GotoAndPlay?

Apr 8, 2009

I am trying to go about a "smarter" way of setting up multi paged full flash sites. This has got to be something very simple that i can't seem to put my finger on.

I'm trying to create a variable called 'currentScen' that i can declare off the start and change depending on what page the viewer goes to in the site.

I could put a bunch of 'if' statements saying that 'if the current page is this page then do this, if it's this page do this' etc. for each individual page but i thought there must be an easier way.

I am trying to get the following to work:

Code:

// declaring what the starting page is
var currentScen:String = "welcomeMovie";
//function fading in called page with animation used on the 'over' frame label
function animateOn(page:String) {

[Code].....

View 1 Replies

ActionScript 2.0 :: Using Variable In GotoAndPlay?

Sep 21, 2005

Im working on a flash menu right now and I wan to create a dynamic gotoAndPlay. but I need to insert a variable into the target path right now here is what Im doing.

Code:
MyVar="FirstMC";
_root.Nav.MyVar.gotoAndPlay("out");

and right now Flash doesn know what to do with it... I would like to make this variable global also which is nothing more than throwing the _global command before my variable right?

View 2 Replies

ActionScript 2.0 :: CS3 Using Variables Value In Variable.gotoAndPlay Instead Of Its Name?

Jul 19, 2009

for (var i=1; i<=arrayCount; i++){
var temp:String = "editremove_mc";
temp += i;

[code].....

View 2 Replies

ActionScript 2.0 :: On Release, Set Variable And Gotoandplay?

May 2, 2011

Haven't touched Flash in years... trying to do something simple, but it isn't working well. Guess I'm REALLY rusty. I have a flash video with 3 button. Initially, I set a variable (frame 2)

Code:
var x = 0; Then I have the 3 buttons. One of the buttons has the following code (the two other buttons have similar code, but set different variables)

[Code]...

View 4 Replies

ActionScript 2.0 :: Include A Variable In Gotoandplay();?

Feb 23, 2004

I try to include a variable in gotoandplay(); like:

on (press) {
gotoAndPlay(_root.strScene, 1);
}

it gives me an error and say it must be quted, i tryed everything and im sick of it and i will breack my pc

View 1 Replies

ActionScript 2.0 :: Write A GotoAndPlay With The Addition Of A Variable?

Nov 25, 2009

So I've defined my variable:_global.current = 1;And below i am accessing an MC called 'carousel_holder', which has an MC named 'bar' and inside this MC is a final MC named 'bar1'.So ive tested my path and can hard code it fine, so its not a paths issue but i think my syntax is incorrect:_root.carousel_holder+".bar"+current.gotoAndPlay(" start");

View 4 Replies

ActionScript 2.0 :: GotoAndPlay(frame); Depending On A Variable From Php?

Apr 28, 2004

I have set the variable in my page using <param name="flashvars" value="menustate=<?php $pagename; ?>"> which works perfectly fine when I use a dynamic textbox in flash with the var name menustate.

But I need to send a MC to frame 2 if 'menustate = 2'. Anyhow, I just want to know how to control a MC with an external var. I can't use loadVars () because this var is coming from any page, not just one.

View 5 Replies

ActionScript 2.0 :: Write A If Statement That Will GotoAndPlay According To That Variable?

Sep 22, 2005

In my movie I load a swf to a movieclip with this code


PHP Code:

 _root.ImageViewer.loadMovie("deneme.swf"); 

Now can I do this? before calling the swf named deneme. When I press a button If I attain a number to a global variable with this code

PHP Code: on (release) {_global.myVar = 5;gotoAndPlay("CloseUpAnimation");} 

Can I read this variable from the swf which I load into my movie?If I can read how can I write a If Statement that will gotoAndPlay according to that variable?

PHP Code:[code]...

View 4 Replies

ActionScript 2.0 :: Variable Reaches 0 GotoAndPlay Frame 4 - Doesn't Work

Jul 12, 2009

When a variable reaches 0 gotoAndPlay frame 4

ActionScript Code:
//Variable Name: ammo
if(_root.ammo = 0;
_root.gotoAndPlay(4);

Doesn't work maybe?

View 1 Replies

ActionScript 2.0 :: Goto And Play Scene - _root.gotoandplay And Even Scene1.gotoandplay Won't Work?

Nov 9, 2007

For some reason i'm having problems swapping scenes in my flash movie. At first i put the action in a "actions" named layer and a link to a button. So basicly when scene1 loads the frame 1 action is "stop ();". The viewer clicks on button1 which has a code of;

[Code]...

View 1 Replies

Professional :: SWF Drops Out Sound

Apr 27, 2011

We have created a SWF file with sound. When importing that SWF into another FLA. file as a movie clip, the sound on the SWF is gone

View 2 Replies

Frame Rate Temporarily Drops After Export?

Feb 6, 2012

My animation is complete. Previewing it (.swf) works perfectly fine. Playing it in flash works perfectly fine.But once it has exported to .mov the frame rate temporarily drops in certain places (usually around tweens)...

View 6 Replies

All Tweened Alpha Animations Drops On Exporting SWF

Oct 28, 2009

Sometimes in Flash, alpha transitions will just drop out without reason. They still appear in the preview mode, but when you export a swf it drops all tweened alpha animations. they become cuts instead. I've even tried opening the same file in CS4. Same dilemma.

View 1 Replies

Professional :: Water Drops Effect With Textbox?

Feb 9, 2010

i want to make flash file in which, when i click anywhere one water kind drop come from top to down and when it reach bottom it distribute in so many parts.after this one textbox will display and i am able to enter some text in that textbox.

View 3 Replies

Media Server :: RTMFP Drops A Lot Of Packets?

Jun 3, 2011

a client publishes a simple webcam and microphone. I noticed that if I use rtmfp the admin console shows between 30 to 200 messages dropped for a simnple webcam at 320x240 10fps quality 69 and audio speex at quality 6. sor after some minutes the video is unsynchronized with the audio. I turned off aggregateMsg and queue. if I use RTMP there is 0 dropped packets.
 
Is anyone can explain why FMS 4.0..1-r2009 on linux 64bits High Internet speed line on client side without any bandwidth problem last flash player

View 1 Replies

ActionScript 3.0 :: Game FPS Drops Upon Playing For 3 Hours

Sep 6, 2011

I am a game programmer and i have made  a game where there is a character which has to select the right pieces and avoid the wrong ones. the pieces/food come from top, the character jumps and fetches them. Thats why we are keeping a gap between the pieces to avoid the character touching the wrong ones.

Problem : When I win the game and keep re-playing it continuously for more than an hour i notice that the gameplay gets slow(slow FPS). The behavior and movement of the characters become slow. Upon playing for 3 hours the slowness is easily noticeable. This also happens when I minimize the game window or get the focus off the game to some other window for a long time (half an hour or more). The problem doesn't come if I play once or if I lose the game and try again. This comes when I keep playing it for a longer time.

View 1 Replies

ActionScript 3.0 :: Reconnect To Socket After Connection Drops?

Dec 22, 2011

I would like Flash to reconnect to a socket if its connection is dropped. I am using the Socket class to establish a connection and then adding an Event.CLOSE listener to the socket. What is a good strategy to reconnect back to the socket if the connection has suddenly closed? Here is a the method I am calling inside the close handler. The connect() method establishes a new socket connection

HTML Code:
private function handleOutage():void
{
// if socket is not connected

[code]...

However, I keep getting the following error:

HTML Code: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation

View 1 Replies

ActionScript 2.0 :: How To Create Rain Drops Effect

Jan 21, 2009

Trying to create rain. I found a snow tutorial and still working on the rain.

View 5 Replies

ActionScript 2.0 :: Rain Drops Falling On Head?

Sep 12, 2003

I want "rain drops" to fall randomly and then when they hit the bottom most pixel of my stage to run another movie clip called "splash" so it looks like it is raining and the "drops" could fall and "splash" at the bottom of the stage.

View 9 Replies

ActionScript 2.0 :: Rollover A Button The Submenu Drops Down?

Nov 1, 2004

first post on here and many more to come I am sure. I have a simple question on a FLA I downloaded from ultrashock. You can download the FLA here

Currently when you rollover a button the submenu drops down, but I was wanting to make that drop down menu animate above the button that is rolled over.Make sense? For some reason I just don't see where you make this change in the code.

View 1 Replies

ActionScript 3.0 :: FLV Audio Quality Drops When Viewed Online

Jun 26, 2009

I have a FLV playing in my SWF and when viewed locally in Flash or just in the Flash player by clicking the file on my desktop the file plays fine with decent quality audio. However as soon as I upload the file to my website the audio quality seems to drop.

View 9 Replies

Professional :: Image Quality Drops Due To Flash Rescaling?

Sep 9, 2010

The site is build up entirely in flash. I let flash publish with the option scale: default (show all).
 
Can that be the reason why the pictures on the site look so bad? The picture looks so unsmooth, you see so many pixels in the borders. How come?
 
[URL]

View 3 Replies

Media Server :: Application Drops: Еxperienced 1 Failure[s]

May 29, 2011

I had a problem - the server disconnects all clients of application at different time intervals.
 
master.00.log says: 
 
2011-05-29 07:23:02 913 (i)2581223 Core (1319) is no longer active. -
2011-05-29 07:23:02 913 (w)2581256 Core (1319) _defaultRoot_:_defaultVHost_:::_2 experienced 1 failure[s]! -
2011-05-29 07:23:04 913 (i)2581259 Recovering core _defaultRoot_:_defaultVHost_:::_2 with 1 failure[s] after 1 seconds! -
2011-05-29 07:23:04 913 (i)2581221 Core (9872) started, arguments : -adaptor "_defaultRoot_" -vhost "_defaultVHost_" -app  -inst  -tag "_2" -conf "/opt/adobe/fms/conf/Server.xml" -name "_defaultRoot_:_defaultVHost_:::_2". -

[code]....

View 3 Replies

ActionScript 2.0 :: Masking - Displaying Picture Through Water Drops

Apr 12, 2004

I have a code that duplicates a movie clip that then falls across a picture. They are sort of like water drops on a window but I want the picture to only be seen through the water drops. My problem is I can't get more than one drop to mask the picture at a time. I have tried code in the duplicated MC and I have tried pasting a bunch of instances to the stage and creating a mask later. The following is the code of the duplicated movie clip where _root.drop is the falling mask and _root.bg is the picture I want to see through the drops.

onClipEvent (load) {
var framecount = 0;
if(this != _level0.drop){
this._x = random(795) + 15;
this._y = -30;

Btw, a published edition of what I currently have is available at: [URL]

View 1 Replies

Professional :: CS4 Flash MovieClip - Rain Drops With Small Splash Animation

Mar 30, 2010

I have started this animation and I am turning rain drops into movie clips with a small splash animation in the clip. I can just copy and paste them so I won't have to animate each one or do programming. When I test this with the swf file they turn out fine. But when I try to export this into a jpeg/png,or avi the full animation in the movie clip  doesn't work. It just shows the first frame. Is there a way to make this work since I would really like the single jgep files or avi since I need to transfer this to other programs. I thought there was a way to do this but I cannot remember or I don't know if they changed it with cs4 XD.

View 4 Replies

Media Server :: 4 And 3.5 Drops Live Stream After Some Time, When Publishing From FFMPEG?

Sep 15, 2010

I'm having a reliability problem with publishing live, h.264 streams from FFMPEG (using the rtmp publish ability now built into FFMPEG, where I can set an rtmp address as the output).After a random period of time (usually between an hour and several hours), the default "live" application in FMS 4 (or 3.5) eventually drops the connection from the FFMPEG encoder. This is what appears in the log for the application:"Dropping application (live/_definst_) message. Clients not allowed to broadcast message."After googling the error, I discovered that people have been reporting this error for several years, but there has not been a single response from any FMS experts or Adobe about what causes the error.

View 6 Replies

Media Server :: Netstream.seek - Parameter Gets Updated And Drops Backs After Update

Jun 18, 2010

I am using OSMF v1.0 along with FMS 3.5.3 and flash player 10.1. Whenever i do a seek, lets say to a time 't'. Netstream.time gives me an incorrect result which is more than 1.5*t (varies). So if i seek to 100, i get netstream.time as approx. 160. I also noticed, 'NetStream.info.VideoBufferLength' goes very high (from around 3-4 to 50-60) just before the Netstream.time parameter gets updated and drops backs after update.

View 1 Replies







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