ActionScript 2.0 :: Pass A Variable From A Button To A MC Instance To Tell It Which SWF To Load?

Aug 29, 2002

Here's what I'm trying to do:I have a parent container movie that has several buttons on it. As it stands now the buttons trigger an instance of a MC on the main timeline to play using the "with" action (no biggie)I would like to put a frame action in that MC instance that uses the "LoadMovieNum" action to load a particular external SWF movie into the container movie depending on which button the user clicked.In theory I guess I need to somehow associate each button with it's corresponding SWF child movie that is to be loaded (SetVariable?)Then I need to pass that information to the MC instance in the main timeline that actually uses the LoadMovieNum command to load the SWF file.

View 7 Replies


Similar Posts:


IDE :: Pass Variable To Window Instance?

Oct 28, 2009

My standalone Flash program launches a window, using PopUpManager.createPopUp, and it gets some info from the database and displays it. Now I want to pass a variable to that popup but I can't see how to do that?

View 3 Replies

ActionScript 2.0 :: Pass Instance Name To Function As A Variable?

Apr 24, 2006

the idea is that the site keeps tracks of whatever page is current and passes this variable to the alpha function which will target that movie instance to fade when moving to another page - then that page's name will be assigned to current.this is the code that i have now..

#include "alpha.as"
evolution.onRelease = function() {
this[current].gotoAndPlay(2);

[code].....

View 5 Replies

Flex :: Load Variable From A File & Pass As Arg Value In Ant Build

Nov 29, 2010

What I want to do is load the contents of a file and sent it to an mxmlc compiler as an argument parameter. I can load and read the contents of a file using loadfile and setting a property value say propery="filecontent". But the problem is I can pass it into the mxmlc (flex) compiler. I'm not able to pass it (tried with ${filecontent}) to the arg line. Its gives an error: "value contains unknown token 'filecontent'" How will I pass the contents of the file as a argument value to a compiler argument? Edit: The problem is with the include-resource-bundles arguments. When using command line it works. But using ant build doesn't. Do we need to manually provide the name of resource bundles by generating the resource file?

<exec executable="${MXMLC}" dir="${APP_ROOT}/src" >
<arg line="-locale 'en_US'"/>
.. .. ..
<arg line="-include-resource-bundles

[Code]....

which doesn't work and gives and error -> command line: Error: configuration variable 'include-resource-bundles' value contains unknown token 'resources'

View 1 Replies

ActionScript 3.0 :: Pass A String Variable To A SWF So That Can Specify A XML File To Load

Jun 14, 2010

I want to pass a string variable to a SWF so that I can specify a XML file to load without republishing the SWF. When I assign the string variable to a textfield it is correct.But when I use that variable in the loader it does not display the XML from that file.You can see below that I commented out the string "lesson_11/images/0301_objectives.xml".If I put this string in the loader it works, if I use the string variable in its place it does not work.

Code:
var xmlFileToLoad:String;
var myQueryString:Object;

[code].....

View 1 Replies

Professional :: Create And Pass A Variable With Button On(release)?

Apr 23, 2011

I have an AS 2 movie that has tons of navigation. When the movie first loads, the main screen plays an animation and stops. That animation is my main menu. If a user clicks the home button (which is an MC instance) it takes him to the Home Movie and plays. From here, I need to be able to fade out that movie and fade in a new movie when the user clicks on the next button. So, I want to create a variable on(release) of the button thats within the Home MC that will play the fade out and then be directed to the next animation.I imagine something like this.

buttonA == false;
on(release){
buttonA = true;

[code].......

View 1 Replies

ActionScript 2.0 :: Setting Variable Of Button To Pass URL From Cold Fusion?

Sep 23, 2002

I don't have to concern myself with the Cold Fusion end of things, our CF developer(s)will handle that... I've made some Flash navigational buttons that are to be used on the front end of a very robust Cold Fusion web application. I cannot hard code the buttons using the getUrl action because the Url will be changing dynamically. I need to know how to set the variable of a button, so that Cold Fusion can pass it a value for the URL on the fly.

View 1 Replies

ActionScript 2.0 :: Store Instance Name Of Button Pressed In Variable?

Feb 14, 2006

im creating 100 movie clips through duplicate movie and assigning each MC an instance name of eh_1, eh_2, eh_3 etc... on rollover i would like to have have them store in a variable which button number they are.to detect rollovers and presses, im just using

Code:
for (i=1; i<101; i++) {
_root["eh_"+i].onRollOver = function () {
};
}

is there anyway i can detect which button was pressed and store into a variable the number?

View 3 Replies

ActionScript 2.0 :: Making Button Invisible Using Its Instance In Variable

May 1, 2006

I am just trying to make a button disappear using a variable set to it's instance name. When I say invisible I also mean deactivated. The code I've got is this..
Code:
[test]_visible = false;
but it doesn't work - any offers?

View 5 Replies

ActionScript 2.0 :: Pass A Variable As Well And Can't Seem To Escape To Pass It?

Apr 6, 2008

Trying to pass a variable as well and cant seem to escape to pass it. How can I pass using window.open as such: Trying to pass (pid) all i get back is (pid) and not actual pid.How to on a jscommand?

Code:
something.onRelease = function () {
var jscommand:String = "window.open('http://www.someform.php?proj= + (pid)','win','height=200,width=300,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);"); }

I can do a standard getUrl("http://www.someform.php?proj=" + (pid), "_blank"); works fine but no control over window properties.

View 1 Replies

Javascript :: Pass The Variable So That The Resulting Line Of Code Doesn't Have The Quotes Around The Variable Value?

Oct 3, 2011

I'm trying to pass the contents of variable playnoyes to the long line of code below to decide whether or not to autoplay the flash movie, but doing it as I have below, the resultant line of code has the variable in quotes and therefore the code doesn't execute it as expected. My question is, how can I pass the variable so that the resulting line of code doesn't have the quotes around the variable value.

var playnoyes='true';
var testtext = "<script type='text/javascript'>AC_FL_RunContent ('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.[code]....

View 3 Replies

ActionScript 3.0 :: Declare A Variable In PHP And Pass That Variable To My Flash File?

Mar 5, 2010

I am trying to do is declare a variable in PHP and pass that variable to my flash file. Right now i am simply trying to do 1 easy variable, more will happen in the future but i need to figure this out first.I have used other forums and they say try this and that, but nothing i do seems to work. here is my code.

PHP Code:[code].....

View 8 Replies

ActionScript 3.0 :: Create New Instance() When Instance Is A Variable?

Feb 12, 2012

I have a base class I've used on 6 different MC's. Then when I use these MC's my function runs an if statement to check which one to add.

if(id=design) var obj = new design();
if(id=team) var obj = new team();

I want to make it a bit more dynamic and use the id:String to evaluate which new instance to create.

ActionScript Code:
public function loadChapter(id:String):void {
var obj = new instance_of( id )();
}

View 5 Replies

ActionScript 2.0 :: Load A Global Variable From A Button Action?

Dec 28, 2004

Background; I want to load a global variable from a button action, and use this global variable to point to a frame named with what I'm gonna set the variable to, for instance a global variable of 1 will trigger a movie clip with a to play to a frame named 1.

I've set _global.x = 1 from a button instance withing an on(rollOver) block, and it shows up fine through trace(_global.x) from within a separate movie clip instance (within the same scene/timeline), but when I tried to use it in gotoAndPlay using the syntax gotoAndPlay(_global.x) it doesn't work. I'm sure I'm doing something wrong but I just don't know what.

View 5 Replies

ActionScript 3.0 :: Variable Of Null Value Assignment To A Variable Or Instance Flash?

Jan 7, 2010

As we know whent here is no such variable of null value assignment to a variable or instance flash throws this kind of Error.In one of my Application i need to get more flashVariables, They may or maynot come as FLASHVARS. But when i miss any variable flash thows this error as an alert box. is there any simple solution to avoid this kind of issue
 
when i use try,Catch statement the issue will not come, But i don't like to write Bunch of try,catch statement for all this kind of variables.

View 4 Replies

Flash :: Play Movie Clip Instance Inside Of Button Instance?

Apr 16, 2011

I placed a movie clip instance inside a button, and I want this movie clip to play when the button is released. I'm using this code on the frame containing the button:

function playMovie(event:MouseEvent)
{
this.theButton.theMC.gotoAndPlay(3);

[code].....

View 2 Replies

ActionScript 3.0 :: Pass Main Class Instance?

Nov 27, 2009

I have a main swf that loads different swfs files, one of this swf files is the homepage with navigation items, how can I pass a reference to the loaded home.swf of the main.swf which contains the load methods?

I try creating a var in the home.swf class with the main.swf class type, but the home.swf give me errors that cant find other objects contains in the main.swf

View 6 Replies

Pass Instance Of Whole Class / Just Specific Values?

Jul 12, 2011

I am wondering if it's better to pass an instance of a whole class to another class or just specific properties of that class. For example if I want the height property of class A in class B do I pass just the height value into class B or the whole instance of the class and use classA.height in class B?

View 3 Replies

ActionScript 2.0 :: Pass Parameters To An Instance Of A Class?

Feb 16, 2006

how i can pass parameters to an instance of a class using the Object.registerClass method. It seems i can only put the name of the class but no extra parameters.

View 3 Replies

Flex :: Make Instance Of Mxml And Pass Parameters?

Jan 11, 2011

i want to create instance of mxml (in my case EventList) and pass parameters. My Event List is a list of panels so I want to pass parameters and generate dynamically n number of panels (n-parameter to pass). I have the main app where I have toggle button bar when I click on the first I want for example to generate 3 panels (n=3) on the second button 20 panels (n=20) etc.How can I do this? How can I pass n and what is the best way to show the list? I whant to generate the list when I click on the toggle button!

View 1 Replies

Flex :: Pass Data To A ClassFactory-generated Instance?

Mar 7, 2012

I have created an item-renderer (IListItemRenderer) to customize the display of a datagrid, and I override the data getter/setter to pass in the relevant variable.

In the item-renderer I have a button, which, when clicked, should display a form populated with various fields of the aforementioned variable. To do this, Button is overridden so that it displays whatever IFactory implementation it is passed.

private function instantiateDropdown():void
{
_dropdownFactory = new ClassFactory(MyPanel);
_dropdownFactory.properties = {boundData: _myVariable};

[Code]....

My IFactory implementation is a panel containing my form, and it is displayed when the button is clicked, as desired. However, the variable is not set. It seems that in order to instantiate my IFactory before the overridden button needs to access it, my new ClassFactory() statement needs to be in the preinitialize event handler, but the variable has not been set at that time. Setting the properties of my IFactory instance after it has been created (e.g. in the click event) does not appear to work.

How should I pass my variable to my ClassFactory-generated instance so that it populates the form correctly?

View 1 Replies

ActionScript 3.0 :: Pass An Object Of Parameters To Textfield Instance?

Mar 1, 2010

What I'm trying to do is create a simple message class that I can pass a set of textfield parameters of my choosing rather than specifying each textfield parameter in the constructor.Is it possible to pass a textfield instance an object of parameters instead of setting each one individually?

Code:
public class Example {
private var message:String;
private var messageTextField:TextField;

[code]...

View 2 Replies

Pass A Variable With Brackets In The Variable Name?

Nov 20, 2010

I am trying to pass a variable with brackets in the variable name. Example

productoption[]="value";

Whenever I publish the file flash gives me an unexpected "]" error code. Is it possible to have a variable name with brackets? I tried to use the escape codes %5B%5D to pass the brackets but that didn't work also.

View 1 Replies

ActionScript 2.0 :: Pass Php Variable To Variable?

Nov 28, 2009

i write my own code for php and actionscript...and i had a problem with it.. How to pass php variable to action script variable?

[Code]....

View 3 Replies

ActionScript :: Use FlashVars To Pass A FLV Path From Html A FLVPlayback Instance

May 27, 2009

I'm trying to use FlashVars to pass a FLV path from html a FLVPlayback instance. I get how this is supposed to work, but I can't find any good documentation on the needed ActionScript. The closest thing I could find was a discussion about a script that looked something like this:

[Code]...

View 4 Replies

ActionScript 2.0 :: Pass Constructor Arguments Into An Instance That Extends The MC Class?

Apr 17, 2007

For example, I have the class Bullet, with a constructor: Bullet(start:Point, target:Point)constructor

But, if this Bullet class extends the MovieClip class, how do I pass start and target into it? Right now I am using attachMovie to create instances of the class. (They behave correctly with the static properties set by the constructor, but to be useful it needs arguments.)

View 3 Replies

IDE :: Pass Variable From One Swf To Another Swf?

Nov 12, 2009

can i pass variable from one swf to another swf. each swf is in separate html page.

View 3 Replies

ActionScript 2.0 :: Pass Variable Swf To Swf

Mar 23, 2009

I am able to pass a variable from an html link that loads a separate html file and instructs the embedded file to go to a specific frame. But - I now need a link within an swf file on one page to open a new page and tell that swf to start on a specific frame and it is not working. Here is the code I use for the first example - works like a champ:

[Code]....

View 1 Replies

How To Pass URL Variable To Flash

Oct 24, 2008

I want to put a variable at the end of a URL and have Flash "find" that variable. The url would be: [URL] "Campbell" is the variable I want to pass to Flash. I then have this script in the root timeline:
loadVariables (""+agent".txt", this);

I want "agent" to be replaced with Campbell. That way I can have it read a bunch of variables from the txt file. I tried this as well:
loadVariables (""+_root.agent".txt", this);
What am I missing in this?

View 9 Replies

ActionScript 1/2 :: Pass Variable From One Swf To Another?

Oct 15, 2009

I have declared one variable in one.fla file on a button press i am opening another swf file. [code]...

View 1 Replies







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