ActionScript 3.0 :: Passing String Info Via MovieClip?
Jan 14, 2009
I have 190 movieclips which display various types of information. When a user clicks on a movieclip, it has to tween larger but also send a string to a method. I'll probably e.currentTarget to use one function which contains a tween and I wondered if there was a quick way to pass string info in a similar way?
So, each movieclip has it's own value which can be passed to a method which will use that value. The only way I can think of so far is to have 190 functions which send the string data to the appropriate place. I'm trying to avoid that if I can.
I am trying to dynamically address different instances of the same movieclip by passing a string into the movieclip address, but apparently I don't know what I'm doing. I'm trying something like below:
var vsTargetName:String; vsTargetName = "instance50"; vsTargetName + vsThumb.thumbHighlight.visible = true;
Is something like this possible? What am I doing wrong/what do I need to do to make that work?
I'm working on an adventure game and I need to find a way to pass the next MovieClip name to the function that loads it in the main timeline.
ActionScript Code: Bowl_btn.addEventListener(MouseEvent.CLICK, BowlClick); function BowlClick(evt:MouseEvent){ var nextMovie:String = "nameOfNextMovie"; this.parent.parent newMovieLoader (nextMovie); }
This is all good but I can't find a way to use the nextMovie parameter in the function and load a movie from the library. I hope you can understand my explanation..
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]
Example:Lets imagine a html page with 2 swf embed inside. First swf has some UI, and second swf loads content.Is there a way to pass events or variables from the first swf to trigger stuff on the second? If yes, how?I would love to know the simplest way to achieve this.P.s- From what i understood from Lee's tuturial on swfObj, i can pass vars from html to the swf (using flashvars). Is there a way to pass from the swf to the html in a similar fashion?
I am creating an app in Flash Pro using AS3 for my wife to track our son's hockey progress. The app will have three sections: start, data entry, data retrieval.I have created the screens as separate classes to handle their individual functions. My data is stored in XML that I need to pass between these screens.I tried creating a separate class to handle my XML, but I am having trouble reading and writing to the new class. Is there a better way to handle passing this XML information around inside my application? Eventually I would like to have the app write to an external XML file then pull the new rewritten file back in. This code is in one of the .as files already, it's just not working yet.I added my files below (7 as and 1 fla Zipped) if you want to check them out.
So I'm building a little contact form in flash and it works, but it is passing along all of the font styling information into the email sent to the client. Kind of annoying. I want it just to send the plain text.
Here's what I'm using:
This code is in the actionscript, picking up the input text fields and posting them to the PHP file. It also tells a status box to update with current info:
Code: loadVariables("send_email.php?flashmo=" + random(1000), this, "POST"); message_status.text = "sending..."; var i = 0;
I am trying to pass information to a many dynamic text fields when rolling over various movieclips that are generated using a loop. I have tried everything I know but can not get pahting to work prpoerly. The rollover works in that the curser changes by does not execute the lines of code within the in line function.(see red, bolded text (towards bottom) for problem). the Attached zipped swf is what it looks like as is.
Code: //how many floors are there in the building? var floors:Number = 25;
Okay, there is something that I don't quite understand. I built a flash contact form in Flash CS4 and embedded the swf in my webpage using Dreamweaver CS4. I upload the files in my server but why it's not working? I created a test folder in my folder and it does work... (It doesn't work here) [URL] The problem is that I'm not receiving the information when the user enters and submits the information on the contact form. I do receive the information on the test link. I'm posting the Flash AS and PHP Code to see if anyone can point out any mistake that I'm doing.
I know insideInput = String(xmlNode.childNodes[0].attributes.insider) virusTarget = insideInput.indexOf("kz", [17]); endTarget = insideInput.indexOf(".", [virusTarget+2]); trace("VTTT"+virusTarget) trace("ET"+ endTarget) //endTarget = local.indexOf(".", ["vitesting"]); clipTarget = virusTarget+3; zebra = insideInput.substring(clipTarget, endTarget); trace(zebra) I'm trying extract info from a string, increment through it and add the data to an array. I can't get the startIndex thing to work.
I'm having trouble passing my variable (dayValue ) into my string. The goal is to be able to count backward or forward x amount of days. I keep getting compiler errors. time.
ActionScript Code: var dayValue = "+7"; var myTime:Date = new Date(2008,9,19,12,0,0);
I am working on designing a "flyer" type of advertisement at the moment... and I have pretty much everything working... everything except for this, that is. I need to be able to pass a string into flash that would basically be XML into flash. I know how to pass strings in, but where this has many "'s and /'s. "FlashVars" looks like this as an example...
I also have this in my embed tag and for some reason, this is what I get on my page when I try to load it up...Big Empty White Space " /> " quality="high" bgcolor="#ffffff" width="550" height="400" name="temp" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[URL]" /> It's like the XML is terminating the string or something.
im making a function that limmits text to a specified number... only problem is i cant seem to pass in the text var that contains the text
Code: var textF1:String = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam neque purus, aliquam sed, sagittis tincidunt, adipiscing ac, urna. Ut libero urna, nonummy sodalesxxx";
Is there any way to fill in a dynamic text box in one movieclip if a checkbox from another movieclip on the main timeline is checked?If it is not checked, the dynamic text box would be blank.
I'm designing kiosks for educational museums. My current project involves visitors generating content in a Flash-based interactive, and then having the ability to email their creation to themself, or others. My intention is to publish a swf from my program to a webserver and then email the visitor a link to a webpage with the swf embedded I'm having trouble finding any info on publishing a movieclip as a swf from AS3.
I can then access it and get to to trace from anywhere like this:[code]However...I need to to go into something being converted to a string...like this...txt.load("xml/january/1.xml");Where the Janauary is replaced with the global variable. However, everything inside the quotations is being converted to strictly text, so that txt.load("xml/monthvariable/1.xml");Literally looks for the "monthvariable" folder instead of the January Folder. How can I put a variable into a string like this, so the variable is actually the variable and not the strict text?
If I set my HLED Widget's FCDataURL to some a valid XML the LED shows up fine but now I want to change the HLED's value programatically. For this purpose, I have made a string named xmlData, containing data from an XML file as shown below:
String for XML: private var xmlData:String="<?xml version='1.0' encoding='UTF-8'?>" + "<chart chartBottomMargin='5' lowerLimit='0' upperLimit='100' lowerLimitDisplay='Low' " +
[Code].....
see the chart load up with value = 66 but all I get is "Error in loading data".
I'm trying to design an interface that to simplify the construction of a string. Here's an example: My output (using the getURL command) needs to be in the form of: http:[url].....
I'm able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.
i am trying to load different xml that get generated through .net when I am trying to pass varibels i am getting undefined. Can someone give me a heads up on what i might be doing wrong. from what I have read and learned I can pull via-
How you pass a query string using the AC_FL_RunContent? in the old days you would do something like move.swf?isOn=something;How is that done today using the AC_FL_RunContent.
I'm fed up of having to import the tweener class every time I create a tween, so I want to create a global function that I can call which will import them for me, as well as executing a tween.
The problem I'm having is that I can't pass the parameters as a string... Do I need to convert it into code first?
Edit: I know I could pass each parameter individually, but I want to avoid doing this, as the diversity of the tweens I need to do is great, and it would will mean passing about 100,000,000 variables to the tween... okay maybe not that many, but probably about 20 variables which would probably take longer than the inital hassle of importing the class.