Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Passing A Variable In A GetURL Function To An HTML Page With JavaScript


This is probably a stupid question, but here goes:

I want to open external windows with high quality jpegs, and I don't want toolbars, scrollbars, etc...

So what I have made a blank html page called "launch.html"
On this page is some simple javascript set up to take the variable passed from Flashs getURL function, and open up a new window with the correct file.

But when I use a javascript alert to find out if the variable is being passed correctly the alert box says my variable is undefined.

The flash getURL function is scripted as such:

getURL("launch.html&openWindow=" + _root.myTarget, target="_blank", "GET")

_root.myTarget variable is set when a user presses a thumbnail image on my webpage.

Well thats my problem, hope I explained it well. Thanks ahead of time for any help you can provide

btw, using Flash 5




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-17-2002, 03:25 AM


View Complete Forum Thread with Replies

Sponsored Links:

Passing A Variable To A New Html Page
I'm trying to pass a variable to a new html page opened by clicking on a button
I COULD use getURL to open the new page, but I want to be able to define the new window's properties (dimensions, which toolbars show up, etc), so I prolly need to use javascript for that.

I found this code from another post in here, for doing just that:

function platformCheck(){
if (navigator.platform == "Win32"){
window.open('mypage. htm','pagename','toolbar=yes,scrollbars=no,status=
yes,width=800,height=600')
} else {
window.open('mypage. htm','pagename','toolbar=yes,scrollbars=no,status=
yes,width=785,height=587')
}

but I'd still like to pass a variable. Does anyone know how to do that? I'm thinking this is prolly just a syntax question, cause it seems like it wouldn't be that hard to do
thanks

View Replies !    View Related
Passing A Simple Variable From An HTML Page Into Flash?
Okay...so here it goes....

Okay the first part isnt as important to my question but I have to set up the scenario for you... Inside a flash file I have like 5 buttons that control the x position of a movie clip (the movie clip is called "mc_maincontent".The movie clip is longer than the stage itself and when I click one of the 5 buttons it tells the movie clip to position itslef accordingly. Basically it makes the movie clip slide into position depending on which button you push.The main timeline is only 3 frames long.. So here is the actual code that I have:

//this is what is in the first frame on the main timeline.
currentPos = _root.mc_maincontent._x;
clickedPos = currentPos;


//this is what is in the 2nd frame on the main timeline.
//the 7 is just what i dived it by to controll how fast it scrolls
if (currentPos != clickedPos) {
currentPos = currentPos + (clickedPos - currentPos)/7;
_root.mc_maincontent._x = currentPos;
}

//this is what's in the 3rd frame, i just keeps going back to frame 2
gotoAndPlay(2);


Now with all of that said, the five buttons that i have on the main timeline that controll the x position of the movie clip each just have a simple bit of code in them that sets the properties of the "clickedPos" variable...for example button one contains the code:

on (press) {
clickedPos = 386.7;
}

OKAY SO NOW HERE IS THE ISSUE........

What if I have an HTML page, that is seperate from the page housing this flash movie, but if for some reason I want this seperate HTML page to have buttons on it as well (not flash buttons though) and if I click one of these buttons it tells the flash file in the other page to change that "clickedPos" variable to another value. How would one do this?

View Replies !    View Related
Html Button Passing Variable To Flash Next Page
Hi
I hope someone can help me here or direct me to somewhere. I would like to pass a variable to a flash file from the previous html page. I thought I could add a php query and the flash file would automatically pick it up, but obviously I am being naive.
Basically is it possible to add a variable to the html that an embedded flash file can read.

any help greatly appreciated if you can understand the drivel I have written above

many thanks

adam

View Replies !    View Related
LoadVariablesNum/getUrl Not Passing Values To ASP Page
Hi All,

I have a current flash 5.0 application that utilizes loadVariablesNum to retrieve variables from an ASP page and then uses getUrl to pass these variables along with values from the Flash movie to another ASP for saving in a database. This code has been working correctly for the past year or so but suddenly it has started to not behave correctly. We have had several clients successfully execute the code (ie. their answers from this flash application are successfully saved to the database) but now we are having about 1/2 that we are "loosing" the flash data, but not the variables that I passed INTO the flash movie.

Here is the actionscript code used to load the variables called from the first frame in the movie

loadVariablesNum("flashVars.asp",0,"GET");

Here is the contents of the flashVars.asp file >>>

<%@ Language=VBScript %>
<%
Dim username
Dim facilitator
Dim project


Response.write "&username="&Session("UserName")&"&facilitator="&S ession("SectionID")&"&project="&Session("Curr_Proj ect")&""

%>

And finally here is the code that is called to pass the variables to an ASP script for saving in the database.

on(release) {
p1 = _root.A1.currRank;
p2 = _root.A2.currRank;
p3 = _root.A3.currRank;
p4 = _root.A4.currRank;
p5 = _root.A5.currRank;
p6 = _root.A6.currRank;
p7 = _root.A7.currRank;
p8 = _root.A8.currRank;
p9 = _root.A9.currRank;
p10 = _root.A10.currRank;
p11 = _root.A11.currRank;
p12 = _root.A12.currRank;
p13 = _root.A13.currRank;
p14 = _root.A14.currRank;
p15 = _root.A15.currRank;
p16 = _root.A16.currRank;
p17 = _root.A17.currRank;

from = "Flash";
which = "initial";

getUrl("../saveSequence.asp","_parent","POST")


}

What seems to happen for "some users" is the passed in variables and the variables from and which work fine but p1...through p17 are not always passed.

Any help is appreciated!

I keep thinking it is a platform/browser issue but I cannot find anything on the Internet related to this problem.

View Replies !    View Related
Problem Passing Variable To GetURL
hi guys I am having an ugly problem with my javascript popup code. The Url I want the java to open is actully a variable I am using that gets updated to whatever portion of the site the user is viewing.


Code:
theUrl = _root.theTxt[_global.moveNumber] + leftBtnNum + ".html";
fullUrl = "files/" + theUrl;

getURL ("javascript:NewWindow=window.open( 'fullUrl', 'newWin','width=800,height=450,left=300,top=200,toolbar=No,location=Yes,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
However when passing the variable to the popup code, it just references the variable name and not the information it is made up of. So instead of getting:
C:sitefilesWOULD WORK.html

the link ends up as
C:sitefullURL

I tried breaking up the getURL string by quoting out the variable so it wouldnt be considered as part of the string and adding + to connect it

Code:
getURL ("javascript:NewWindow=window.open("+fullUrl,+"'newWin','width=800,height=450,left=300,top=200,toolbar=No,location=Yes,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
but didnt work and the rest of the Geturl string wasn't picked up.
If anyone could help me or point me to some where I could find anwsers id greatly appreciate it, right now it looks like im going to have to put some java on the individual pages so that when they get loaded using a standard GetURL method they adjust the size and position.

View Replies !    View Related
GetURL- Passing Out A Variable With FlashVars
Hi,

I am having some real trouble passing out a variable from a swf to be controlled in html. I want to be able to change the URL function of a button with flash Vars.

I have tried the following but it always says 'undefined'. Please may someone help, anything would be greatly appreciated.


ActionScript Code:
btn1.onRelease=function(){
getURL(URLname, _blank)}



HTML Code:
<PARAM NAME="FlashVars" VALUE="URLname=http://www.domainname.com">
(I have tried the flash vars with and without the speech marks around it in html.

Do I have to assign the variable at the start as a URL? Like you do with a number or color?

Thanks,

Dan

View Replies !    View Related
Passing Info From LoadClip And GetURL To Loaded Page
Hello,

I am using an interactive US map in Flash for a dealer locator on my website. I have it set to load an alternate color state using loadClip inside of the onRelease function. inside the onRelease, i also have getURL, which directs to an aspx page for that particular state.

When the new page loads for that state, the page does a postback, and the selected state does not show anymore. How can I pass the selected state to the aspx page so the flash map on that page shows what the user selected?

thanks,

tommy

ps...im very new to this, so i'm sorry if i suck at explaining it.

View Replies !    View Related
[CS3] Passing Href As A Variable From Javascript To Actionscript GetURL
hello. this question sort of involves actionscript and javascript and i think i've been stuck on this for two weeks now... i dont think i know enough of both to do what i'm trying to do, so i need advice.

i was trying to build a world map in flash with many countries and it is embedded in a javascript page with corresponding links of the country names. when you click on the countryname link, or the country movieclip in flash, it goes to the (hardcoded) url of the individual country page. i nearly died trying to make it work, but now it works beautifully.

but there's only one more problem... what i really want to do is to have the flash file get the url for the country from the html of the page.

what is the best way to have all the urls passed over to actionscript as variables to be used in various getURLs?

all the mcs are neatly named after two-letter country codes, and all the links have ids with the same two-letter country code. for example:


Code:
<A id="NN" href=FicticiousCountry.aspx?PageID=99&CountryCode=NN" onMouseover="asMouseOver(this.id)" onMouseout="asMouseOut(this.id)">FicticiousCountry</A>



i'm not using swfobject to embed my flash file because i somehow could not make it work after writing a lot of code to make the countryname link and the country movieclip light each other up onMouseover. so the solution can't involve swfobject....



i have tried to figure out what i should do, like i tried to read up about writing the urls into an external file, or flashvars (very confusing to me, and i'd have to escape many characters),.. i know its probably not even so complex but i dont know what to do.

can anyone help? or at least point me in some direction?
if anything i've described above is not clear enough i can explain further..

thanks for reading!

View Replies !    View Related
Passing Href As A Variable From Javascript To Actionscript GetURL
hello. this question sort of involves actionscript (as2) and javascript and i think i've been stuck on this for two weeks now... i dont think i know enough of both to do what i'm trying to do, so i need advice.

i was trying to build a world map in flash with many countries and it is embedded in a javascript page with corresponding links of the country names. when you click on the countryname link, or the country movieclip in flash, it goes to the (hardcoded) url of the individual country page. i nearly died trying to make it work, but now it works beautifully.

but there's only one more problem... what i really want to do is to have the flash file get the url for the country from the html of the page.

what is the best way to have all the urls passed over to actionscript as variables to be used in various getURLs?

all the mcs are neatly named after two-letter country codes, and all the links have ids with the same two-letter country code. for example:


Code:
<A id="NN" href=FicticiousCountry.aspx?PageID=99&CountryCode=NN" onMouseover="asMouseOver(this.id)" onMouseout="asMouseOut(this.id)">FicticiousCountry</A>
i'm not using swfobject to embed my flash file because i somehow could not make it work after writing a lot of code to make the countryname link and the country movieclip light each other up onMouseover. so the solution can't involve swfobject....



i have tried to figure out what i should do, like i tried to read up about writing the urls into an external file, or flashvars (very confusing to me, and i'd have to escape many characters),.. i know its probably not even so complex but i dont know what to do.

can anyone help? or at least point me in some direction?
if anything i've described above is not clear enough i can explain further..

thanks for reading!

View Replies !    View Related
Passing HTML Form And Hidden Variables From Flash To Html Page
Hi,

I have a html/flash site now, http://www.zachariack.com.

i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire
<form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window.

now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:

<form name="form1" action="http://www.accudatanet.com/mail/msglist.php" method=post>
<input type="hidden" name=sid value="E9697301F704A0CE947DEF42CF86636A">
<input type=text size=15 name=f_user value="">
<input type=hidden name=six value=0>
<input type=password size=15 name="f_pass">
<input type=submit name=submit value="Login >>" class="button">
</form>

how do i implement the above using action scripting. thanks.

regards,
vasant

View Replies !    View Related
Passing Variable To Asp Page
can someone recommend a script and .asp page that will pass a variable from flash into an html popup. I am assuming the popup would have to be an asp page, I just need to pass one simple variable to the page and display it.
hopefully this is veyr easy.
Thanks

View Replies !    View Related
Passing A Variable To A ColdFusion Page
I am working on a Flash test. Upon completing each section of the test, I want to pass a variable called Session.Training.OpenDoor, Session.Training.Grooming, etc. each with a value of 1 to a ColdFusion program page that is collecting that value and returning the information showing that that section of the test has been successfully completed. The ColdFusion programming is set in the .cfm pages but I am unable to figure out how to pass the variable and its value TO the ColdFusion page.

Any help would be GREATLY appreciated.

View Replies !    View Related
Passing Variable To ASP Page Using LoadVariables
Okay guys, here's another one about passing data to an asp page. I'm trying to pass a variable through a string to an asp page. I cannot understand why this is not working. Here is my code:

this.btn1.onRelease = function (){loadVariables("http://www.mywebsite.com/paragonstats/flashprogress.asp?pagename=introduction","POST");
}

If I paste my url in a browser, it triggers the asp page as it should. But this code is not working from flash. If I use getURL, it works, but it opens another browser window or redirects my movie. I'm just trying to track click through statistics. I've even set up a movie with just one button on the root with this code and it won't work. Can anyone please help, I'm baffled. Thanks!

Justin

View Replies !    View Related
Passing Variable After Reloading Page
Hi !

I am working on a flash menu driven site.
Clicking a topic will load the corresponding html page.
Each page has that same flash menu in it.

Can I send a variable onClick and then retrieve it after
the new page is loaded ?

Thanks for your help.

View Replies !    View Related
Passing A Variable To Other Movie In A New Page.
Hi!

I have a flash intro with a menu at my home page. At the internal pages a new flash menu needs to load at diferent frames to play a small animation and mark the current page (clicked at home menu)

How can i send a variable from my home page movie to the menu at the inside pages. This menu is placed at a frame.

Best Regards!

View Replies !    View Related
Passing A Variable Into A Function?
I simplified my original code as much as possible to show what I need.
From the code below, I need to trace (x) so that it doesn't show the top value of 5.
Actually, I need to be able to recognise which of the attachedMovieClip s have been pressed so's to do a getURL based on it.
Can anyone help? Thanks.

myButt.onRollOver = function() {
var a = 0;
for (var x = 0; x<5; x++) {
var myClip = _root.attachMovie("Clip", "Clip"+a, a++);
myClip._x = myClip._width*x;
myClip.onPress = function() {
trace(x);
};
}
}

View Replies !    View Related
Passing A Variable From Within A Function
1. I have successfully parsed either an XML files using the XML object
or variable=value pair using LoadVars in ACTIONSCRIPT 2 (I am using Flash8)

2. However the scope of the variables' value is limited to inside the scope of the success function
(pseudo code)

if (success) {
variable1=value;
}

Now outside this function block I want to be able to access this value whenever I reference the variable1 within the rest of the actionscript.

3.Within the function block, I have tried using:
a) return variable1;
b) _global.variable1=value;
c) _root.variable1=value;
d) this.variable1=value;

4.How do I use a screen name here in the forum? I feel dorky having "screennameisnotavailble" displayed?

Thanks.

View Replies !    View Related
Passing Variable In A Function
I think this is a simple problem. I want to pass a Variable to a function when a button is clicked. I am used to just passing a Variable like so: FuncTest(CustomVarible); But that doesn't seem to work. Here is an example of what I trying to do; I know it won't run in actionscript, but at least it will give you an idea.







Attach Code

btnUserButton.addEventListener(MouseEvent.CLICK, ButtonClicked(varFrame));

function ButtonClicked(e:Event):void {
gotoAndPlay(varFrame);
}

View Replies !    View Related
Passing Variable To A Function
Hi all,

I have this script that reads pictures and links of the pictures from the an xml file, display the picture and then put the link for the image, but I can't seem to pass the link to the onRelease function anyone can help me on this, below is the code:









Attach Code

Photos = new XML();
Photos.ignoreWhite = true;
Photos.onLoad = function(success) {

numimages = this.firstChild.childNodes.length;
spacing = 120;
var _link:Array = new Array();

for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.photosHolder = photos.createEmptyMovieClip("photos"+i, i);
this.photosHolder._x = i*spacing;
this.picHolder._URL = this.picHolder.attributes.link;
trace(this.picHolder._URL); //Tracing image link
var _link[i] = this.picHolder._URL;
trace(_link[i]);//Tracing the link inside the array

this.photosHolder.onRelease=function(){
trace(_link[i]);//Tracing link inside function (still not being passed)
getURL(_link[i], "_blank");
};

this.photosHolder = this.photosHolder.createEmptyMovieClip("photos_image", 0);
this.photosHolder.loadMovie(this.picHolder.attributes.pic);
}
};
Photos.load("xml/hosp.xml");

























Edited: 07/28/2008 at 07:44:01 AM by ehajj

View Replies !    View Related
Passing A Variable Into A Function
why is my variable not being passed into my function?


Code:
dealerLocate.urlButton.linkButton.onRelease=function(webAddress){
web=webAddress
trace("this is web "+web);
fullUrl="http://"+web;
trace("full url="+fullUrl);
getURL(fullUrl, "_blank");
}
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!

now i've got a bunch of goofy trace stuff in there but you get the idea... help!

View Replies !    View Related
Passing Variable To A Function
Hi all,

I have this script that reads pictures and links of the pictures from the an xml file, display the picture and then put the link for the image, but I can't seem to pass the link to the onRelease function anyone can help me on this, below is the code:


Code:
Photos = new XML();
Photos.ignoreWhite = true;
Photos.onLoad = function(success) {

numimages = this.firstChild.childNodes.length;
spacing = 120;
var _link:Array = new Array();

for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.photosHolder = photos.createEmptyMovieClip("photos"+i, i);
this.photosHolder._x = i*spacing;
this.picHolder._URL = this.picHolder.attributes.link;
trace(this.picHolder._URL); //Tracing image link
var _link[i] = this.picHolder._URL;
trace(_link[i]);//Tracing the link inside the array

this.photosHolder.onRelease=function(){
trace(_link[i]);//Tracing link inside function (still not being passed)
getURL(_link[i], "_blank");
};

this.photosHolder = this.photosHolder.createEmptyMovieClip("photos_image", 0);
this.photosHolder.loadMovie(this.picHolder.attributes.pic);
}
};
Photos.load("xml/hosp.xml");

View Replies !    View Related
Passing A Variable To A Function
hi guys

I haven't posted here for a while but i've come across a problem that you might be able to answer

I've boiled the whole thing down to this:

How do i pass a variable to an onLoad() function?

here is my script: .....

View Replies !    View Related
Passing A Variable To A Function
hi guys

i haven't posted here for a while but i've come across a problem that you might be able to answer

i've boiled the whole thing down to this:

how do i pass a variable to an onLoad() function?

here is my script:

ActionScript Code:
function loadDescriptions() {
    for (var i=0; i<_root.menuItems_array.length;i++) {
        var thisTextLoadVars = new LoadVars();
        thisTextLoadVars.onLoad = function(success) {
            trace (_root.menuItems_array[i]);
        };
        var thisDoc = _root.menuItems_array[i];
        trace ("thisDoc: "+thisDoc);
        var textDoc = _root.menu[thisDoc].description;
        thisTextLoadVars.load(textDoc);
    }
}

the trace in the the onLoad function returns "undefined". Can anyone tell me how to get around this please?

thanks
alz

View Replies !    View Related
Passing Variable Inside Function
Can you tell me how to pass variable into _root["menu"+a].onRollOver = function (). See following piece of code and find "<--HERE"
When I roll over mc function is called but nothing returns

Code:
function menuObject() {
if (a<_root.menuGlowne.length) {
_root.attachMovie("menu", "menu"+a, 1100+a);
_root["menu"+a]._y = 0;
if(a==0){
_root["menu"+a]._x = 0;
} else {
_root["menu"+a]._x = _root["menu"+(a-1)]._x + _root["menu"+(a-1)]._width+10
}
_root["menu"+a].onRollOver = function () {
_root.subm(a) // <--HERE
};
a++;
} else {
delete this.onEnterFrame;
}
}

function subm(a){
trace ("called")
trace ("this is" + a)
}

View Replies !    View Related
Passing Variable Inside A Function
Hello all,
here is the source of my question:

Code:
id = "1";
function somefunct(){
trace(id);
}
and the "trace" prints undefined ... does anybody know how i can pass the id variable inside the function ?? Thanks in advance

View Replies !    View Related
Passing Variable To OnRollOver Function
I have this cycle.

for(var p=0; p<k; p++){
eval("Butt"+areaList[p]).onRollOver = function() {
clipZoom(this, 150, 0.8, null, null);
this.swapDepths(1000);
eval(enterList[p])._visible=true;
};

eval("Butt"+areaList[p]).onRollOut = function() {
clipZoom(this, 95, 0.8, null, null);
this.swapDepths(1);
eval(enterList[p])._visible=true;
};
};

The onRollOver function zoom the movieclip and display another movieclip.
I use two arrays that contain the names of the movieclips.
The problem is that p inside the onRollOut is always = k.

I don't understand why.
Is there a workaround?
Thank you,
Marco

View Replies !    View Related
Problem Passing Variable To A Function
Good day all:

I am having a problem getting a variable to pass to a function and then running a tween.

On the stage I have a movie clip called imageGroup_mc. Inside that clip I have another movie clip named t01_mc. I have code within the imageGroup_mc clip that adjusts the alpha of the t01_mc clip.

If I write the code as follows all works fine:

this.t01_mc.onRollOver = function () {
new Tween(this,"_alpha",Regular.easeOut,70,100,5,false );
}

Problem is there are 12 clips like t01 that will all use the same code so I wrote a function, but the following code is not working. I am not sure if the eval is wrong or something else:

function imageRollOver (image) {
new Tween(eval(image),"_alpha",Regular.easeOut,70,100, 5,false);
}

this.t01_mc.onRollOver = function () {
imageRollOver(“t01_mc”);
}

I have tried different variations of putting t01_mc in quotes, writing it as the full imageGroup_mc.t01_mc and nothing is working.

Any assistance would be greatly appreciated.

Thanks in advance.
Mark

View Replies !    View Related
Passing A Variable To OnLoad Function
i haven't posted here before so wotcha

i've come across a problem that you might be able to answer

i've boiled the whole thing down to this:

how do i pass a variable to an onLoad() function?

here is my script:

PHP Code:



function loadDescriptions() {
        for (var i=0; i<_root.menuItems_array.length;i++) {
                var thisTextLoadVars = new LoadVars();
                thisTextLoadVars.onLoad = function(success) {
                        trace (_root.menuItems_array[i]);
                };
                var thisDoc = _root.menuItems_array[i];
                trace ("thisDoc: "+thisDoc);
                var textDoc = _root.menu[thisDoc].description;
                thisTextLoadVars.load(textDoc);
        }





the trace in the the onLoad function returns "undefined". Can anyone tell me how to get around this please?

thanks
alz

View Replies !    View Related
Passing Variable Outside Of A Function Block
1. I have already read the Adobe docs and a gazillion Flash forums about the scope of variables within a function block. This is driving me mad!

2. I am using a function to assign values from a parsed XML file to variables within the function block. I am successful at parsing the XML file and displaying the variables from within the function block. However, they expire outside of the function block.

3. I would like these assigned values available globally outside of the function block.

The pseudo code:

_global.newVariable1
_global.newVariable2
_global.newVariable3

function init () {

//parse script here
//assign parsed field values from xml file to variables - fields come from ChildNodes in the XML file - this ISN'T the issue here - the fields are parsed correctly!)
Variable1 = field1;
Variable2 = field2;
Variable3 = field3;
_global.newVariable1 = Variable1;
_global.newVariable2 = Variable2;
_global.newVariable3 = Variable3;

}

var my_xml = new XML ();
my_xml.onLoad = init;
my_xml.load("filename.xml");
my_xml.ignoreWhite = "true";

trace(_global.newVariable1) should NOT be "undefined" but have the value of Variable1 (the XML field value)

View Replies !    View Related
[AS1/2] Passing An Object As A Variable In A Function
I have a movieClip prototype that calls another function once it has finished.
The other function could be one of many.
I want to be able to pass the variables of the second function to the first function:

Code:
MovieClip.prototype.func1=function(varA,varB,func2name,func2args){
// do something
// once done call second function:
this[func2Name](func2args.join(','));
};
// called using:


Code:
myMC.func1(varA,varB,"func2Name",{func2Arg1:value, func2Arg2:value})
Any idea how this should be written?
At the moment only the first variable of func2 is populated....

Thanks for helpin me out on this 1

Ed

View Replies !    View Related
Passing Instance Name To Function As A Variable
hello friends

the idea is that the site keeps tracks of whatever page is current and passes this variable to the alpha function which will target that movie instance to fade when moving to another page - then that page's name will be assigned to current.

this is the code that i have now..

#include "alpha.as"
evolution.onRelease = function() {
this[current].gotoAndPlay(2);
this[current].alpha(5, 0);
};

evolution and solo exist in the same timeline..

the hierachy is like this there is a movie called pictures on the root timeline - this contains all the buttons and all the scripts that you see (except the external script for the alpha function) - plus the variable current is declared in it too.

it's a one frame movie which contains another movie solo which is what i am trying to target when a button is clicked.

any help very much appreciated..

Si

View Replies !    View Related
Passing Instance Name To Function As A Variable
hello friends

ok the idea is that this movie keeps tracks of whatever page it's on using the variable current. when the button evolution is clicked it should jump to frame 2 of the movie whose instance name is contained in the variable current and also pass this variable to a function called alpha which fade that movie's instance when moving to another page - then that page's name will be assigned to current.

this is the code that i have now..

#include "alpha.as"
evolution.onRelease = function() {
this[current].gotoAndPlay(2);
this[current].alpha(5, 0);
};

all these buttons and movie instances are contained in the same movie clip and the variable current is declared in it too.

any help very much appreciated..

Si

View Replies !    View Related
Quick Fix: Passing A Int Variable Into A Function
I can't seem to get this to work:

var i:int = 0;

function count(a:int):void
{
a++;
}


count(i);
count(i);
count(i);

trace(i);//traces 0


Is there a way I can make it do it's math, to the variable itself, without some crazy solution or using objects to hold the variables?

View Replies !    View Related
[AS1/2] Passing An Object As A Variable In A Function
I have a movieClip prototype that calls another function once it has finished.
The other function could be one of many.
I want to be able to pass the variables of the second function to the first function:

Code:
MovieClip.prototype.func1=function(varA,varB,func2name,func2args){
// do something
// once done call second function:
this[func2Name](func2args.join(','));
};
// called using:


Code:
myMC.func1(varA,varB,"func2Name",{func2Arg1:value, func2Arg2:value})
Any idea how this should be written?
At the moment only the first variable of func2 is populated....

Thanks for helpin me out on this 1

Ed

View Replies !    View Related
Can I Refresh My Html Page Using GetURL?
Is there a way I can automatically refresh the html page where my .swf resides?

Can I use a getURL action to do this even if they page is dynamically generated?

View Replies !    View Related
Using GetURL To Open A HTML Page
Please Help !!!

I am developing an online tutorial.

The tutorial itself is a Flash movie embedded into a HTML page.

At the end of the movie I ask if the user would like to continue to take a test.
There are two buttons - yes and no.
When a button is clicked I want to load an asp page into the page the movie was embedded in.

I've tried getURL but it doesn't work - nothing happens, the buttons just flash nicely as I click on them.

Any suggestions? - I'll try anything !

View Replies !    View Related
Passing A Variable/object To Flash From An Online Page
Hi,
I was wondering, is it possible to pass a variable from a normal online page back to a flash file (offline) residing on a user's pc? That variable will invoke that flash to go to the next frame. My main purpose is to get a variable from the internet back to the flash so it will go to the next frame. Else, it will not. Thanks in advance.

View Replies !    View Related
Problem In Passing Variable From Flash To Aspx Page
Hi all this is my first post.
So this is what I am doing:
There is one Flash movie file and one aspx page.I am trying to send one variable from Flash to aspx page(this sent value has to be displayed in a textbox on aspx page).And aspx page will return three variables to flash(which has to be displayed in Flash).
I have embedded the Flash moviw on aspx page.
I am able to get the three variables passed from aspx to Flash.but i am not able to receive the variavle that is passed from Flash to ASPX page.
Flash :Flash CSE fla developed in actionscript 2.0
ASP.NET:MS Visual Studio 2005
Flash Code:

Code:
//hit is name of the movie clip
hit.onRelease=function()
{
var username:String;
var get_from_aspx = new LoadVars();
var send_to_aspx = new LoadVars();
//var_name is the 'var' field name of the input text box in Flash
send_to_aspx.username = var_name;
trace(+var_name);
trace(+send_to_aspx.username);
send_to_aspx.sendAndLoad("<A href="http://localhost:3030/Flash_ASP/dotnetvar.aspx",get_from_aspx">http://localhost:3030/Flash_ASP/dotnetvar.aspx",get_from_aspx, "POST");
get_from_aspx.onLoad=function(success:Boolean):Void
{
//value# are the dynamic textboxes in Flash
value1.text=this.flash1;
value2.text=this.flash2;
value3.text=this.flash3;
}
}
ASPX Code:

Code:
public partial class Flash_ASP : System.Web.UI.Page
{
protected string u1;
protected string f1;
protected string f2;
protected string f3;
protected string f4;
protected void Page_Load(object sender, EventArgs e)
{
u1 = Request.QueryString["username"];
if (!Page.IsPostBack)
{
f1 = "Flash_var_1";
f2 = "Flash_var_2";
f3 = "Flash_var_3";
Response.Write("flash1=" + f1);
Response.Write("&flash2=" + f2);
Response.Write("&flash3=" + f3);
//txtFlashtoasp is the textbox name on aspx page
txtFlashtoasp.Text = u1;
Page.DataBind();
}
}
}
I am not able to display anything in txtFlashtoasp textbox.
Also, is there anyway to avoid the output of response.write() on the screen.The output from response.write() always appears just above the Flash movie and spoils the look of the page.
plzzzzz help.
Thanks in advance.

View Replies !    View Related
Passing Variables From One Swf To Another Swf On Another Html Page
Hello!!!

I'm kind of new in this posts and I'm having trouble with Flash, and I hope someone could help me around here!

The problem is: I need to send a variable from on swf to another swf. Each movieclip is on a different html page. The first swf receives the data from an input text, then it must send that variable to the second swf wich is in another html page (while displaying that second html).

View Replies !    View Related
Passing Variables From A Movie In One HTML Page To A Movie In A Second HTML Page
I have an .swf nav bar in one HTML page with several buttons. Each button needs to trigger a second HTML page to load with a main movie in it and also designate which additional .swf to load into that main movie. I currently have this code on one of the buttons (similar code setting different values for the variable project to trigger different .swfs on the other buttons):

on (release) {
project = "vw";
getURL ("bigbox.html", "", "GET");
}

View Replies !    View Related
Passing Variable To OnRollOver Function In A Loop
Code:
//this is where the array 'list' is
function buildList(){
spacing = 30
var i = -1;
while(++i <= list.length-1){
name = "infobar"+i;
y = i * spacing;
display.list.attachMovie("infobar",name,i);
display.list[name]._y = y;
display.list[name].linkText.text = list[i][0];
display.list[name].onRollOver=function(){
trace(list[i][0]);//this trace returns undefined
}
trace(list[i][0]);//this trace returns correctly
}
}
buildList();
it seems when i try to use the variable 'i' in the onRollOver function, it doesnt work, because if i replace i with, say, 1... it works fine.

thank you for the help

View Replies !    View Related
GetURL Action W/ Javascript In HTML Page
I have a getURL action that pops up a window working here

http://www.whitneysmithdesign.com

This was created by following tech notes at Macromedia as well as Flashkit. Using Javascript in the HTML as well as the getURL action, the popup window will accept feature modifications. Yet,

The window pops once and no more.

Within the .swf file there exists a loop utilizing the duplicate movie clip action. I beleive this loop prohibits the repeated use of the get URL action, but I am unsure. Is there a workaround for this anyone is aware of?

That is, can a loop in the Flash timeline interrupt or make ineffective the button actions upon similar frames within that movie?

Your help would greatly appreciated.

View Replies !    View Related
GetURL Into A Specific Frame Of An HTML Page
I want to switch html pages that are loaded into specific frames in a browser window out side the main window that the flash movie is in.
In other words:
I click a button in the flash movie that is located in the Main window of a framed window and I want it to change out the html page in the Top, Bottom or Side frames. Without opening a new window.
Can I do this using the getURL command and if so how do I specify the
designated frame in the window?
I tried coping the same code that I am using in HTML now.
But it only opens a new window instead of just loading the html page in to the designated frame.
BELOW IS AN EXAMPLE OF WHAT I AM TRYING TO ACHEIVE AND NOT .
YOU WILL SEE A RED TOP AND A FLASH BLACK BUTTON.
CLICK THE BUTTON AND A NEW WINDOW OPENS WITH A GREEN TOP.
I WANT THE GREEN ONE TO REPLACE THE RED ONE.
http://www.homesofstillwater.com/test2.html

Any help would be much appreciated,
cyberhues

View Replies !    View Related
GetURL Not Working Once Embedded In My Html Page?
I've just edited a piece of flash whereby, when you hover the mouse over a picture a credit to the photographer pop's up and advises that if you click on the picture it will take you to the photographers own website.

I've tested this in flash and it works I've opened the .swf file and tested it in here and again it works fine.
However when I place it into my html it is not working????

I've embedded the flash using the following javascript:

<script type="text/javascript" src="swfobject.js"></script>
</head>

<body>
<table width="709" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top">

<div id="flashnavigation">
</div>

<script type="text/javascript">
var so = new SWFObject("headerattractions.swf", "mymovie", "709", "359", "6", "#3C3330","center");
so.addParam("align", "r");
so.write("flashnavigation");
</script>

This allows me to get around the problems with Internet Explorer and flash due to the changes that came about with Eolas.


Could the javascript be the problem??

View Replies !    View Related
GetURL (load HTML Page With Frames) HELP
I have looked everywhere for the correct way to code a button in Flash so it will load a NEW HTML page with two Frames in it (TopFrame and MainFrame). Loading the framset is no problem. Does anyone know how to code the getURL statement so it will load an HTML page (frameset) with specific html pages in each of the two framesets. (actually the TopFrame has the same media file in each case it's the MainFrame that I need to be able to specify which HTML file my getURL statement loads)




Thanks
Mark

View Replies !    View Related
GetURL (load HTML Page With Frames) HELP
I have looked everywhere for the correct way to code a button in Flash so it will load a NEW HTML page with two Frames in it (TopFrame and MainFrame). Loading the framset is no problem. Does anyone know how to code the getURL statement so it will load an HTML page (frameset) with specific html pages in each of the two framesets. (actually the TopFrame has the same media file in each case it's the MainFrame that I need to be able to specify which HTML file my getURL statement loads)




Thanks
Mark

View Replies !    View Related
Passing Variable To Swf From Html/asp
Passing a variable to flash from asp/javascriptI have a flash navigation movie that I want to load the corr3ect state of the navigation. Should be trivial right? Well somehow Im stuck, all you gurus out if you can help please do. Here's what I have

I tried the following:


if (page=p1) {
_root.anim.gotoAndPlay("a_pr");
} else if (page=p2) {
_root.anim.gotoAndPlay("a_pt");
} else if (page=p3) {
_root.anim.gotoAndPlay("a_pu");
} else if (page=p4) {
_root.anim.gotoAndPlay("a_pv");
}

And in my asp page im hard coding the value just for error protect as follows.

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="760" height="128">
<param name=movie value="ks_nav_vars.swf?page=p1">
<param name=quality value=high>
<embed src="ks_nav_vars.swf?page=p1" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="128">
</embed>


But the flash file is freezing. I know Im close what am I missing?

Thanks in advance.

View Replies !    View Related
Passing A Variable Via An HTML URL
This seems butt simple, but I can't seem to get it to work.

I have a movie with an if/else checking a variable and sending the timeline to a particular frame based on the variable

PHP Code:



if (CallPage=1) { 
     gotoAndPlay(1);
}
if (CallPage=2) { 
     gotoAndPlay(2);





etc.

When I set the variable "CallPage" in the root, everything works fine, but when I append it to the end of the URL for the page the swf is on, it doesn't work.

www.index.html?CallPage=1

Shouldn't that work? It seems like such a simple thing.
Thanks for any help you can provide.
-John

View Replies !    View Related
Passing Variable From HTML To AS
Im using an affiliate program that automatically generates the following html for my swf banners:

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

View Replies !    View Related
Passing Variables From Html Page To Flash
Hi, I have an HTML page with a variable in and would like to pass it to flash and then read it out again to HTML how would I go about this?? Any help would be much appreciated

Thanks in advance

View Replies !    View Related
Targeting An Html Anchor Using GetURL() Without A Page Reload
I have my whole site contained within one html page. I am using flash for the navigation and I would like to have it link to the HTML anchors without reloading the page!

Can someone please help me?

Thanks

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved