ActionScript 2.0 :: Flash8 : Passing Variables To PHP?

Mar 3, 2009

Ive got a script lined up:

Code:
onEnterFrame = function(){
if(aktiverPublisering == "true"){
function avpubliser(){

[code]....

Ive checked if "aktiverPublisering" traces "true", and it does (it declares "true" through a button)... So, here's the weird part...i cant get a trace inside the IF statement i.e. its not working...

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Flash8 : SetInterval And Passing Variables?

Mar 12, 2009

So I have a laser game I'm working on and I have a setInterval set up for when the laser button is pressed that it shows the laser for a little bit before removing the incoming asteroid and hiding the laser. I have a four of these buttons each with different colored lasers. So I thought it would be easy to pass the movie clip in through the function, cause I've done that with regular functions. Problem is, I don't know how to do that with a setInterval function. The way I have it set up shows the lasers then crashes and just shows a blank screen. Here is a bit of my code:

Code:
function laserMultiFire(laser:MovieClip) {
if(astroid == true){
_root[laser + "L"]._visible = true;

[code]....

The btnMulti is one of the buttons, and there are three movie clips that represent the lasers, the ones I'm trying to show and hide here are mcLaserMulti, mcLaserMultiL, and mcLaserMultiR.

View 1 Replies

ActionScript 2.0 :: [Flash8] Passing Variables To Child.swf?

Jan 7, 2007

how to pass variables from a parent swf to a child swf loaded into a movieclip container within the parent swf.

View 6 Replies

ActionScript 2.0 :: Flash8 - Passing MC Coordinates To A Function Within A Class

Jul 21, 2009

I have a class named Test in Test.as file :

Code:
class Test{
public function set movePlayer(_Playah:MovieClip):Void {
trace(_Playah._x);

[Code]....

and when I "run" this function in my .fla file, its says "undefined" (for this position) how to "pass" MC informations to a function inside a class (x,y coordinates, rotation..) although when I trace only "_Playah" it shows the correct name of MC i've passed to it.

View 2 Replies

ActionScript 2.0 :: Flash8 : Passing Time As A Variable On Other Frame?

Jan 24, 2010

Basically, I wanted to 'save' the time thats been recorded in each of the 5 'games', so at the end there is a 'scores' page, with your times for each of the games.

I have managed to get the timer working for the games itself, but cannot find / work a method which saves them to the last frame?

I thought possibly converting the 'elapsed_time' into a different var (t1,t2 etc..) for each of the games? - doesn't seem to work timer_not_saving.fla

View 1 Replies

ActionScript 2.0 :: Flash8 Passing ID From Javascript Without Page Reload

May 21, 2010

I've made a XML based Mp3 player using Flash 8 and AS2. The player is working just fine, I mean playing song on previous and next button. Now I want to enlarge this and my idea is to list all the mp3s on a PhP page and allow user to listen to any song randomly. This means, user can click any song name and that song will start playing in the player.

My problem over here is; the song listing and the player will be on one single page and clicking on any song wont reload that page to play the selected song but just reload the content of the mp3 player.

I know this can be done in Javascript. My thought on this is:
On clicking each song name, I need to call a JS function and pass to it the "ID" of the song. This JS function needs to pass "that ID" to the swf which will play the song.

Keeping aside the complexity involve in ActionScript to fetch the song name as per the passed ID, I need to know how to pass this ID from JS to AS

View 1 Replies

Flash8 :: Variables That Can't Go Below Zero Etc

Aug 4, 2010

just getting the grip around the variables and im experimenting. This is what i have as a variable

money = 1000;
health = 100;

Then i have the dynamic textbox that shows them. works great, and i also have various effect that makes the two go up and down. Here's the problem, or more, how i would like to expand the concept but is stuck on. Right now both variables can go as high and low as possible (of course). Is there something i can add in that script that makes so the money variable can't go below 0. Also is there something i can add so that the Health can't go ABOVE say 500 and when health reaches zero (or a negative) this triggers _root.gotoAndPlay("gameover"); you get what im trying to achive here

View 15 Replies

Flash8 :: Put Variables In An Array?

May 31, 2009

Is it possible to put variables in an array?

For example:

Code:
var positions:Array = new Array(Stage.width / 2, Stage.height / 2);

When the above code is executed, the values "Stage.width / 2" and "Stage.height / 2" are replaced with the number values and the array becomes, for example [500, 400].And when I call the array positions[0], instead of getting the value of the Stage.width / 2 (considering the stage has been resized), I get the static value of 500.What can I do to get the value of Stage.width / 2 ?

View 1 Replies

Flash8 : Using Variables Over Timelines (AS2)?

Feb 11, 2010

My variable from the root timeline is not being sent to say a timeline inside a moveclip. This is basically my code:

On root timeline:

Code:
stop();
showred = false;

Inside movieclip instance 'infobox' on timeline:

Code:
stop();
if (showred == false){
play();
}

the showred variable inside the 'infobox' movieclip is not detecting that I set 'showred' to false on the main timeline.

View 2 Replies

ActionScript 2.0 :: Flash8 Two Variables Name Into 1?

Feb 28, 2010

what is wrong with this syntax

_root.range+towerID = 75;

i want flash to read the variable as _root.range2 = 75. this is for each tower so _root.range2 -= 10 reduces tower 2's range by 10 (this is done on a different frame thus the _root. is needed)(towerID is calculated above)

View 1 Replies

Flash8 :: Setting Up Variables In Different Levels?

Dec 25, 2010

Actionscript Code:
if (Key.isDown(attack2Key)&&shot2reload == 0) { for (i=1; i<2+1; i++) { shot2++; shot2reload = 30 var newname =

[code].....

View 1 Replies

ActionScript 2.0 :: Flash8 Referencing MovieClips With Variables

Jun 12, 2009

I want to reference clip with some variable name because i want to change dynamicaly target clip. Example:

myMC="testClip";
myMC.my_txt="some text";//this doesn't work
//but this works
eval(myMC).my_txt="some text";

I guess eval() is not right thing to do.

View 4 Replies

Flash8 :: Add Variables To A MC From The Action Layers, Using The MC Instance Name

Sep 11, 2009

I've read on the net that actionscripting from the action layer will result in a more readable file once published, as apposed to attaching onClipEvent functions which slow down readability.

For this reason I am trying to add variables to a MovieClip I have on the stage with an Instance Name of Player. However I wish to assign the MovieClip variables from the actions layer using the MovieClips Instance Name.

[Code].....

View 5 Replies

ActionScript 2.0 :: Flash8 Import Variables From .txt As Number?

Dec 4, 2009

I'm trying to import some variables set up in a .txt file. However the variables that I would like to behave like numbers are not doing so.

I have a variable in the text file called "&middleimg=1" when I pull this in and say do the following:

Code:
var numvar:Number=0;
numvar = _root.myvars.middleimg+1;

I get "11" rather then "2" as the result. I tried setting up my text file as such: "&middleimg:Number=1" but get an "undefined" result. Is there anyway to get imported variables to behave like a number instead of a string?

View 2 Replies

ActionScript 2.0 :: Flash8 : Tracing All Unknown Variables In An Object

Mar 31, 2009

Is there a way of tracing variables in an object without expressly listing each of them?

e.g.

Code:
so.data.thename="derek";
so.data.thenumber=1234;
so.data.sex="male";

[Code].....

View 1 Replies

ActionScript 2.0 :: Flash8 Multiple Variables Controlled By Key Presses

Jun 26, 2009

I am making a game using AS2, in which the user controls the character with WASD. I am making a tutorial level in which the level only advances past the first frame after the user has pressed W, A, S, and D. The level is a single frame in which there is a movieclip that has all the enemies. I made an offscreen button in the movieclip which has the code

Code:
on(keyPress "w"){
var w:Boolean = true;
}

[Code].....

When I run it, nothing happens and it stays on the first frame of the movieclip. No errors are shown in the output panel.

View 2 Replies

ActionScript 2.0 :: Flash8 Error In Calculation (yahoo Finance Variables)

Oct 24, 2010

I programming a calculator, I get data on Yahoo Finance ( URL... ), but sometimes I get this error "NaN".URL...[code]

View 1 Replies

ActionScript 2.0 :: F 8 - Passing Variables From One SWF To Another?

Feb 8, 2009

I have a swf with an input text box and a button. When the button is clicked, I need it to open another swf in a new window on a different domain and pass the variables to a dynamic text box in the new window. I looked at local connect but I wasn't sure it would work because the two windows wouldn't necessarily be loaded at the same time and they are on different domains.

View 4 Replies

Passing Variables Between .swf Files?

Sep 9, 2009

I am loading images into a movie clip dynamically from an XML file. Based on what image the user clicks, I would like to be able to open a separate window, displaying a different image. Ideally, I'd pass the variable of which image was selected to the new open window.I've done some research online, and am thinking I'm making this harder than it needs to be.

Actionscript from main movie

Code:
chosenImage.onPress = function() {[code]......

I've also seen where I could possibly pass a variable through ASP.NET, but am experiencing the same errors when trying to pass the variable. I suppose I could embed the popup.swf file in a new .aspx page, that would probably be acceptable.

View 1 Replies

ActionScript 3.0 :: Passing Variables On URL?

Jan 6, 2010

I'm using IE 8 and trying to open an HTML file. All files are either local or ran on a server. Problem is I use the URLVariables object, and they still won't get passed. for example:

Code:
var req:URLRequest = new URLRequest("Y:/htmlFile.html");
var urlVars:URLVariables = new URLVariables();

[code].....

View 14 Replies

ActionScript 2.0 :: Passing Variables Between Mc?

Jul 21, 2010

I just want to show the contents of the input data in Movie Clip Movie Clip A into B which is still in one layer.

View 2 Replies

Passing Variables Between MovieClips?

Sep 6, 2010

I'm trying to develop a site map, which draws a tick over the sections of my app that have been completed. I've figured out how to draw the tick and how to pass variables from root to the MovieClip that the function is in.

To make the tick appear only after an mc has been watched, I tried setting a variable equal to 1 ino the last frame of the MovieClip, and telling the function to run if that variable was 1.

I'm not getting compiler errors, but I'm also not getting the tick. And I'm definitely completing the Movie

Here's what I've got so far: In root

Code:
var xcoord = 125;
var ycoord = 300;
var WaterComplete = 0;
In WaterMovie

[Code].....

View 3 Replies

ActionScript 3.0 :: Passing Variables Between Two Swf's?

Nov 25, 2008

I am trying to pass value and string from AS3 main.swf to AS3 child.swf loaded in it. But, Nothing is working and i can't get the value from one to another. As Beginner in AS3, i was working for a long time and
still i face these problems and no output yet.

[Code]...

View 1 Replies

ActionScript 3.0 :: Passing Variables To PHP

Nov 17, 2010

I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php]. I've stuck with this for two days.. Here's what I have done. header.fla [Actionscript in the timeline]

[Code]...

View 5 Replies

PHP :: XML - Passing Variables From Flash

Sep 4, 2010

Creating a flash project where users can visit the site, and turn off/on objects in a house (ie. lights, tv, computer, etc.) The next user who will visit the house in the website, will see what lights or house appliances were left on. Flash variables are passed to PHP, and those variables are saved in an XML file. (For testing to see what is being saved to the XML file, on each click --vars.xml opens.) In the vars.xml file, I see that the house objects that were last turned on--are saved in the XML file- But in the SWF file, only one of the objects that are listed in the XML are turned ON. Only the last object that was clicked on would show ON--not all the objects in the XML file.)

package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.text.*;
import flash.net.*;
public class House extends MovieClip {
[Code] .....

View 1 Replies

ActionScript 3.0 :: Passing Variables To PHP?

Nov 19, 2010

I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].

I've stuck with this for four days.. Here's what I have done.

header.fla [Actionscript in the timeline]

Code:
stop();
import flash.events.Event;
import flash.display.Sprite;

[Code].....

View 5 Replies

ActionScript 2.0 :: Passing Variables From SWF To SWF

Sep 4, 2005

I am using FLASHVARS to pass a variable (Status) from ASP to Flash.This piece of Flash (named Header), calls another SWF (named InOutPencil) using this command:[code]My problem occurs when I try to use the Variable 'Status' in the InOutPencil SWF (below).[code]I need a way of passing the value of the variable 'Status' from Header to InOutPencil.

View 3 Replies

ActionScript 2.0 :: Passing Php Variables?

Feb 24, 2006

I need to pass the following php information into flash...

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$link = "<img src ="$mosConfig_live_site/images/comprofiler/tn";
$link_gallery = "<img src ="$mosConfig_live_site/images/comprofiler/";

[Code]....

This php script displays the top 20 users from a database based on their hit count. The script passes their avatar (image), username and link, as well as total hits.

I wanted to create a flash file with one movieclip that would parse the php file and display the results in an i++ fashion, so that I could make changes to only one mc instead of 20, when needed.

I have tried making a dynamic text field an mc, and assigning the loadvars object to that mc... but can't get any information to display... and I know the php file works like a charm.

View 10 Replies

ActionScript 2.0 :: Passing Variables Into A MC?

Nov 21, 2007

in my main movie, i have done a survey, see my previous thread which collects data from a series of radioButton groups. i can display this data using dynamic text boxes no problem, however i also wish to display this data in a separate swf which has been loaded into the main movie via a movieclip using

Code:
_root.cm_handler.loadMovie("movie2.swf");

View 1 Replies

ActionScript 3.0 :: Passing Variables From PHP?

Aug 31, 2008

i got this working in AS2 and PHP, but i can't use the VAR option on the dynamic text ... so how would i do this in AS3 ?

here's the simple code

using AS2 and PHP 5.2.6

ActionScript Code:
//
// create an object to store the variables
varReceiver = new LoadVars();
// load the variables from the text file

[code]....

and the PHP Code in info.php

PHP Code:

<?php$fName = "nuno";$lname = "mira";$age = 24;// echo or print the variablesecho ("&fName=$fName&lName=$lName&age=$age&");?>

View 6 Replies







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