ActionScript 2.0 :: Passing Variable On Loadmovie?
Apr 18, 2009
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?
View 2 Replies
Similar Posts:
May 25, 2010
So I got a plethora of games (group project), and we found the easiest way of putting them together is by loading each .swf of those games into a main .fla that will load each and will act as a menu between them. I need to know how a movie loaded to the root timeline can communicate with the main root.
I'm using _root.loadMovie("swf.swf"); to load the movies (one frame per swf). I tried containers with _root.container.loadMovie("swf.swf"); (empty MC on the stage with container instance name) but it ended up just looping the first frame of the loaded swf and not working like it should.
I tried using _global, that didn't work. I'm not sure what else to try, or what would work.
View 7 Replies
Jul 28, 2007
I'm trying to combine PHP/SQL and Flash. I've got a problem now. I want to load a variable that contains an url to an image. so the variable is like this: [URL] Now I want flash to load the image, not the text. The variable is called 'img1' but the loadmovie function doesn't work when I put it in.
View 2 Replies
Jul 20, 2006
how can you load a Movie clip with a variable name?? My example is that I have a custom menu with png's that are loaded by XML and I need to load a Different submenu/ content depending on which button i Click...
View 1 Replies
Nov 6, 2002
can i use a variable to load a new .swf file? this doesn't seem to work...
[Code]...
View 2 Replies
May 15, 2005
I have a variable that is refers to the names of folders, and I need to insert the variable into the pathname when I loadMovie. I cannot seem to get the variable to become part of the pathname
loadMovie('VARIABLE/image.jpg', _root.loadhere);
I've tried parenthesis, [], (), do not know the correct way to call the variable.
View 2 Replies
Mar 20, 2006
a) thumbURL is a variable loaded from an XML file. The value is being passed correctly into Flash, as I have traced it and it outputs fine. thumbLoc is a number which increases through a for loop. So thumb0, thumb1, thumb2 etc. are the movie clips I want to load thumbURL into. The thumbURL I'm trying to load is in the format [URL] I have the following code:
[CODE]...
View 1 Replies
Jan 25, 2010
how to show variable from swf file with loadmovie?if main.swf loadmovie mc1.swf mc1.swf can sent variable in input text to main.swf?if it can how to show variable from mc1.swf in dynamic text in main.swf?
View 2 Replies
Jan 29, 2009
i hav one main swf inside which iam loading second swf, but instead of hardcoding it, iwant the secound swf to calldynamically using variables.
The querystring is as follows:
<PARAM NAME=movie VALUE="film.swf?extSwf=movie.swf">
This method works fine:
[code]....
View 2 Replies
May 16, 2002
The tutorial in The Best of Kirupa isn't working for me! When I try doing this:
rn = Math.round(Math.random()*1000000);
loadVariablesNum ("flashdata.txt?reload="+rn,0);
I get a debug error: Error opening URL "file:///C|/pathtofolder/flashdata.txt?reload=263757" Where the reload variable is the random number and flashdata.txt is the file that contains the variable I need.
View 9 Replies
Mar 14, 2009
Oddly if I use a quoted string, like
loadMovie( "http://www.miniclip.com/games/cube-buster/en/cubebuster.swf" , 1);
it works fine
But if I pass in a variable:
var fullpath:String = "http://www.miniclip.com/games/cube-buster/en/cubebuster.swf"
loadMovie( fullpath , 1);
it fails ???
Can't find anyone else's comments on such an issue.
Using flash 8, as2 on Mac osx
The example above remote domain example works fine within flash IDE
My actual application using a relative path to a sub directory, for a little obfuscation.
View 1 Replies
Sep 10, 2010
how do you load in a variable amount of jpgs into an empty movie clip? for example, i have a mc called 'holder' which loads in and replaces the previously loaded jpg every 10 seconds from the folder called 'images'. but how can i make it work if the user first puts in 5 images, but at a later date changes that number to 7 images?
View 1 Replies
Jan 28, 2009
I'm designing a game where the levels are too big to be in one swf. so each level loads up a new movie- but if my wildest dreams came true i would be able to, for example, load level 2 and have it remember how well you did on level 1.is there any way to do this? to inject a variable from the first movie to the second one after it takes over?
View 3 Replies
Sep 29, 2004
Basically this script works just fine and loads the appropriate movie. The transistion exit frame also works correctly. What I am trying to do is load the movie site_services.swf and jump to frame label "database" after the preloader. I was attempting to use _root.contents.FLabel = "database"; to set the variable.
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "site_services";
[Code]....
View 2 Replies
Mar 16, 2006
taken from this link:
[Code]....
My problem: I am attaching variable number of MCs dynamically(not in the library), and i have to do so using flash6 or older. How can i use then loadMovie+onClipEvent handler to invoke something, if i am attaching MCs dynamically, and onClipEvent works only on MCs attached on the Stage(actions "on" those mcs, not "inside" them). Probably using classes. Any other option? and if not, can anybody guide me through assigning such class to such mc? EDIT: Ok, i also have done following:
[Code]....
and although the movieClip IS in library, and it DOES have MovieClip class assigned, onData event handler is NOT triggered and nothing is traced. Can the reason be "attachMovie" function?
EDIT2: aha. well, again it happened that attachMovie's methods are not yet initialized, so it was not yet "the proper time to assign" handler onData on those MCs. [only sen knows why ]. So that even trace(mc.stop()); at this point traces undefined, where it should trace [type Function], since stop is MovieClip's class method. Stupidstupidstupid.. relax...
View 3 Replies
Aug 22, 2009
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.
View 4 Replies
Aug 17, 2009
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.
[Code]...
View 4 Replies
Aug 26, 2011
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)?";
View 1 Replies
Aug 13, 2009
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
[code].....
View 0 Replies
Dec 7, 2009
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
View 0 Replies
Oct 19, 2011
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:
[Code]...
View 2 Replies
Nov 1, 2005
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:
[Code].....
View 5 Replies
Apr 5, 2006
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.
Code:
container._lockroot = true;
container.loadMovie("main.swf");
[code].....
View 7 Replies
Sep 2, 2006
I am at a loss as to why I can't get the "linkto" variable to pass through past the firstImage() function. here is the code:
Code:
delay = 5000;
//-----------------------
[code].....
View 1 Replies
Oct 25, 2006
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);
[Code]....
View 1 Replies
Jun 29, 2007
I know this should be simple but I can't figure it out for the life of me.
Code:
for(i=0;i<xmlLength;i++){
mainMenu.createEmptyMovieClip(xml[i].attributes.n,mainMenu.getNextHighestDepth());
[code]....
View 3 Replies
Oct 5, 2009
i am passing a variable into an swf using the addVariable seen below
Code:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("ticker.swf", "background", "293", "107", "8", "#000000");
so.addParam("menu", "false");
[Code]...
View 1 Replies
Mar 19, 2009
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);
[code].....
View 2 Replies
Jul 30, 2009
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
Code:
<marker>
myMarker_mc
<myText>
[code]....
View 16 Replies
Aug 11, 2009
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?
View 3 Replies