ActionScript 3.0 :: Access Parameters Passed Into A Swf?
Sep 24, 2008How 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 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 Repliesdoes anyone know how to encrypt the parameters that are passed to a flash movie? The case is, that the user should not be able to read the parameters in the source code in plaintext.
View 2 RepliesIs there a way to look at each variable passed into the paramaters of a function. For example, taken the given code.
Code:
package {import flash.display.MovieClip;
import flash.display.Shape;
public class Dot extends MovieClip {
color:uint;
dotSize:uint;
[Code] .....
So in this instance it would loop through color, dotSize, doughnutSize, and doughnutHoleSize and set the paramaters of the class to be the same value.
Example for each loop:
Code:
for (var key:String in object){
trace(key + ": " + object[key]); // object[key] is value
}
So, is this possible?
I am sending variables from my html page:
Code:
<param name="FlashVars" value="nameCheck=boo&imageCheck=image01.jpg">
...in the parameters section of the flash object code.
I know that to extract the info I need to basically use:
Code:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
...in my as3 code but I am wondering what would be the syntax to return a text field containing the sent variable 'boo' and fill an image area with the file name from the variable 'imageCheck'?
How do I control what parameters are passed in a RemoteObject method? I noticed that when I directly download and run the code from this site, saving an object results in the following parameter set being passed back:
Processing PostsController#save (for 127.0.0.1 at 2011-02-01 23:34:55) [POST] Parameters: {0=>{"post"=>#<Post id: nil, title: "a", body: "b", created_at: nil, updated_at: nil>}, "post"=>#<Post id: nil, title: "a", body: "b", created_at: nil, updated_at: nil>}
[Code]...
So I'm trying to do something like this....<param name="movie" value="comp.swf?rootDomain=3" />where I have a variable called 'rootDomain' in my html, as a parameter.I want to be able to call that from my flash, but whenever I try it comes up as undefined.I'm using this code in my flash..
on(release){getURL (_root.rootDomain + '/news/'), "_self"
}
I don't know if I'm just wrong, if it's syntax or what, but how do I reference that variable in the html with my code?
No matter whether you embed a flash video using Flash Satay, swfobject, or some other method, there are a number of parameters that can be passed to the embedded video. I'd like this to be a community wiki for the following questions: What parameters can be used to embed a flash video? How can the parameters be accessed via ActionScript?
View 1 RepliesFrom an HTML form, I wish to launch my existing working flex application passing in parameters E.G, login details.[code]...
View 1 RepliesActionScript Code:
for (var v = 0; v <= 10; v++) {
var flv = attachMovie("FLVPlayback", "my_FLVPlybk" + v, v+1, {width:20, height:20, x:100, y:20});
}
With this code I have created 10 flvplayback components and inserted in the screen. How to access to each of this components i have created and change parameters like pause() them stop() play() add contentPath etc., I need that only after the loop is finished not while the loop is still on. Something like
findComponent("my_FLVPlybk1").stop();
So I usually use an object in the constructor to receive the parameters like new Class({param1:00,param2:0099,etc).To be able to access those parameters from other functions inside the class I create an object, and copy it:
Code:
public class MyClass {
var params = {};
public function MyClass(p){
[code]....
I'd like to gain read only access to the following parameters of embedded Flash videos located on sites that I do not own through my own custom browser extension/add-on:
Time location of playback head (so I can display the current time in the browser extension via HTML5/JavaScript) Frames (so I can make capture them to an image file, save it and display image in browser extension) Original Dimensions in pixels (so I can display the original video dimensions via JS/HTML5 in browser extension)
Is this possible by using Javascript and HTML5 from a browser extension?
Would I have to use something like the SWFObject Javascript API [URL]
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 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'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 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:
[CODE]...
Why 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.
I have a flash file that I am trying to debug. It loads a second flash file which it passes data to, and then that data is sent to a server. Unfortunately the data isnt coming out how it should.
I would like to know if anyone knows of a way to see what data is being passed to the embeded flash file from the original flash file. I need to make sure the data going to it is correct.
I'm trying to catch when a second is passed using getTimer. I don't want to use setInterval, because I'll need to pause, and unpause it. So.. here's my code:
[Code]...
What is wrong with this code? It seems that the time variable reachs 1000 milliseconds too fast.I'm not getting a second interval. How would I fix that?
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]......
Like the subject says, I'm passing in a url string through swjobject, and then using that variable to make a url request upon an event. Here is the code. If I remove the loaderInfo and just declare my url in the actionscript itself, it works fine.
[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'm trying to see if a specific date has passed but it's not working.Here's my code so far:
ActionScript Code:
var currDate:Date = new Date();
checkIfDateHasPassed = function(y, m, d){
[code].....
Passing an XMLList to a function to layout text and link that text as a button.[code]...
So it displays fine but every link that is set up in the MouseEvent.CLICK is the last one that gets processed, even though it displays the text for every link correctly.
I have traced it inside and outside the MouseEvent and its all fine, but anytime i click any button it always goes to the one link (the last one processed)
why is my variable not being passed into my function?
Code:
dealerLocate.urlButton.linkButton.onRelease=function(webAddress){
web=webAddress
trace("this is web "+web);
[Code]....
the webAddress variable is from the exact same timeline making it one level up from this function. it traces out correctly too so I know the variable is there... just not getting passed!
My code seems to produce an error (7 times - same code) "1120: Access of undefined property xmlMarker." This appears on all occasions where the variable 'xmlMarker' is called outside of the function ('showData') where it was first produced.
Code:
stop();
var placesXML:XML =
<places>[code]............
I have a feeling that I shouldn't refer to the variable as a 'MovieClip', but I am unsure what else to pu thee if that is where the fault lies.On the stage there are several buttons relating to the place names attributes (works perfectly), dependent upon which button is pressed, the scene then jumps to a frame (again this works well), however within that frame there will either be 'myMarker_mc', or myMarker_mc2' (this does not work!).
Is 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 size limit on strings passed to a new XML variable during construction?I have noticed what I think is a hard limit on the size of strings passed as an argument to the constructor of a new XML variable in actionScript3. I noticed it while trying to pass a large string from javascript to a method in AS3.
Everything works fine as long as the string is less than about 330,000 characters, but as soon as the string I pass gets a little bigger than that (say 360,0000 or more) I always get a js error somewhere in the ExternalInterface and a ActionScript error when the data is recieved. I am running on IE.Here is what I am doing:In javascript I have:
flashPlayer.generateFromXml(text);
Where text is some large string of serialized valid xml.Then in AS3, I have
ExternalInterface.addCallback("generateFromXml", generateFromXml); (called in initialize handler)
then
public function generateFromXml(serializedXml:String):void
{
var x:XML = new XML(serializedXml);
}
Everything works fine until the string exceeds about 340,000 characters, then I get this js error at this line in adobe code:
function __flash__addCallback(instance, name) {
instance[name] = function () {
return eval(instance.CallFunction("<invoke name=""+name+"" returntype="javascript">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); //<<<<<--- line with breakpoint in js debugger
[code]....