ActionScript 3.0 :: Run A Movie With Url Variables Passed?
Apr 14, 2012Is there a there a way to run a movie with url variables passed? So instead of test.swf, it would run as test.swf?var=1&var2=2
View 1 RepliesIs there a there a way to run a movie with url variables passed? So instead of test.swf, it would run as test.swf?var=1&var2=2
View 1 RepliesI'm basically trying to extract a series of variables that are passed in URL from another flash movie. I have researched flash vars and the like and didnt really get far.[code]I was able to get the URL into Flash!So flash now has a variable called "section" that holds a string like this.url...My question is; how do i get the values held in each of these days, weeks, years, etc into a format that can be used with in the flash movie. Ideally into seperate variables where the values can be returned in a textbox.
View 1 RepliesI am trying to use the tutorial on this site to create a simple form submission to my database via ASP. I couldn't open the sample - I am on MX. But I followed the steps on the webpage.My variables are not being passed. All of the Response.Write statements in my ASP page are coming up blank.So I have the 3 input text fields. I specified each with the same variable name as used in the tutorial (fname, lname, email, message). I also used those same names as the instance names but that didn't help so I've deleted it. So currently there are no instance names, just variable names.And then there is a submit button with the code from the tutorial:
on(press){
getURL("http://mysite.com/processForm.asp",0,"post");
}
Thats all that is in the movie.The ASP page comes up, and the database submission completes, but all the variables and database fields are blank.
I am trying to use the tutorial on this site to create a simple form submission to my database via ASP. I couldn't open the sample - I am on MX. But I followed the steps on the webpage. My variables are not being passed. All of the Response.Write statements in my ASP page are coming up blank.
So I have the 3 input text fields. I specified each with the same variable name as used in the tutorial (fname, lname, email, message). I also used those same names as the instance names but that didn't help so I've deleted it. So currently there are no instance names, just variable names. And then there is a submit button with the code from the tutorial:
[CODE]...
Basically, I have an XML object which is pulling layout variables, and then those variables are being passed to another XML object which is sourcing some video thumbnails.And its actually working fine, but only after some tinkering. It seems that the passed variables have to be redifined in some fashion within the scope of the new function.It might be easier to explain with the code:
function makeGrid(backwidth, thumbHolderX, thumbHolderY, numCols, tSpacing) {
trace(backwidth);
trace(tSpacing);both trace just fine but (See spacing variable below)
[code]......
I'm using swfObject to load my flash. I need to call a function or pass new variables into the flash file without it reloading. The user clicks on a button and the flash text needs to change. I have it working but it reloads the flash file and looks very choppy.
View 1 RepliesI have been using the flashvars from swfobject for a long time to pass info into my swf for specific outcomes. I am just starting to publish everything using flash player 10 and wasnt able to get my variable to be seen by the swf. maybe i was doing something incorrectly with this new file? but i then took code from my older files and they didnt work either... then i published down to flashplayer 9 and it worked perfectly... ???
i am using swfobject 2.2 and my code for passing the flashvar is
// Flash Code:
Code:
var r:int = root.loaderInfo.parameters.varName == null ? 0 : root.loaderInfo.parameters.varName;
[code]....
I'm having a bit of a problem with external vars and timing.I'm building a custom FLV player. In the parent HTML I have some boolean variables that I'm passing to the SWf, stuff like autoStart and loopPlayback.[code]The problem is that line gets executed before the external var gets in, I think. If I place a dummy var at the top of the AS then everything works fine. And the external var is definitely getting passed in, I have setup a check for that.I would need something like loadVars.onData ...but I'm not using loadVars, I wnat the vars to come in from the SWFObject HTML, or maybe a query string.
View 2 RepliesI need to get variables that are passed from my html object and/or embed tags, so I can use them in my flash project.
for example: src="/incl/flash/Line_Graph.swf?a=value1&id=1"
how can I get a and id inside my flash file?
I'm trying to create an application that receives variables passed through FlashVars and makes use of the new TLFTextField. I have run into an issue with accessing the FlashVars after declaring a TLFTextField variable.
The code I have is as follows:
ActionScript Code:
import fl.text.TLFTextField;
var tf:TextField = new TextField();
[code]....
The HTML file is passing a FlashVars value of "title=ThisIsTheTitle" If I run the code, the tf TextField is empty. If I comment out the last line that creates the TLFTextField, the FlashVars come through fine and the tf TextField displays the "title" variable that was passed through FlashVars.If I change the last line to read:
ActionScript Code:
var titleTLF:TextField = new TextField();
It works fine (the "title" variable from FlashVars is show in the tf TextField). I don't understand why delcaring a TLFTextField prevents the FlashVars from being accessed.
I'm having a little trouble with my move to as3, (surprise surprise huh?) Basically when I create a movieclip, I wan't to pass some values into it, like so:
Code:
var menu=new Menu();
menu.x=50;
[code].....
What is the correct syntax to initiate a function in a class similar to constructing an associative array? I have a function that's custom variables is ballooning out and I'd like to label them in the call for sanity sake.
currently:
myClass.myClassFunction("hello world",999,0xff0000);
desired:
myClass.myClassFunction(myText:"hello world",myNumber:999,myColor:0xff0000);
and the class itself for reference:
class com.myClass {
public var myText:String;
public var myNumber:Number;
[code]....
I need to display a word passed to the flash movie through flashvars. My objective is to display this word centered inside a black rectangle which length adapts to the word length. The box should be on top of everything, aligned with the right margin of the Flash Movie and 100px from the top margin.
View 6 RepliesI wasn't to sure where to post this exactly since I'm not sure if this is a actionscript or some other problem.Ok here it goes. The problem is this if in the embed in the HTML document I put in wmode="transparent" for the flash movie the parameter I am passing to the flash movie never gets passed ... I don't see how wmode can do such a thing but then again this is really my first time working with wmode in general.I tested it numerous times to make sure it really does come down to wmode and it does.Here is the code I currently have I hope there is someone out there that could explain to me why it's doing this.
Code:
<param name="movie" value="header.swf?playMovie=stop" />
<param name=quality value=high />
<embed src="header.swf?playMovie=stop"[code]........
Update: I have isolated the problem to a single browser which is Firefox. I've tested it with IE8, Safari and Chrome and they all work without any issues except for Firefox.
I'm trying to do a demo with a fastforward button and a rewind button that will go to the next scene and previous scene...however, due to the format that my predecessor created used...I'm stuck with alot of scenes. The navbar (ff and rewind buttons) is in a .swf file called main. The actual demo is in demo3.swf. I created a loader scene to redirect to the correct scene (when ff and rewind are hit), but I'm not sure how to pass the variables needed from the main movie.
View 4 RepliesMake things very simple, I need to pass variables between different movie clips (.swf's) on my main movie. It seems as tho my variables are only local, not global, i just need to know how to initialize global variables, and how to use the global variables in my other swf's.
View 14 RepliesI have a movie, let's say MainMovie. Within this movie I have another movie, let's call it MovieWithin.
I have a few variables in the MainMovie such as MyColour, MyHeight, etc.
In the MovieWithin, I want to place the following code:
onload()
{
ThisColour = _root.MyColour;
ThisHeight = _root.MyHeight;
}
So that when it loads I can pass variables to the movie. But this isn't working for me!
It seems that I can access variables going in one direction, but not in the other.
For instance if I was in the MainMovie, and had a code such as: MyHeight = this.MovieWithin.ThisHeight
Then this would work absolutely fine! But if I try to access variables in the other direction, from the inner movie to the outer movie, it just won't have it!
I've tried the _parent technique with no joy!
Basically I want to be able to load several movies (not at the same time!) into my MovieWithin, but be able to control their state on loading by accessing the variables in the MainMovie.
I'm using a Flash accordion component. This component is made of movies and includes text boxes which people can enter locations into. These values are processed on the main stage on the click of a button. My question is, how do i get the value that was entered in the accordion movies into a variable on the main stage that the can be used. At the moment I have a text box on the page, and have added this code to the first frame. Although I think the value is stuck within the movie and cant be accessed on the main stage.
keyword = varkeyword
I keep having problems with variables in movie clips
_level0.NumberSectionsEntry.ThreeMeterBays
keeps appearing in the text fields
if I change the variables on the text field in hte mc from ThreeMeterBays to _root.ThreeMeterBays they work do all variables have to call _root?
How can a pass an asp value <%thisvalue%> to a SWF file? I can get the SWF to connect to an XML database but need to be able get a value from the ASP code so I can compare the XML database table and extract the correct information.
XML DATABASE
ClientNumber
Client Name
ASP VALUE (contains the ClientNumber to compare)
<%thisvalue%>
i'm trying to send out some input form variables top a php script via loadVariables() and it's working, but the only problem is that flash also sends out all the html font information along with the form data. so instead of getting something like "Name: Phil" the php script gets:[code]is there a way to keep this from happening in flash or do i need to start getting fancy with the php?
View 3 Repliesi have start the timer timer.start();how I can determine how much miliseconds or seconds passed , since the timer passed [code]Returns the number of milliseconds that have elapsed since Adobe Flash Player was initialized.getTimer() display since the FlasPlayer starts, how to get value of timer
View 3 RepliesSo I have used this code:
_root.loadvars = new LoadVars();
_root.mainoslataus.onLoad = function(succes)
{[code]...........
The problem is that I want to use it at the preloader frame, and display it same time when flash file is loading. But it won't work, it loads when the file has fully loaded, and then its too late.I know that I could use another swf to load this swf and display it then, but its not what I want.
I have a PHP script returning a list of variables to flash. The variables are named something like this:-
photo1
photo2
photo3
price1
price2
[Code]...
How can I create n number of identical movieclips with say three dynamic text boxes in each to show the three variables price, photo and modelnum but will vary with the value of n for each one.
which is the use of having "variable movieClips"?? ...I mean, if I have this:
Code:
var SuperAwesomeGuy:MovieClip = new MovieClip()
the only usefull things I could do with it is the following (which is very usefull if you are using a "for...in"):
Code:
var variableMovie:MovieClip = _root.attachMovie("movie","movie-with-complicated-name"+i,random_depth)
variableMovie._x = 200
variableMovie._y = 500
and I didn't found anything else useful...
What I am trying to do used to be very simple. I have a variable set in move A. Movie A embeds another move (Movie B) into a movie clip. Is there a simple way to call a varaible from movie a through movie b?If you need a little more detail here is what I am trying to accomplish. Movie a loads a list of information from a xml file and uses that data to set some variables within the content. (ie. based on the data it might caculate that the user listed in the xml file likes golf) Then it sets golf to true in Movie A. My problem is i need this variable throughout several of my movies and I dont want to do the calculation in ever single movie clip. I am sure I am making this much harder than it needs to be.
View 3 RepliesHow can I get access to the parameters that are passed into the swf, such as My.swf?xyz=123 ? How can I get the value of xyz?
View 3 RepliesWhy isn't the "finco" not recognised/passed to php? I'm not getting the text results!!
Code:
var finco = "motors01";
XMLParser.load("[URL]"+finco, onFinish);
function onFinish($success:Boolean, $results:Object, $xml:XML):Void {
if ($success) { category.text += $results.category[0].value;
namez.text += $results.namez[0].value;
[Code] ......
i have start the timer
timer.start();
how I can determine how much miliseconds or seconds passed , since the timer passed
from flash documentation :
getTimer():int
Returns the number of milliseconds that have elapsed since Adobe Flash Player was initialized.
getTimer() display since the FlasPlayer starts, how to get value of timer
I have a basic XML file and a parser in as3.
So far, I can get it to parse and trace data from the xml file:
{
xml = new XML(e.target.data);
var tester = xml.item;
[Code].....
My objective is to pass in a bunch of variables from my XML file that I can use anywhere in the flash project.