ActionScript 2.0 :: Loading Vars Straight From An Url?
Nov 28, 2002
i'm trying to read in the URL displayed in flash
if i do this:
url=this._url;
i get:
http://domain.com/myFlashMovie.swf
but i what i actually want is:
http://domain.com/myFlashMovie.htm
plus whatever i pass through the URL
e.g.
http://domain.com/myFlashMovie.htm?canUCme
View 2 Replies
Similar Posts:
Jan 30, 2009
I've managed to follow some drawing tutorias which work fine (mouse down draws a line everywhere you move mouse like MS paint).I would like to adapt this now if I can so that when a user clicks down, a straight line will follow their mouse until they click again and this releases the straight line. This should leave one line on the screen, then they are free to move their mouse and repeat the action again.
View 6 Replies
Feb 9, 2010
When I run the flash from my local host (using XAMPP) it all works fine. But when I put the whole thing onto my online web server and change the URL to access the php file, its just coming back as "NaN" ...so why does it work on my local server but not the online one?
View 6 Replies
Aug 3, 2004
ok I have a load vars function that looks for a txt file and grabs data from it, right now they have to be in the same dir. I'd like to have the txt in the root of my server and then be able to link from any dir in the site...I have: ("dataValues.txt")what should I add before it, I thought maybe a full URL, but no, is it something like ("../dataValues.txt"), basically I want to make the link global for the site - I dont have access to the files right now so I cant just try a bunch of stuff myself.
View 1 Replies
Mar 22, 2009
i'm trying to fill out dynamic text fields by adding to my url like so:url...if the url could link to the html in which the swf was loaded instead of to the swf directly, that would be even better... but that might or might not complicate things (i don't know)
View 8 Replies
Dec 8, 2009
In first frame of my movie I've got this:
PHP Code:
loadVariablesNum("produkter.txt", 0);
import TextField.StyleSheet;
var myCSS:StyleSheet = new StyleSheet();
[Code]....
and a dynamic textbox called "myHTML". If I name 'var' on this textbox everything works fine, but I want to write it in actionsscript instead. Where do I write that? (I have 3 different vars in the text-file)
View 1 Replies
Nov 11, 2011
i used this script:
import flash.display.Loader;
import flash.net.URLRequest;
import flash.net.URLLoader;
[Code]......
it gave me error like this:
ReferenceError: Error #1069: Property jumCust not found on String and there is no default value.
at loadPHP2_fla::MainTimeline/loadedData()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
View 6 Replies
Apr 7, 2010
I have tried repeatedly to sendAndLoad variables from/to flash and php. The problem actually comes when passing the variables from php to flash, here is the flash code:
var dataOut:LoadVars = new LoadVars();
var dataIn:LoadVars = new LoadVars();
dataOut.username = _level0.usuario.ss.s1; //passing the value of textbox
dataOut.pass = _level0.contrasena.ss10.s10; //passing the value of textbox
[Code] .....
I have omitted some mysql code, but it would still work this way. Which is most odd is that when I test the movie in my computer it works perfectly, but when I upload it to the server it doesn't work anymore.
View 2 Replies
Oct 8, 2004
I have it when the user clicks on a link it loads the php ?page=portfolio, in portfolio.php i have a peice of code that writes "var=portfolio.swf" to a .txt file Actionscript loads the text file and grabs the var, which is sent to the preloader which loads portfolio.swf. The problem with this is the Flash cache, you have to open a new window to see the portfolio.swf loaded and the second problem would be clients fighting over the .txt file.
What I want to do is, eliminate everything on the client side (the txt file) and make it so flash picks up the vars from ?page=portfolio and directly passes that to the preloader.
I heard this can be done with FlashVars, its kinda hard for me to understand could some direct me to an example code of FlashVars that I can play around with.
View 1 Replies
Mar 3, 2005
i got this for my js:
Code:
SCRIPT LANGUAGE=JavaScript>
<!--
document.write ("width="+screen.width+"height="screen.height)
//-->
[Code].....
I've been working on this for a while, and i have too much coke and coffee on my veins right now x.x
View 13 Replies
Dec 9, 2002
I have defined two variables,
Example
x = 2;
y = 3;
I then want to load both of these variables so that they will look like this
(2/3)
/ is just a separator not a divide operator!
I want to load these two vars into a dynamic text field called loadText:
_root.loadText = "WHAT DO I PUT HERE";
View 2 Replies
Sep 29, 2003
i am having trouble loading multiple variables into a multline textbox. I am using asp which will output a recordset into flash. For testing purposes var0 should equal three names in my array. Flash is only reading 1. How do I set flash up to read that whole array(3 variables in one textbox)? I know Flash won't output var1 or var2 because I don't have those textfields with those variable names.
Here's what var0 outputs
[URL]
Here's my Flash code
Code:
loadVariablesNum("http://www.delusionalfx.com/exp/flash_asp/register/test.asp",0,"GET");
I have one flash multiline textbox with a variable name var0
View 5 Replies
Feb 20, 2003
OK I have defined a variable sayPHP Code:test="what should I do?" then I have a textfield with var name "test". Now when I play the movie it will display "what should I do?" in the textfield, but what if I put the textfield inside a button? It won't show! How do I change the actionscript so that it doesn't think that the field is in _.root??I tried this:PHP Code:button1.test="whatwhere button1 is the instance name of the button!ut this won't work
View 4 Replies
Sep 29, 2003
i am having trouble loading multiple variables into a multline textbox. I am using asp which will output a recordset into flash. For testing purposes var0 should equal three names in my array. Flash is only reading 1. How do I set flash up to read that whole array(3 variables in one textbox)? I know Flash won't output var1 or var2 because I don't have those textfields with those variable names.
Here's what var0 outputs
[URL]
Here's my Flash code
Code:
loadVariablesNum("http://www.delusionalfx.com/exp/flash_asp/register/test.asp",0,"GET");
I have one flash multiline textbox with a variable name var0
Here's what flash reads
[URL]
View 5 Replies
Dec 10, 2009
I built this site out in as2 and have to convert it to as3. It appears the same logic flow and coding just doesn't apply since everything has changed on an event level. The idea is to load thumbnails dynamically and upon clicking the thumbnail retrieve the loaded variable (i) in the array per the XML loop. I'm trying to figure out what I'm doing wrong in logic flow as it keeps coming up "undefined" or pulling up the last one after the whole thing's loaded. I'd copy the exact code but there's a lot of variables. So I'll post this basic structure to give an idea of what I'm doing. The bold print is where I'm stuck in terms of getting a trace.
[Code]....
View 0 Replies
Feb 5, 2005
i have an swf called movie1, on the main stage of movie1 i have a mc that is named xpos,inside xpos i have a dynamic text box and it's value is asigned to the Var=clipX.to get the value of clipX i used this code in the actions of xpos like this:
Code:
onClipEvent(enterFrame) {
clipX = (_root.object._x);
[code].....
View 3 Replies
Mar 13, 2008
I have a flash file which loads in vars from director. It then adds the values to a graph. The amounts from the string are inputed into text fields. the fields are named energy, waste etc. I want a textfield to output whichever sections that are over 5 saying "well done, you have excelled in water, energy...... I have got this working but am stuck on this bit: I am wanting to add an "and" before the last item, so it outputs as "well done you have excelled in water, waste and energy". Also if only one item is over 5 it wont add the "and". This probably doesnt make any sense, heres my code anyhow:
Code:
var summary_results = "2000,6,3,10,8,6";
var txtFields:Array = [Total,Energy,Waste,Water,Food,Transport];
var excelledItems:Array = [];
var theValues:Array = summary_results.split(",");
for(var i=1;i<theValues.length;i++){
[Code] .....
View 1 Replies
Aug 3, 2004
I have a load vars function that looks for a txt file and grabs data from it, right now they have to be in the same dir. I'd like to have the txt in the root of my server and then be able to link from any dir in the site. I have:
("dataValues.txt")
What should I add before it, I thought maybe a full URL, but no, is it something like ("../dataValues.txt"), basically I want to make the link global for the site - I don't have access to the files right now.
View 1 Replies
Feb 5, 2005
i have an swf called movie1, on the main stage of movie1 i have a mc that is named xpos, inside xpos i have a dynamic text box and it's value is asigned to the Var=clipX. to get the value of clipX i used this code in the actions of xpos like this:
Code:
onClipEvent(enterFrame) {
clipX = (_root.object._x);
}
everything is fine and it works when i play movie1
[Code]...
View 3 Replies
May 19, 2005
i am trying to load vars from a text file into a load vars object.
var kitchentext = new LoadVars();
kitchentext.load('moccastext.txt');
Once in the object, i thought i could reference them like so
kitchentext.name
kitchentext.style
but i am having trouble doing this.
i have a textbox called displytext.
_root.displaytext.text = kitchentext.name;
doesnt work
View 3 Replies
May 22, 2009
Is it possible to play a movieclip which is in the library, but not on the timeline? If not - and if I don't want that movieclip to be seen until a button is clicked to activate it - how do I hide it? with a mask?
View 12 Replies
Jan 6, 2011
I know you can restrain an mc in a rectangle when using startDrag, but is there a way to have the mc only go horizontal or vertical without going off diagonally? Sort of like a slider that can only move in a straight line in four directions (like a cross).
View 4 Replies
Jan 4, 2012
I am trying to bend 2 parallel lines into a circle, but with a motion tween, it curves under eachother... (see att)how would I make them curl to a circle
---------------
/-------------
/----------
[code].....
View 2 Replies
Nov 18, 2011
Is there any tutorial how to make a wall which is not straight
View 6 Replies
Jan 30, 2009
I've followed the drawing api tutorial off here for MX and have got that working perfectly. I would like to adapt this now if I can so that when a user clicks a straight line will follow their mouse until they click again and this releases the straight line.
View 2 Replies
Feb 9, 2010
drawing a straight line, just like on the flash game Line rider. I need to be able to create a line by dragging it with the mouse.
View 3 Replies
Mar 16, 2009
How to drag an object along a straight path using AS 3?
View 2 Replies
Mar 23, 2009
I've managed to get the flex WebService class working with my Flash CS4 project.The problem I'm having is that If I do two calls in rapid succession to different methods of the same WebService,then I can't distinguish the results when they come back.In my project,my function onWebServiceData would trigger twice,but I couldn't tell which time was in response to Method1 and which was in response to
Method2.
View 6 Replies
Jun 22, 2009
I have this code inside an ENTER_FRAME event. I'm trying to move the "ball" from its x- and y-position to a tartget x- and y- position:
Code:
if (processClick)
{
if (ball.x < targetX) ball.x += 8;
if (ball.x > targetX) ball.x -= 8;
[Code]....
But the "ball" doesn't move in a straight line, I think it is because the x- and y-movements are processed independently?
Is there a way thay I can make the "ball" move in a straight line from the starting point to the target point?
Also, is there maybe a way to manually create a tween between the starting point and the target point using actionscript? If I export the "ball" movieclip for actionscript?
View 4 Replies
Dec 2, 2009
I am trying to create a flash movie (AS3) that would allow the user to draw using his mouse but straight lines only. The user would click to set the start point of the line then as he moves the mouse around the line would move with the mouse until the user clicks again to set the end point. When the user clicks again a new line is created without deleting the previous one.
View 3 Replies