ActionScript 2.0 :: Use A Different Symbol Other Than The "&" Operator To Separate Variables In LoadVars?
May 12, 2004I would like to use a different symbol other than the "&" operator to seperate my variables in my loadVars...
View 5 RepliesI would like to use a different symbol other than the "&" operator to seperate my variables in my loadVars...
View 5 RepliesCan any tell me how can I access a sub-child of a MoivieClip using [ ] operator?
View 2 RepliesI have completely hit a wall. Here's what I'm after. I have two sets of radio buttons, each of which controls what loaded swf appears on stage. Then, depending on which button is clicked in group one and which button is clicked in group two, a third swf appears. I can access the value of each radio button, and I'm passing it into a variable (I think - the trace command works) but when I drop it all together into an if/else statement, no data is passed.
Here's the code:
//printArea is a movie clip on stage, which has dynamic mc's attached via code
var thisFront;
//function for what happens when fronts radio buttons clicked
frontListener = new Object();
frontListener.click = function(evt) {
[Code] .....
I'm experimenting with loading an array of elements into my Flash project using the LoadVars property (I'm using Flash 8 - AS 2) The elements are queried from MySQL using PHP to a page named "elements.php" and loaded into the Flash file. It works fine, but I'd like to be able to protect the "elements.php" page so that the variables queried from this page cannot be viewed by someone who types the absolute path to the elements.php file in the browser address bar [[URL]. Using includes, I'm able to protect other pages in my site from direct assess but these methods don't seem to work when the URL is called from within my SWF file.
My fear is that someone might decompile the swf to reveal the LoadVars URL present in the actionscript. I know there are ways to obfuscate the code, but I'm not sure how well these methods really work. I also understand it is practically impossible to completely hide the code from someone who is REALLY intent on getting it, but I'd like to make it as difficult as possible.
I have a php page which outputs the following:
DisplayValue=%3cfont+face%3d%27Arial%27+color%3d%2 7%23FFFFFF%27+size%3d%2730%27%3eGambling+Hotline+1
[code].....
I'm trying to grab the number of variables I'm loading using LoadVars.
View 5 RepliesI'm trying to grab the number of variables I'm loading using LoadVars.
View 5 RepliesI have an application that reads a PHP script and populates the Flash applets using the following on frame 1:
[Code]...
A combobox (created with the returned data) is created on frame 61. When a selection is chosen in the combobox I need to add the value returned from the combobox to the variable catvar, add this variable to the LoadVars object and run the script again. It seems to set c.catvar initially but when I use the 'sendAndLoad command the second time c.catvar isn't included. Is it possible to add variables to a LoadVars object created
on frame 1 from frame 61?
use loadVars to read variables from .txt files on a different server with flash, do any of you know because I'm getting really annoyed?
View 14 RepliesI am using the following code to send some values do a php file. The problem comes when i actually SEND them (values). A browser opens up. How could i avoid opening the browser when i send my variables to my php?
[Code]...
I am trying to obtain the variables/contents of a php or a text file from my server using loadVars(), and the problem is that flash can get data from almost every server but from mine. (some shared hosting service) I just tried the code provided in the help files:
Code:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
[code]....
I'm sure that I did no mistake in typing the URL, for it works fine in the browser (also no spaces, no freaky chars), and when i change the URL to another domain (and put the txt file on that server) everything works fine. I tried both possibilities "network access" and "local access" as well as running from an exe projector. But no chance.
I have several Movie Clips in the Library which I need to be able to load and bring up on the screen randomly.The code below shows how I can load one of these, but to get a proper control ideally I would like to load them all in to an array or numbered variables so that they can be called from a simple piece of code and actioned one at a time.
My movieclips can all be called something simple like mc1, mc2, mc3, mc4 etc to make things easier.These need to be referenced in to an array mcContainer[.....] or as mcContainer1, mcContainer2........ so that they can be called easily.I just need to know the simplest way to do this and how i reference them, I have tried several ways like ["mc"+i] etc and nothing seems to work.
Code:
var mc:mcLogo=new mcLogo();
addChild(mc);
You know how & is used to separate variables in a .txt file if your loading variables, like &height=22&width=3353&....well what if you want to pass a string into flash like "We all went & drunk lots of beer"?
View 6 RepliesThere seems to be a problem with Firefox 2.x sending variables to PHP scripts with the LoadVars.send/POST method.
<br>
The same problem doesn't occur in IE or Opera. <br>See this url for example to try in both FF and IE/Opera: here. <br>The source files are here g.zelenka@iinet.net.au
I have several Movie Clips in the Library which I need to be able to load and bring up on the screen randomly. The code below shows how I can load one of these, but to get a proper control ideally I would like to load them all in to an array or numbered variables so that they can be called from a simple piece of code and actioned one at a time.
My movieclips can all be called something simple like mc1, mc2, mc3, mc4 etc to make things easier. These need to be referenced in to an array mcContainer[.....] or as mcContainer1, mcContainer2........ so that they can be called easily. I just need to know the simplest way to do this and how i reference them, I have tried several ways like ["mc"+i] etc and nothing seems to work.
I'm having a strange problem setting variables in movie clips from another (parent timeline). I run the following code from the parent movie clip to target child movie clips it contains.
setVars = function (clip, value) {
clip.val1 = value;
clip.val2 = 0;
[Code].....
I am trying to set variables in a movie clip targetted by the 'clip' argument in the setVars function but they are being traced as undefined. However, setting the function works fine. I have also tried manually defining the variables in the movie clip and am still unable to change them externally from the setVars Function.
How to get r, g, b from uint pixel? I mean separate variables
View 2 RepliesI have a string that is sent from PHP to Flash. When I Trace the string in flash, it prints the followings:
First Name: Mickey
Last Name: M
Designation: Mouse
[Code]....
I am very new to ActionScript. I have a .fla file which contains the AS2 code for the frames. What I need to do is that I have to export this code as a separate file. There may be a separate file(or class file) for each frame code. Is it possible to me do it automatically without losing animation interactivity and functionality? Or is there any other way?
View 1 RepliesI have a string variable that looks something like this:
2012-03-07 135.06 135.91 134.93 135.69 143616800 135.69
2012-03-06 135.35 135.43 134.36 134.75 202129900 134.75
It continues like this, a list of reoccurring variables seperated by spaces, for a few more lines.How can I separate the string and push the different variables into their appropriate arrays. The end result should look like this:
dates = [2012-03-07, 2012-03-06]
variable1 = [135.06, 135.35]
variable2 = [135.91, 135.43]
I need to be able to take the meta data duration value for an flv and split it up into three separate variables: hours, minutes, seconds.
View 1 RepliesOne of the moderators, could you've a look at this tutorial: [URL] it doesn't works with me, maybe because I've 2004 so if you change loadVars() into LoadVars() it should work
View 2 RepliesWhenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.
View 14 RepliesWhat I need to do is assign 5 separate dynamic text fields to 5 seperate buttons and at the same time to those same five buttons i would like to add 5 images that i would be able to change merely by swapping out the images in the file theyre in on the server.I would also like to get a nice transition between the images...ALSO i want to dynamically load the images for the buttons that will be used for switching from picture to picture(which im thinking i will be able to do after i know the how to do point the aforementioned things.)
Through tutorials I've found around the net I've been able to get most of the parts together... but i get lost because what they show you for AS2 they don't for AS3 and vice versa, at least that ive seen.so... I guess my question is... would i need to set up 5 seperate dynamic text fields on the stage and then set each one of them to one of the corresponding button. If so what AS code would i need to use to do so. And if not what would i need to do?
The other part of the question would be I know about the UILoader... would i be able to use it as my buttons and images, if so would i need 5 seperate ui loaders for both the Thumbnail buttons and the images or is there a way that would be better to do it? and once i do that would i do the transitions using frames and tweens like with AS2?
If I create a new flash AS3 file and create two blank keyframes in my actions layer I can add actions to each keyframe separately no problem. I can then easily switch between the actions frames from the menu bar on the left of the actions input panel. However if I try and do this on any of my projects i've been working on for a while when I create a new blank keyframe in the actions layer and try to add actions to it, I get sent straight back to my first actions keyframe and not a nice blank page. Can I even apply seperate actions to seperate keyframes?
View 6 RepliesThis is NOT the same as my last thread as i am after three and NOT ONE as last time. In the attached movie there are three seperate movies loading into three seperate tweens. Please note that i am happy with this movie as it is, and do not want to change anything about it except for the script itself. It refurs to three seperate clips "b.a","d.c" and "f.e". What i want is for the script to incorperate all three clips under one name of "mc" And instead of have three seperate widths, "width 1","width2" and "width3" i want the script to also incorperate all three widths and heights into just one name of "width" and one name of "height".
View 9 RepliesI have a project in Flash Professional CS5 and ActionScript 3.
I have a movieclip symbol (referred herein as "background" with scripts on various keyframes inside of that symbol. I need to hide or show another symbol (referred herein as "object") sharing a stage with "background".
To put it another way, I need "object" to be hidden when "background" reaches a certain internal keyframe. However, as "object" and "background" are both children of the same stage, how do I do this?
what i want to do is, when certain button is clicked, replace a certain symbol(button) by another symbol(movieclip) stored in the library. i try things like loadmovie("","") to replace the symbol from a external jpg, but some how it does not align even both images are exact dimension. can i replace an image straight from the library?
View 1 RepliesI animated eyes blinking inside of a movie clip symbol and placed the symbol on a face outside of the symbol.The eyes are stuck on the first frame. I am using CS5. What do I do?
View 5 RepliesHow do i get the hitTest() function to test if a certain symbol is hitting another symbol, but, only if drawn parts of the symbol are touching, not thier outer bounds.
View 2 Replies