ActionScript 2.0 :: Send A Variable From An HTML Into Flash In Order To Modify It Based On The Value?
Feb 11, 2010
I'm trying to send a variable from an HTML into Flash in order to modify it based on the value. I generally know how FlashVars works in AS3, so I did some quick reading for AS2 and made a test swf.
[URL]
In my swf, the first frame only has this code:
Code:
if (_root.tester == undefined) {
var passed:String = "Nothing Passed";
} else {
var passed:String = _root.tester;
}
texty.text = passed;
According to what I've read and what my code is, this should work. It should read the value of video as the value of _root.tester (check the HTML code), yet it's always listed as undefined.
I am trying to create a email form or a button that will send an email to the users email address that they enter. I want to send them a different email depending on a variable that has been set? For instance I have five backgrounds, and earlier you were asked to choose a background. Once the background was set, so was a variable. Depending on this variable, I would like a different email, with content relative to the chosen background to be sent. How can I go about doing something like this?
Also, just a little variable. (xmlfile=text.xml) (I want to have the same swf-file but use it in several html-files (and I have one xml-file to every html-file))
I'm a web designer. In a effort to make Flash-based sites for my clients I have gone over stacks of AS books now for months. I just don't get any of it--and I've tried. Moreover, the books all give abstract examples to do just about anything with AE. My needs are very limited: I need to use AS for web navigation in order to create Flash-based websites. Here's an example of what I'd like my websites to do: [URL]
Can anybody point me to Flash templates, demos, tutorials, AS libraries, websites, videos, classes, that focus on Flash navigation, with specific examples of real life websites? Or blocks of code where all I have to do is replace some lines with my own stuff? Or an AS library comparable to jQuery? I know this has to be doable. I don't know any JavaScript either, but I'm perfectly able to fulfill all my web design needs with jQuery.
I was trying to send 4 paragraphs to a .swf element. I have no idea how to what to do. I tried using FlashVars but I feel like i need to drop in some actionscript to be able to work with the vars conceptsNdisciplinesPar=(some text)&cultures&countriesPar=(some text) etc... Is there an easy way to get access to this text in my .swf?
We have an "application" consisting of a large number of PDF files that link to each other.
Some of the PDF files have links that must be a web URL when running on a PC (or a Mac) but need to open a specific application when running on an iPad.
When not on the iPad, the links look like "http://10.85.1.102".
When on the iPad, they look like "netcam4://2" - which opens the NetCam4 application with camera 2 selected.
NOTE: this is already working but we have to create two versions of the PDF and it would be much better to have only one.
Is there a way using JavaScript (or ActionScript or whatever) for the PDF to determine in which OS it is being displayed and modify the link appropriately?
We don't care if this decision is made when loading the PDF or when the link is clicked.
By the way, so far we have found that GoodReader on the iPad is the only PDF viewer that will properly follow links - including those to the NetCam4 app.
I have a task to upgrade a web site. I have a map of ND with some cities on it. I needed to add a new city to the SWF which did not seem to be hard (asuming I did it correct). The action on all the buttons for each city look like this except the name after the # is the city selected.
on (release){ getURL("locations_info.html#minot", "location_content");} In HTML code snip that controls this looked like this : <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
I have used the kirupa tutorial on a flash email form and it works GREAT! The only thing is I want to have required fields that need to be entered in for the form to send. If the user doesn't enter anything, it will ask them to in order to send the email.how I can do this or adapt it to the kirupa tutorial code?
I am trying to work with a simple HTTPService. The problem is that my webservice is conscious of the order of arguments it gets. I will tell the problem with an example:
var service:HTTPService = new HTTPService(); var params:Object = new Object(); params.rows = 0; params.facet = "true"; service.send(params);
Note that in the above code I have mentioned the parameter rows before facet, but the url I recieve is facet=true&rows=0. So I recieve the argument rows before facet and hence my webservice does not work. I figured out that the contents of array is always sent in alphabetical order, which I dont want.
Is there any way I can achieve explict ordering of parameters sent?
Note that I am not in power of changing the logic of webservice(its basically a RPC service supporting both desktop and web client).
I currently have a system that takes the users order and then sends the data to a php file where the details are then emailed to the shop admin. I accomplish this by using...
ActionScript Code: //Retreive and pass the information to a PHP page var variables:URLVariables = new URLVariables(); variables.vItemCode=menu4dynamictext.text; variables.vBaseColor=basecolorpickertext.text; var request:URLRequest=new URLRequest("sendmail.php"); [Code] .....
However I need to change this system so that rather than each order being sent automatically, the details are stored in an array so that a cart system can be produced somehow! It doesn't need to be overly secure, the system simply needs to email colour details etc to the admin.
I have written an ActionScript 3 class that is a Server Socket and accepts connections.I want to write a client in order to send data to the server. The client will be a mobile browser. I think that i will use javascript. Is it possible to connect to the server from mobile environment?
I'm trying to finish off a Flash menu that was done for my website & I'm a bit stuck - New to this game. Basically I have a menu made up of 5 items, each item leads to another list which has a "datefield", "nemericstepper" & "order" button. what I am trying to achieve is when the "order" button is pressed the "date" & "number" information is sent to my existing order page, customers details are then entered in the required fields & this is sent including the "date" & "number" via my existing PHP script to my email.
I am being forced to work with ActionScript / Adobe Air. Coming from a Java-Background. I cannot figure out what I am doing wrong here,Basically I would like the function to return the XMLNode it fetches.
public function getXmlWebpage(address:String):XMLNode { var service:HTTPService = new HTTPService(); var xmlResult : XMLNode = null;
1) They're hard to edit. I never learned AS, and I'm kind of hesitant to learn it. Adobe Flash (using CS5), while kind of cool, is really complicated.
2) They don't show up on Macs.
3) They don't show up right when Google crawls it. It just looks like a picture or something embedded. There's no text, so Google has no clue what you're talking about.
4) You can't get FLA files from the "View Page Source" or even the FTP, you have to ask your client to give you those files. Chances are, especially with my luck, he doesn't have them.
So. Why would someone use Flash to build a website? Especially when HTML 5, CSS3, JQuery and the like can do a similar job? I know I'm pretty new at the more complex languages, but if someone could enlighten me as to why Flash is just as useful, if not moreso, than an HTML based site?
I am trying to send email within an Adobe AIR app using AS3's navigateToURL() function. I have successfully sent over plain text, but was wondering if there is a way to set the content-type to text/html because right now it sends the HTML as brackets. [code]...
Hi, i'm working on a project where i have some major functions on the page working in over a flash file, and i was wondering if there was a way to interact with the html page, based on actions made in the flash file, without having to use ajax or something like that.
I want the flash file to send some kind of data to the html page, much like a javascript, WITHOUT having to reload the page or submit it like a form action.
Basically I am trying to send a variable from flash to php, I was trying to do it through the sendToURL function, because this seemed to be the most appropriate way to do this, although I may be wrong. Below is the AS.
var quizVariables:URLVariables = new URLVariables(); quizVariables.party = "labour"; var myURLRequest:URLRequest = new URLRequest(".../partyhandler.php"); myURLRequest.data = quizVariables; sendToURL(myURLRequest);
Once this is done it should cause the following PHP to run (which works fine if I manually type in the address eg .../partyhandler.php?party=labour)
$party = $_GET['party']; mysql_query("UPDATE party SET $party = $party+1 WHERE id=1");echo $party;
however something seems to not be working with the flash element of the code.
And i m struggling for this past 5 days without knowing the solution AS3 script i wanna send a dynamic variable from flash to php... this work gr8 flash file
[Code]....
in this php file i want to change "$i" dynamically. which the data from from flash should update. i dnt know how to do. when i give 2 then database should fetch fp_id =2, if i give 1 ishoud get fp_id 1.
I've currently got this script (see below). What I'm trying to do is make it so I can load several images from a loop. I've played with a few different things, but I'm not completely understanding how the listener works as it relates to the loader. It seems when I try and add a second image, it only enters the onComplete function 1 time, therefor i only get one Image loaded. As a side note, I've also been trying to dynamically change the x and y position, but I'm not sure how to modify a global variable from within that function, or better yet, pass in the arguements during the eventListener call to onComplete.[code].....
I have the tutorial's files that i created along with the video set up and all and it works. My specific project I'm working on is to have the div tags become editable outside of flash but have my design in flash making it so every div tag had its own respective text box, Is there any way to select specific div tags for the code?
I've built a Flash site, embedded it within an HTML page and I'd like to add a 'HOME' button to the HTML page linking to a particular frame within the Flash. Is this possible?