ActionScript 2.0 :: Passing Variable Into OnRelease?
Nov 1, 2006
I have a simple navigation, and each item is declared in the array below. The corrresponding movie clips also have the same instance name, and when each nav item is clicked, the movie should go to and play a frame that has a label containing the same name.
// names changed for client privacy
var navItems = ["foo", "bar", "hot", "chocolate", "w00t"];
for (i=0; i < navItems.length; i++) {
[Code]...
Everytime I click a menu item the trace returns as undefined. How do I get the value of navItems as it passes through the array attached/pushed to the onRelease function?
Strangely enough I can't access the variable i in the onRelease function below. I guess it must have something to do with the position where I declared it. But I also tried to declare it outside of the functions but it didn't work either.. how to solve this problem?
and I want these targetpath rewritten with the new variable of positieMC everytime I click the button. But somehow this doesn't work. I have the idea that theze targetpath are not rewritten when I click the button.
I have a flash file that has an XML driven menuing system to select and play various FLVs. I want to be able to craft different URLs to open the swf and start playing different FLVs. (The others will be accessible from the menu once the sfw is opened, but I am looking to control what plays on opening, dependent on what link a user click.) Not really sure about the best way to get the selection into the swf.
I have a site that uses an user id that needs to be passed from links with a flash banner. I have it working, but not the way I need it and could use a little assistance.
I'm trying to pass the file name of an image upload PHP script into Flash's UILoader component. So when a user uploads their image, the file name of the file is passed to flash so that the image displays within the Flash UILoader application. Here's the PHP variable I'm trying to pass: $filename= ''; And here's where Flash's UILoader gets it's source (ActionScript 3.0): uiLoader.source = "freshly uploaded file.jpg ($filename)?";
i have the php file transfering the correct data but it is not registering as the variable in swfi have already tested the php file and do Know that it is working correctly I have tested the swf file - no user works but the variable sent for balance is not setting
$select = "SELECT * FROM `auth` WHERE `username` = '$username'"; $result = mysql_query($select) or die(mysql_error()); //how many rows
I am using SWFObject2 and passing in a flashvar to the movie it is loading (preloader.swf). I can retrieve the flashvar in preloader.swf no problem at all.The issue is that I am loading another swf from the preloader.swf (lets call it loaded.swf) and I want to get the variable from preloader.swf into loaded.swf - but for the life of me I just can't work out how to do it.If I try and access the variable from the preloader.swf via loaded.swf I just get compiler errors because the variable I want in preloader.swf doesn't exist in loaded.swf
I've got a question regarding passing a variable from PHP webpage to .swf file placed on that webpage.
Example: Button on a webpage1.php is loading a frame.swf file. Frame.swf is loading test.swf into itself using ActionScript Code: loadMovie("min est.swf", mc);
Button on second webpage2.php is again loading frame.swf file but this time I would like that frame.swf would load test2.swf into itself using ActionScript Code:
I have integrated a swf into another swf. (Actually it is a menu that I have incorporated in my 'main swf'.) When clicking a button in swf no.1 (the menu) I set:
_global.new_value="1" ; _root.Application.newfunction(); -and then in swf no.2:
I'm trying to pass a variable from my main swf to another one that's being loaded in a container in the main swf. What I usually do is create that variable in the main swf and have the loaded swf fetch it but in this instance I need the loaded swf to have it's own root.
i have a "campus map MC" that is an attachedmovie clip linked from the library to a scrollpane on the main timeline. there is a "info balloon MC" in the "campus map" with a "close" button on the info balloon that hides the balloon.
the campus map has buttons over each bldg. on rollover/rollout the "info balloon MC" appears and disappears. if you click the button it 'stays' and the button is disabled so that the rollover/out stop.
button code:
Code:
on (rollOver) { setProperty(this.bubble,_visible, 100); // info balloon MC nested in the campus map MC setProperty(this.bubble,_x, 200);
I have 3 movieclips in the Libarary, called (both by name and class) section0, section1 and section2.This works for instance to attach a movie clip to the stage:
Code: var myMovie:MovieClip = new section1; addChild(myMovie);
I have several movies (movieA, movieB, movieC) that have a button in them that loads another movieb into the same level thus replacing them. My problem is that i need the movieB to start playing from a particular frame depending on which movie, a, b or c loaded it.
I'm trying to find a way of using variables to make it work or maybe just a simple gotoAndPlay function but with no luck. Can you send a variable via loadmovie function?
I am trying to send a value from one of my xml nodes (<marker>) by declaring it in a function 'showData' as a variable 'XMLMarker'. If I trace this value (XMLmarker) it returns the right data found in the node <marker> (which is 'myMarker_mc'). However, I need to tell the stage that myMarker_mc is a MovieClip...please see the 'PROBLEM' stated in the code below.
Code:
stop(); var placesXML:XML = <places> <place name= "Yogyakarta">
[code]....
why do you want a variable to hold the value in the node <marker>, when that value is identical for each node, ie. it is always 'myMarker_mc', so why not just directly declare the variable 'xmlMark' as myMarker_mc. The reason is; the value in some of the <marker> nodes will soon be changing to 'myMarker_mc2' - a slightly different movieClip which I may need to call depending upon which place @name is chosen.This is the new output thrown up by the variable XMLmarkers
I have a movieclip on the stage, and in that clip I have a button that is supposed to turn a global variable from true to false, but the compile tells me: 1119: Access of possibly undefined property root through a reference with static type Class.
When I use this code: Code: function closeMSN(event:MouseEvent):void{ this.visible = false Stage.MSNOpen = false }
I know how to reference the movieclip itself by this, but how do I change the value of a variable on the main stage, from inside the movie clip?
I have a movieclip that will load an external picture from a given path, it works fine if I hardcode the picture path. In the scene I added this moveclip at runtime, but now I have problem to pass in the a string path value to the movieclip so that in can load a correct picture.
i send variables to flash inside the html document:[code]inside flash i can print the variables as dynamic text, its working fine. but now i want to use one of this variables to be sent inside a "ExternalInterface.call" after pressing a button. [code]i tried many ways, but nothing works. i realy wonder how i can pass my variables.is there anyone who could tell me how to set the variables in the right way? in another forum they said its not possible?
I have two classes, IntroScreen.as and MainMenuScreen.as.I have an input text box on the IntroScreen that captures text and successfully traces it in the same class.
Actionscript Code: public var nameEntry:String;public function startButton(event:MouseEvent):void { trace("Start button clicked.") nameEntry = enterName.text;