ActionScript 2.0 :: Passing Argument/variable To External Swf?
Jan 25, 2008
I am using a carousel with items in it...when the user clicks an item in the carousel, I want a new swf to load to _level0 and replace the carousel on the stage...the new swf reads an xml...however the xml should be different for every item on the carousel...is there any way to pass the xml file name to the loadMovie command so the new swf can use it?
View 2 Replies
Similar Posts:
Apr 20, 2006
i have a gallery that when any thumbnail is pressed it implements the following variable:[code] Now im trying to acces that variable "thumb" in ProjectFrame.swf but i cant seem to do it. Anyone know how I can pass the variable out?
View 14 Replies
Jan 19, 2008
probably a hugely embarrassing beginner question, but I can't seem to find an answer anywhere. I think it's probably (hopefully?) just a syntax problem I'm loading the content of a dynamic text box from an external .txt file and I'm trying to find a way to change the content from a link in the .txt file (if that makes sense). The code I'm using to change the dynamic text box at the moment is:
[Code]...
View 1 Replies
Feb 26, 2012
I have a .swf file through which i am passing arguments to .exe file which is basically a C++console application, how is it possible, should i tweak the sourcecode in th application file for it to accept the arguments passed?
View 1 Replies
Sep 28, 2009
I had been trying finding a way to passing more than one arguments using FlashVars. Below is the snippet of HTML code, using this parameter:
HTML Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,
[code]....
View 3 Replies
Jan 12, 2004
I have a global function that does some stuff with a LoadVars in it.I 90% of the cases, the onLoad reference of the LoadVars is the same, but I sometimes need to do something else when the LoadVars is loaded.Is there a way to pass a function reference to a function so that I could do something like that :
[AS]
_global.function myFunction(maybeFunction)
{
myLoadVars = new LoadVars();
[code]...
View 1 Replies
Jul 28, 2009
The transition from AS2.0 to 3.0 has been a long and broken trail for me.
Is there a way to pass arguments to a function via addEventListener, like (but unlike) this: timerTurn.addEventListener(TimerEvent.TIMER, moveUnit, "unitname", "unitdirection")
where moveUnit is the function I want triggered, and "unitname"/"unitdirection" are the arguments?
View 1 Replies
Jan 12, 2004
My question is slightly complicated : I have a global function that does some stuff with a LoadVars in it. I 90% of the cases, the onLoad reference of the LoadVars is the same, but I sometimes need to do something else when the LoadVars is loaded. Is there a way to pass a function reference to a function so that I could do something like that :
[Code]....
View 1 Replies
Sep 29, 2010
Well I want to set up a function that will calculate the x position of where my MovieClip's instance name will go. Here is the code i currently have.
function xBtnPosition(btnName: String, btnXpercentage: Number):String
{
var xFinalPosition: String = -(((btnName.width * btnXpercentage) / btnName.scaleY));
[code].....
View 3 Replies
Jun 26, 2010
So i have this function
capture_mc.buttonMode = true;
capture_mc.addEventListener(MouseEvent.CLICK,captureImage);
function captureImage(e:MouseEvent):void {
[code]....
View 2 Replies
Apr 11, 2011
So far, I have a class that creates a Vector object, and pushes data into it:
ActionScript Code:
public var mList:Vector.<cusClass> = new Vector.<cusClass>();
The data is read by a second class like so:
ActionScript Code:
trace(firstClass.mList);
The problem Im having is take that same Vector and passing it into a third class (from the second class) as an argument in a method: ActionScript Code: views.mUpListing(firstClass.mList);
[Code]...
View 2 Replies
Apr 21, 2010
I am wondering what is the way of passing and argument to a listener.. doing something like this:
Code:
myThing.addEventListener(Event.COMPLETE, doThis(arg));
function doThis(e:Event, arg:int){
...
}
What is the proper way, i this doesnt really brake the code, it doesnt work either...
View 11 Replies
Aug 7, 2009
I had a class that I was passing a simple argument to like so:
var quiz_1_2:CaseStudyQuiz = new CaseStudyQuiz(2);
addChild(quiz_1_2);
I now would like to use this class for multiple MCs in my library. I thought I could let Flash create a class for each of them and specifying the CaseStudyQuiz class as the Base class. When I do that, I get the following error:
1136: Incorrect number of arguments. Expected 0.
View 12 Replies
Oct 16, 2009
We can pass arguments to flash from javascript like this
fc.callFunction("_root","js_playSong",["Path=songs/song1.mp3 &Album=Jazz"])
where fc is a JSFCommunicator.
But how to pass argument like this
fc.callFunction("_root","js_playSong",["Path=songs/song1.mp3&ArtistPath=http://sample.php?artist_id=24&name=kamal"])
In the above argument the red colored ampersand should not be considered as separator between two variables.
View 1 Replies
Nov 19, 2009
I have one event handler for several object's events. I would like to pass a value through to the function from the event listener:
function chkEmpty(event:Event){
if(event.currentTarget.text==){
thisIsBitIWantToBeAbleChange.text = You haven't entered anything in the box, please try again
hisIsBitIWantToBeAbleChange.setTextFormat(validate_frmt);
}
}
Could I give the event.currentTarget a value that I could test for? So if the value is 1, I effect output1_txt, if 2, output2_txt, etc etc. If so, are there customisable values that I could use that wouldn't do anything to the display object,?
View 8 Replies
Oct 3, 2009
I'm trying to figure out how to set a MovieClip return value by passing a string argument and using that string to define the child of a given movieclip. I'm doing something wrong because I keep getting null traced instead of home_mc.[code]
View 2 Replies
Sep 8, 2009
I saw a post that touched on this, but I thought it deserved a thread of its own for explicit verification. It seemed that some of the resident geniuses here had given the thumbs-up to passing your whole doc or app class to a function. Please correct me if I'm wrong, as this sounds convenient but I assumed it would cause heart attacks and CPU meltdowns.
EXAMPLE: Say I have an app class that controls my entire game (or slideshow), and it has an ENTER_FRAME scrolling function that's 50 lines long with tons of conditionals so I want to take it out and make it an external file. I pop it into a new .as file but now all my variables are out of scope. I could pass them each individually, but there are so many it's impractical. So my question is: good or bad practice to pass the entire class?
[Code]...
View 4 Replies
Apr 14, 2011
This may be an obvious search, but I'm not totally sure on the proper syntax... basically what I want to do is:
private function makeISchedule(data:Array, label:String = null):ArrayCollection{
var arr:ArrayCollection = new ArrayCollection;
for (var i:int = 0; i<data.length; i++){
[code].....
View 1 Replies
Feb 6, 2009
I want to have the whole of the argument in an if statement represented by a variable string. Is this possible? I am yet to get the code to work:
Code:
var featureLimit:String = "featureType == "logo_ci4" || featureType == "logo_ss2" || featureType == "logo_db"";
//if statement contained in a for loop which gathers the featureType variables
if(featureLimit){
//Do something
}
View 3 Replies
Apr 21, 2010
How do I execute callback functions dynamically by passing a function in as an argument to another function?
Look at this example:
Code:
package {
public class myClass extends MovieClip {
public function myClass(callback) {
[code]....
View 2 Replies
Dec 22, 2011
how to do this
function foo(x:*, ...args):* {
}
function bar(x:*, ...args):* {[code].....
how to expand args ? when I call bar(1,2,3), I wish it call foo(1,2,3), but it call foo(1,[2,3])
View 2 Replies
Apr 19, 2011
Is there any way to determine if a (anonymous) function has defined the ...(rest) parameter in ActionScript 3? I know there's the function.length property, but it only counts the explicitly defined arguments.
View 2 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