Variable Passing Across Across Movieclips
Can anyone help me please?
I have six movie clips, in a navigation movie clip, on the main time line, here they are:
_root.nav._home _root.nav._ourFirm _root.nav._onepartnership _root.nav._services _root.nav._career _root.nav._contactus
In _root.nav._ourFirm it has a sub navigation which when open passes a variable called menu.
when opened menu = "open" when closed menu = "closed"
(the variable comes through fine, I've traced it)
I'm trying to get the other clips to close the sub menu, if the menu variable passed is open and do nothing if the variable has not been set or is "closed" but I cannot do it... Ahhhhh?!?! Sob, sob... Please help me...
This is what I've tried on a button within the _root.nav._onepartnership clip for instance
on (rollOver) {
if (_root.nav._ourFirm.menu == open) { _root.nav._ourFirm.gotoAndPlay("out"); }
}
Below is the trace that happens if this: _root.nav._ourFirm.gotoAndPlay("out"); happened. It works fine without the if stuff by the way.
var menu = "closed"; trace(_root.nav._ourFirm.menu);
Please find the .swf attached.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem Passing Variable Values (from XML) To Variable In Child Movie
I'm reading something from XML, and store it in a variable. I can trace the variable and it shows two items. I can display those two seperately with variable[0] and [1], meaning that it works as intended.
After that, I'm calling a movieclip, which is supposed to read that variable.. sadly, it can't do it. So I resorted to passing the content of the first variable to a variable inside the called movieclip. This works, and tracing the second variable shows both items from the first. However, I cannot access the items seperately with variable2[0] for example.
What's the problem? The second variable is currently a string. I tried to declare is as other things (like xml or array) as well, but that didn't help. Is there also a way to make this procedure unnecessary, i.e. can I somehow access the first variable?
I've attached the fla/xml/swf in case my description doesn't make sense!
Passing Array Variable Name In To Component Variable & Getting It's Value
Hi, All
Anyone can solve my problem????
My Problem is that I want to store a array' s name in to a component variable. like this:-
working in this case
Scene action on timeline
_global.arr = "This is aray Test"
component parameters
VarName : _global.arr
Not working in this case
Scene action on timeline
_global.arr1 = new Array()
_global.arr 1[0]= "This is aray Test"
component parameters
VarName : _global.arr1[0]
in component I'm doing this on timeline action
abc.text = eval(VarName)
plz help me out of this
Regards
Ankur Arora
Passing Variables To Movieclips...
I have a problem... In a project I have one movieclip that is used four times in another movieclip. That movieclip is then used 10 times in another movieclip. That movieclip is used twice in the main project window...
In the first movieclip I have an if-statement in a script. That if-statement checks a local variable against a variable that should be set in the main project window...
How do I send this variable down to the fisrt movieclip from the main timeline? Anyone?
Passing MovieClips To Functions?
Hello. I am making a game and am in a small pickle. I have a function in root called movement that handles all movement of objects. I just don't know how to pass the movieclip to the function. Here is how I have it set up:
movement=function(obj){
_root.obj._x=300;
}
onClipEvent (enterFrame){
movement(this);
}
Thats the basic setup. Thanks.
Passing MovieClips Through Classes
Hello, folks!
I have a hard difficult using classes in Flash. The question is: How can I attach movie clips through classes ?
For example: I have a class to do a clip like an excel table:
So, I have a Cell class (Celula.as), a Columm (Coluna.as) and the final table (Tabela.as).
Here they are:
Cell:
Code:
class Celula {
private var superID:Number;
private var grupo:String;
private var texto:String;
private var conteiner:MovieClip;
function Celula() {
superID = new Number();
grupo = new String();
texto = new String();
conteiner = new MovieClip();
}
// setters:
public function setDataProvider(id:Number, g:String, t:String):Void {
this.superID = id;
this.grupo = g;
this.texto = t;
trace("superID: "+this.superID + newline + "grupo: "+this.grupo + newline + "texto: "+this.texto + newline + "--------------");
}
// getters:
public function getSuperID():Number {
return this.superID;
}
public function getGrupo():String {
return this.grupo;
}
public function getTexto():String {
return this.texto;
}
private function getClip():MovieClip {
var mc:MovieClip = this.conteiner.attachMovie("celula_mc", "celula"+superID, superID);
mc.rotulo_txt.htmlText = this.getTexto();
return mc;
}
}
Columm, wich imports the Cell class..
Code:
import Celula;
class Coluna {
private var grupo:String;
private var celula:Celula;
private var arrCel:Array;
private var conteiner:MovieClip;
function Coluna() {
this.grupo = new String();
this.celula = new Celula();
this.arrCel = new Array();
}
public function setColuna(g:String, no:XMLNode):Void {
this.createColuna(g,no);
}
public function getCelulas():Array {
return this.arrCel;
}
public function getCelulaAt(i:Number):Celula {
return this.arrCel[i];
}
public function getGrupo():String {
return this.grupo;
}
public function getClip():MovieClip {
return this.conteiner;
}
private function createColuna(grupo:String, noColuna:XMLNode):Void {
var count:Number = noColuna.childNodes.length;
for(var i:Number = 0; i < count ; i++){
var celula:Celula = new Celula();
celula.setDataProvider(i, grupo, noColuna.childNodes[i].childNodes[0].firstChild.nodeValue)
arrCel.push(celula);
this.conteiner.attachMovie(this.arrCel[i].conteiner, "cel"+i, (i));
}
}
}
And, finally, the Table wich imports the Coluna.as Class
Code:
import Coluna;
class Tabela {
private var numColunas:Number;
private var larguraMaxima:Number;
private var arrColunas:Array;
private var conteiner:MovieClip;
private var coluna:Coluna;
//
// construtor:
function Tabela() {
numColunas = new Number();
larguraMaxima = new Number();
arrColunas = new Array();
coluna = new Coluna();
}
//
// setters:
public function setTabela(noXML:XMLNode):Void {
var totalColunas:Number = noXML.childNodes.length;
this.numColunas = totalColunas;
this.conteiner = _root.createEmptyMovieClip(noXML.attributes.nome, _root.getNextHighestDepth());
for (var i:Number = 0; i < totalColunas; i++) {
var cl:Coluna = new Coluna();
cl.setColuna(noXML.childNodes[i].attributes.grupo, noXML.childNodes[i]);
this.arrColunas.push(cl);
var mc:MovieClip = this.conteiner.attachMovie("celula_mc", "col"+i, this.conteiner.getNextHighestDepth());
}
}
public function attach():Void {
_root.createEmptyMovieClip("tabela", _root.getNextHighestDepth());
}
public function setLargMax(w:Number):Void {
this.larguraMaxima = w;
}
//
// getters:
public function getNumColunas():Number {
return this.numColunas;
}
public function getTabela():Tabela {
return this;
}
public function getArrColunas():Array {
return this.arrColunas;
}
public function getConteiner():MovieClip {
return this.conteiner;
}
}
So, my problem is: I do not know how to insert the Celula.as object into the Coluna.as object and insert the Coluna.as objects into the Tabela.as object.
Some one can help me with this?
Sorry for my poor english.
Tks!
pp
Passing Variables Through Multiple Movieclips
Basically I just wondered if there was any way to condense this so I don't have to keep repeating the code over and over for all of the movieclips:
ActionScript Code:
onClipEvent (enterFrame) {var colorChanger:Color = new Color(this._parent.leaf8);var origTransform:Object = colorChanger.getTransform();var newtintTransform:Object = {rb:10, bb:0, gb:-15};var colorChanger2:Color = new Color(this._parent.leaf9);var origTransform2:Object = colorChanger2.getTransform();var newtintTransform2:Object = {rb:10, bb:0, gb:-15};}
And so on...there are going to be about 9 clips I want this color changer to apply to, but I'm not sure how to make this code cleaner, since I'm a total newb! Any help would be appreciated.
Passing Parameters Trough MovieClips
Hello people
I have this animation that loads an external SWF, but I want the base movie to pass a couple of parameters (title and the path to a jpg) to the newly loaded movieClip when I press a button, I tried creating a function that gets triggered by the button itself (the function resides on the main movie but targets the new one), It doesnīt seem to have effect, hte problem is (I think), that I'm triggering from the same button that loads the movie, but honestly I donīt know how I could do it otherwise.
THANKS FOR YOU HELP!
the code that loads the movie:
PHP Code:
on (press) {
createEmptyMovieClip("contH", 5);
loadMovie("win_h.swf", "contH");
contH._x = -290; contH._y = -290;
}
on (release) {
tellTarget (contH) { loadPic ("2.jpg", 50, 50);
}
}
in the layer thatīs just above the button i have the function:
PHP Code:
function loadPic (theName, thePosX, thePosy) { contH.createEmptyMovieClip("contPic", 7); contH.contPic._x = -500; contH.contPic._y = -500; contH.contPic.loadMovie(theName); thePosX = contH.contPic._x; thePosY = contH.contPic._y; }
but the loaded movie never gets the result.
THANKS!
Passing Text-field-variables To Other Movieclips
i have a timeline with a few dynamic text-fields with variables. i also have an extra movieclip placed in this timeline and want the text-field-variables be passed into that movieclip so they can be displayed in it. how can i do this? how can i "load or pass" these text-variables into a certain movieclip and other timelines?
thanx for any support from germany
martin
Passing Arguments In The Constructor Of Extended Movieclips
I'm having difficulties in passing parameters (in this case a name parameter) to a custom class that subclasses SimpleButton, MovieClip, etc. The compiler complains with:
Code:
1136: Incorrect number of arguments. Expected 0.
My test SimpleButton class looks like this
ActionScript Code:
package test
{
import flash.display.SimpleButton;
public dynamic class Handle extends flash.display.SimpleButton
{
public function Handle(name:String = '')
{
this.name = name;
trace(this.name);
}
}
}
And my Library item's linkage parameters are:
Class: Handle
Base Class: test.Handle
Then in the main timeline code I'm attempting:
ActionScript Code:
var h = new Handle('New handle name');
addChild(h)
But as I said, I'm getting that error. Is this an inherent limitation of extending the built-in classes??
Is the only way to work around it to add parameters in a separate init() method?
Thanks,
Dave
Passing Variable
Hi,
I want to have a movie in level1 write variables to level0. I have tried several ways and none of them have worked. I'm not sure I know the proper syntax and have had trouble finding a complete reference on it. Here is what I'm trying right now:
In a frame script in level1 which is loaded into level0:
_level0.module = "netbas";
Then I have a button script in level0 use it this way:
on (release) {
loadMovieNum (+module+"_c.swf", 1);}
I want the button to load the following file into level1: netbas_c.swf. When I test and click the button I get an error that says it can't find "_c.swf" indicating to me that it isn't getting the variable value. It works fine when I set it within level0, but not from level1.
Can you please tell me why this won't work and what I need to do. Is there a better way to have links in level0 use variables that will be set in the current movie in level1?
Where can I get complete help on this?
Additional info: I have several movies that will be put into level1. A button in level0 will load a movie in level1. Once that movie is loaded, then I want all the navigation
buttons in level0 to have "netbas" in front of them so that they only load the swfs associated with the current movie in level1. Then when the user clicks on Advanced
Networking from the main menu and loads that movie into level1, I want all those buttons in level0 to have "netadv" in front of them. (i.e. netadv_c.swf). I hope this is
clear. I've made parts work, but I cannot get the variable to level0.
Thanks,
Brian
Passing Variable?
i have a MC-b within a MC-a,i set a variable in MC a now i want to use it in MC b also how do i pass it on from MC-a MC-b or to main time line?
Thanx!
Passing Variable
I have a base movie. In this base movie I have loaded two other movie using the basic action:
loadMovieNum ("movie1.swf", 1);
loadMovieNum ("movie2.swf", 2);
I have identified and set variables in movie1.
[eg. _root.variable1 = "white";]
I would like to be able to change these variable from movie2.
[eg. _root.variable1 = "blue";]
I have not been able to do this.
Advice please.
Passing Variable
I have a base movie. In this base movie I have loaded two other movie using the basic action:
loadMovieNum ("movie1.swf", 1);
loadMovieNum ("movie2.swf", 2);
I have identified and set variables in movie1.
[eg. _root.variable1 = "white";]
I would like to be able to change the value of the variable from within movie2.
[eg. _root.variable1 = "blue";]
I have not been able to do this.
Advice please.
Variable Value Passing
I am trying to make an RPG in flash... I have a dynamic text box in the top left hand corner of each scene, to show how many credits the player currently has. The variable of that textbox is "showcredits". So I put in 2 actions:
credits = 500
showcredits = credits
In this game, people will be able to purchase things using the credits. But here is my problem. I have a seperate scene for a store in which they can buy things. In this scene, I have one action:
showcredits = credits
But in this scene, the number of credits doesn't show up... I'm guessing that the value I set for the "credits" variable in the first scene didn't pass over to the next scene... what can I do?
Passing A Variable To .SWF
I wonder if anyone can help me. This is probably a simple question for most of you but can I pass a variable into a .swf movie by simply doing this:
mymovie.swf?mapid=1
I would then like to collect the variables value within the flash movie. Is this possible or is there another way of doing it.
Thanks in advance
Steven
Variable Passing
I cant give up now im almost finish.But my problem is i cant pass a variable to php is some thing wrong with my coding
at flash
---------------------------------------------------------------
// Create random number to append to URL
randNum = Math.random()*1000000000;
var classID ="1"; >>>>this is the variable i want to pass to php
// Call PHP script to fetch class information
loadVariables ("viewforum.php?cla_id="add classID add "&" add randNum, this);
// Halt the movie clip until data loaded
stop ();
--------------------------------------------------------------
and here is my coding at php side
-------------------------------------------------------------
<?
// Include config file
include('common.php');
// Connect to database
$link = dbConnect();
// Build query to fetch forum
$query = "SELECT * FROM prod_subclass where cla_id= '$classID'";
// Execute query
$result = mysql_query($query);
// If query failed...
if (!$result) {
// Inform Flash of error and quit
fail("Couldn't list class from database");
}
// Find out how many class in this table
$threadCount = mysql_num_rows($result);
// Setup our variable to hold output
$output = "classCount=$classCount";
// For each classreturned...
for ($count = 0; $count < $classCount; $count++)
{
// Extract post details from database
$class= mysql_fetch_array($result);
$classID = $class['subcla_id'];
$topic = stripslashes($class['subclass']);
// Add thread details to output
$output .= "&class" . $count . "ID=" . $classID;
$output .= "&class" . $count . "Topic=" . urlencode($topic);}
// Output all threads in one go
echo $output;
// Inform Flash of success
print "&result=Okay";
// Close link to database server
mysql_close($link);
?>
-------------------------------------------------------------------
Please help ...thank you in advance
Variable Passing
I'm new to this. I need to pass a variable as defined in one script contained in a movie clip to another instance. The purpose of this is to have a drop down menu with button choices. Selecting a button will initiate a transition movie clip. When the last frame of the transition clip is viewed, a separate .swf file will begin loading. This same transition clip will be played before every linked .swf file is loaded. The name of the .swf is the variable I want passed from the menu to the tranisition clip.
I know it's wrong, but here's the code as it stands today. "movieOpen" is the intended variabe, of course used incorrectly here.
Drop Down Menu Clip Code:
on (release) {
_root.Transition.gotoAndPlay(2);
with (_root.Transition) {
_root.Transition.movieOpen = "Test.swf";
}
}
Transition Instance Code:
ifFrameLoaded (11) {
unloadMovieNum (3);
loadMovieNum ("movieOpen", 3);
}
stop ();
Thanks in advance for your tutelage,
Todd
Passing A Variable To A URL
Hi,
I am having difficutly figuring out how to pass a variable from an input text field to a URL. I have a form field for users to input their zip code, then I would like to append the a url to add that zip code. The URL ends with "zip= " and I would like to input the zip variable before executing the getURL command. Any thoughts?
Best
Passing Variable Help
little syntax help please :
var fadeButton = 2;
_root.button(fadeButton)._alpha = 50;
trying to make button2 fade 50%....not working...whats the proper syntax.
THANKS!
Passing Variable From URL To SWF
I am creating a small SWF of a speedometer. The end result should take the value of a variable "speed" from the URL and have the needle of the speedometer stop on a corresponding frame. There is 160 MPH on the speedometer and the needle goes from 0-160 over the course of 160 frames. I have gotten the needle to work using a slider (please excuse the jumpy-ness).
http://www.blackdragonmotorsports.com/speed.htm
Now that I have gotten that to work, I need to replace the slider with a dynamic variable (from the URL) that will tell the MC "needle" to stop at the corresponding value. For example...if the URL was:
http://www.blackdragonmotorsports.c...ed.htm?speed=45
the needle should stop on frame 45.
The *.fla is at http://www.blackdragonmotorsports.com/speedometer.fla
Any help would be awesome.
Thanks,
Jay Almers
Variable Passing
Hi expert out there, need some help from you guys, so here is the situation, i have a html file which content 2 frames FRAME1 and FRAME2, how do i pass variable(onclick or onload) from HTML in FRAME1 to the flash(swf) in FRAME2 to do something? Is this posible?
Thanks in advance!!!!
Variable Passing
*is there anyway that you can pass variables from one movie clip to the another.
Say i have a in one movie clip/button
on(press){
if(t=true){
gotoandplay("blah");
}
else{
gotoandplay("blah2");
}
can i update that variable t in another movie clip and pass it to the one that has the code above?????
is it even possible?
thanks
Peter
Passing Variable
howdy
i have three swf's main, nav, and window now what im tring to do is when a button is clicked in nav set variable in root i have this action, not sure if its right
_root.section="home";
i declared this variable in the main.swf, i have the following code:
section="0"; in the first frame of main
now when i click the button in nav as well as sending the variable to _root i get it to start anination in window which is doors shutting, when they finally close there is the following actions
if (_root.section == "home") {
loadMovie("pages/home.swf", "_level2.contentwindow.msg");
} else if (_root.section == "work") {
loadMovie("pages/work.swf", "_level2.contentwindow.msg");
} else if (_root.section == "skills") {
loadMovie("pages/skills.swf", "__level2.contentwindow.msg");
} else if (_root.section == "gallery") {
loadMovie("pages/gallery.swf", "_level2.contentwindow.msg");
} else if (_root.section == "contact") {
loadMovie("pages/contact.swf", "_level2.contentwindow.msg");
} else if (_root.section == "msg") {
loadMovie("pages/msg.swf", "_level2.contentwindow.msg");
}
cant seem to get them working, been playing with the code for ages now, pulling my hair out.
thanks in advance
Re: Passing Variable
Hello,
I am having some trouble passing a variable from an input box to a dynamic text box. I want the user to input their name, click a submit button and then have their name passed to a dynamic text box. At the moment I have an action on the button as follows: -
on (release) {
inText = grad_Name;
gotoAndStop("output");
}
(grad_Name is the name of the variable attached to the input box, to be passed to a frame named "output".)
The action on "output" frame is as follows: -
outText = inText;
stop();
(outText is the name of the dynamic text box).
Now, it was working OK but then I adjusted a graphic and now it doesn't work!!!
Any ideas or a better solution much appreciated.
Passing Variable
I have an variable called "myVar" in my flash movie level 0. Now I want to pop up a new flash movie in a new window, and also need to pass this variable to this pop up new movie. How can i implement this? Any method that I can use to pass this variable in Flash thru different window? thx
Passing A Variable From A URL To SWF
Hello. I've recently learned how to get javascript to pass a variable into flash. What I'm trying to find out is, how do I take it one step further and get it to pass variables from the url itself? What I mean is something like:
flashpage.html?variablename=value
Where a javascript takes this information and turns it into a variable, somehow. So for example, one could make a dynamic flash birthday card, with the user's age and name passed through a url from a link so whenever Joe, age 23, clicks on it, he's greeted with an animation saying "Happy 23rd Birthday, Joe!" For example.
Anyway any help you can offer would be appreciated.
Passing In A Variable
Right now I am I have a moive that loads another movie in it. It loads different movies based on a variable that gets passed in on the html page like this MyMove.swf?whatmovie=TheTitleMoive.swf. The problem with passing the variable in with the URL is that the browser does not cache the movie.
I have been trying to use the loadvariables() function to do the same thing. I can load a variable and have it displayed into a text area but when I try to use that variable to load a movie the variable does not work for some reason.
Does anyone have an exaple of how to do this or a tutorial?
Thanks
Passing Variable From Src Into SWF
GOAL: To pass a variable from the param/embed html code into the .swf file so that by changing the external variable, it is possible to display different stock market indices in a spectrum format.
EXAMPLE SWF: http://www.finwin.com/template.cfm?n...ode=218&view=1
I created the above DTN Market Spectrum flash movie to display moment by moment trends in various stock market indices.
Now I want to create individual displays of the same data so that clients can select which index they wish to view instead of all six. In order to do this, I want to create a single, generic movie that can be used for any of these six and others we might create. The key is to pass the name of the chose index from the param/embed source into the actionscript for the movie.
Here's what I am doing currently:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="72" id="dow30spectrum" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="mSpectrum.swf?indX=dow30" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="Mspectrum.swf?indX=dow30" quality="high" bgcolor="#ffffff" width="400" height="72" name="mspectrum" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
The variable is <b>indX</b> and the index I am wanting to display is the Dow 30 (dow30).
THE PROBLEM:
While the variable is being passed into the Mspectrum movie (I set up a temporary dynamic text field to display the value when I run the movie), my actionscript isn't recognizing it.
My movie is set up with two layers. Layer one is essentially the "stage" on which are some graphics and dynamic text fields for displaying price and volume data. Layer two is an attached movie that builds the spectrum through a loop process. It reads the values for each company displayed in the index and defines the width and color of each company's spectrum element.
If I hardcode indX in layer one to equal "dow30", the spectrum works as predicted. But if I try to use the external value passed in from the ?indX=dow30 in the param/embed code above, I get 'undefined' values and the spectrum won't build. Yet, I can see the "dow30" in the temporary text field I've created in layer one.
I know this sounds pretty complicated, but basically the code is not passing the externally-hardcoded value for indX from layer one to the attached movie, but it will when indX is hardcoded in layer one.
Anyone have any suggestions on passing the external indX value to various parts of this movie?
Thanks
Variable Passing
I am trying to pass variables using ASP to a swf file that is located within the same page.
Example:
I have a dynamically generated URL that is posted in the body of an email. When the person clicks on that URL it opens a web page that contains a link to another ASP page that contains a swf ( we'll call this asp page myvars.asp).The link to myvars.asp passes variables into the page from a query string. It is these variables that I want to pass to the swf. I can not simply call this page from Flash again as the variables being passed are dynamic based off of the query string.
I hope this makes since. I no how to pass variables to and from Flash from an ASP page, but since these variables are dynamically generated off of a link, I don't know if it is possible to do what I am trying.
Thanks,
FWagner
Passing A Variable
Hi:
I am creating a website. I need to pass a variable from one flash movie using getURL action. Is it possible to do that? Let me explain my problem in little detail.
I have home page. It has 5 Menu buttons. When you click one of them, it opens a seperate swf having a navigation bar. I need to use a same navigation bar(swf) for every click on home page but the swf for nav bar should jump on the different frames according to the button clicked on the home page.
Can anybody help on this matter?
Thanks
Passing Variable Value
Is it possible to pass a variable's value to the gotoAndPlay(); function. I'm having trouble with a condition statement and I just want to skip that step and set a variable to pass the lable name to the gotoAndPlay. i.e. gotoAndPlay(Variable);
Passing A Variable To An Swf
<*PARAM NAME=movie VALUE="text_anim.swf?sect=section3"*>
Will this work in all browsers and all platforms if I place it in the object and the embed tag.
Passing A Variable To A Swf Via A URL?
Let's say I have a swf with a variable name of "number" that I'd like to be able to set via the url, such as:
http://www.domain.com/page.html?number=4
How do I set up the swf/html to allow this?
Many thanks.
Help With Passing Variable
Hi guys I hope some one is up I don't get what I am not doing right here.
I am using flash MX by the way.
I have a main movie or a shell the loads another movie into which contains a
navigation bar, images etc.
The navigation bar is in a movie clip, each button is also its own movie
clip as well.
In the second movie that's loaded I have this action script:
Code:
_global.section;
//setProperty("_level0.Lall.adbt", _visible, "0");
//this = function() {
if (_level0.Lall.mainmenu.about.section == "about") {
trace("about was hit");
//setProperty("_level0.Lall.adbt", _visible, "100");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(2);
// getURL("vision.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.port.section == "portfolio") {
trace("portfolio was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(3);
// getURL("vision.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.serv.section == "services") {
trace("services was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(4);
// getURL("home.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.con.section == "contact") {
trace("contact was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(5);
// getURL("portfolio.swf", "_level2");
}
//} else if (section == "home") {
//getURL("audio.swf", "_level2");
}
//};
// end if
stop();
Now is my about button I have this action script.
Code:
on (rollOver) {
_level0.Lall.mainmenu.about.gotoAndPlay("begin_about");
}
on (press) {
_level0.Lall.mainmenu.about.section = "about";
buttonsound_open = new Sound(this);
with (buttonsound_open) {
attachSound("button_sound_S");
start();
}
}
The problem is the it wont trace and also when uploaded to my site it will
not work.
Can any one help me?
Thank you.
Passing A Variable..
Hello,
I have a problem with this part of my script. The maxRows variable is received from a .cfm page. The problem is that the maxRows variable is not set it's value. So I have a situation like IF (3 == maxRows) instead of IF(3==3).
if ( flashid==maxRows ) {
flashid = 1;
gotoAndPlay (2);
} else {
gotoAndPlay (2);
}
Thanks for any help.
Passing A Variable From One Swf To Another
I have made a 2-part presentation that will be shown on a company's internal website. All employees will see Part 1, and all managers will see Part 1 followed immediately by Part 2. They will access the presentations by clicking on a link on a page that's sent to them by email.
My idea was to make a swf for each of them (employees and managers) which would just contain a script to create a variable ("man" for managers and "emp" for employees) and then launch Part 1. Then, at the end of part 1, it would look to see what the variable was, if the variable was "man" it would go on to Part 2, and if the variable was "emp" it would close the player.
I tried this but it seems that a variable gets lost when a new movie is loaded. I tried loading it to level 1 but it still didn't work. Any suggestions or is there just no way? (other than having 2 separate copies of Part 1)
Variable Passing
I don't know if I am overlooking something simple, but I can't find the solution anywhere.
I have a main timeline, on which some variables are declared. I then have some movie clips on the timeline, which I want to manipulate based on the variables from the main timeline.
My problem is that I can't pass the variables from the timeline into the movie clips. How can this be done?
Thanks.
(using Flash 8 Professional)
PLEASE Help Passing Xml Value As URL Variable
I am using a combo box that is populated by an xml file that looks somewhat like this..
<hotellist>
<hotel>hilton</hotel>
<hotelid>1</hotelid>
</hotellist>
I have had success passing the <hotel> as a variable in the url by using mycombobox.text because its the actual text of the selected item.
But I am having problems sending the <hotelid> variable. anything I try is 'undefined' - any help with this would be much appreciated.
Thanks
Help With Passing A Variable From......
Hello,
I usually try to seek out my answers rather than ask for help, but I have decided to try and put away my pride and ask. I am working on a flash project in which I have seperated into different swf files in order to keep my loading times down. In one section of my project a user clicks on a button that loads a seperate swf file containing the requested information. When the user is done reading the information they can click on a button called "Home" which will direct the currently loaded swf file to advance to and play a frame label designated as "fadeout." At the end of this there resides a final frame(keyframe) which I want to call a variable that is created on the first frame of the main timeline of the flash movie that loaded the external swf movie that I am trying to call from.
The reason why I am wanting to do this is because I want to have my external flash movie unload itself after the fadeout frame has finished playing. The problem I am having is that I cannot figure out how to target the timeline of my original movie. I know that in as2 you could use _level0 correct? However, from my understanding this has been elimanated in as3. I hope that I have clearly made my point across.
Sincerely Grateful,
Stephen E.
[MX] Variable Passing From Mc To Mc
Good evening everyone
I am trying to pass a variable between movie clips and I am having some trouble.
I have created a loop which cycles through some ml and collects everything which is ticked yes, once this is done it compiles everything into an array, this array then has a number which should be passed between the movie clips.
The xml is used at the end of a sequence, once the sequence has been played I would like the mssage to be displayed, then next time around loop through the messages list to play another and so on until the messages are back to the start.
Any help on this matter would be much appreciated, as its been doing my head in for a couple of days now.
I know that my variable i am trying to pass around is getting overwritten, however my knowledge of actionsript is not quite up to scratch yet.
My xml looks liks this
Code:
<screensaver_config>
<message active="N">
<imagePath>i/one.jpg</imagePath>
<text>1</text>
</message>
<message active="Y">
<imagePath>i/two.jpg</imagePath>
<text>2</text>
</message>
<message active="N">
<imagePath>i/three.jpg</imagePath>
<text>3</text>
</message>
<message active="N">
<imagePath>i/four.jpg</imagePath>
<text>4</text>
</message>
<message active="N">
<imagePath>i/five.jpg</imagePath>
<text>5</text>
</message>
<message active="Y">
<imagePath>i/six.jpg</imagePath>
<text>6</text>
</message>
</screensaver_config>
Thanking everyone is advance for their help
cameron
Passing JS Variable TO An SWF.
The swf calls a popup window to browse files on the computer, and once the user browses, I want to pass the path back to flash. I've checked flashVars, but those are only loaded when the movie loads. FSCommand sends messages to javascript, but I don't see where it can recieve command/args FROM JS.
Thoughts? It would be crazy to create an xml file just to pass this path into flash. Surely there's a better way?
Can't attach the flash file. Sorry. I just want to know how to pass JS variables into Flash.
Passing Variable To PHP
I tried to make an input box (variable name was input) and a submit button. When you clicked on the button:
Code:
button.onPress = function(){
getURL("http://danditcamp.com/stuff/dctetrisscore.php?name="+input, _self, "GET");
}
But instead of going to http://danditcamp.com/stuff/dctetrisscore.php?name=Mike (or whatever I put in) it puts in stuff like the font and font size. Is there any way to get around this?
Odd Variable Passing
Please check out the zip file included, it is an example of what i am talking about.
I have run across something that i can not explain. This worked in prior versions of flash so i am confused at how this is happening. If anyone has any insight i would love to find out why this situation of passing information dynamically in to text fields and trying to access the text field returns an "undefined" variable; although the content is displayed the variable does not exist.
the way in which the content is sent to the text field is:
_root["someMovie_" + increment + ".myTextField"] =
"Show Me";
Check out the zip file it contains an example of what i am talking about. It is setup with a button that traces the variable and displays what is in the text cell.
When you run the flash file, the variable is visible within the Text field but is Not accessible by any statement to retrieve the variable.
Variable Passing
Hi guys, how are we??
I have a flash file, and i want to send one field to another page.
its called email, the field that is, and i want that to go to the next page in a query string, How do i do that, this is what i have so far:
ActionScript Code:
on (release) {
getURL("http://www.returnity.com.au/returnity_2005/email.rsp?email=", 0, "GET");
}
that is on the button
thanks
Passing Variable
Hey There All!
Okay - been working on a project FOREVER & Im almost to the point where it's going to work but I need some serious help....
This is what I have so far.... (the notes are from another forum - not trying to cross post, I was just in the wrong place before)
Code:
// then where ever you are setting your variables do:
sender.id=#url.id#;
// send the id value to your cfm page using sendAndLoad, and returned xml will be loaded into the xml object x.
sender.sendAndLoad("info1.cfm",x,"GET");
};
and
Code:
var x:XML=new XML();
x.ignoreWhite=true;x.onLoad=function(done){
if(done){
trace('xml file is now loaded into '+this);
// now that it is loaded, process it the way you want.
};var sender:LoadVars=new LoadVars();
The problem ... you cant actually put #url.id# in actionscript - I need to identify the ID and then (so I've been told) it will be passed w/ the link to the cfm file as a url.id.
The question:
How do I make that sender.id dynamic based upon the url.id fed to the swf?
AKA
the url
somecoolsite.com?id=something_dynamic
the swf
gallery.swf?id=something_dynamic
the sender.id NEEDS TO BE
sender.id=something_dynamic;
so that the the files in the cfm page will be dynamically generated based upon that url.id & therefore the correct images will show.
*** yeah, I know I've put xml information in a cfm page - the .cfm is not messing up the xml or the flash... if I hard code the images into the .cfm page flash is fine w/ it... it's just passing the variable that's got me stumped.
Passing Variable
Hi,
I have 2 swf files. I have a button on one of the files which open the other file. I am trying to pass a variable from file 1 to file 2 to filter the results in file 2.
How would I set up the variables in both files so that when the button is clicked, it opens the second file with the correct ID number?
Thanks heaps.
Variable Passing
hi
i wana pass variable from 1 flash file to another flash file :(
|