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








Passing Multiple Parameters To Flash From Php


hi guys, is it possible to pass more than one parameter to flash from a php form ?

I've tried to implement but this doesn't work...


PHP Code:



<?php$id = "123456";$test = "test";?><html><head></head><body><form action="flash.php" method="post"><input type="hidden" name="id" value="<?php echo $id;?>"></input><input type="hidden" name="test" value="<?php echo $test;?>"></input><input type="submit" name="submit" value="Play" /></form></body></html>




PHP Code:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>flash</title></head><body bgcolor="#ffffff"><!--url's used in the movie--><!--text used in the movie--><!--text--><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="400" id="flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash.swf?id=<?php print($_POST['id']); ?>&test=<?php print($_POST['test']); ?>" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="flash.swf?id=<?php print($_POST['id']); ?>&test=<?php print($_POST['test']); ?>" quality="high" bgcolor="#ffffff" width="550" height="400" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></body></html>




ActionScript Code:
myVars = new LoadVars();
myVars.id = "";
myVars.test = "";

myVars.sendAndLoad("http://localhost:6789/pp33tt/__PHPManager__/loadVars/flash.php", myVars, "POST");
//myVars.sendAndLoad("http://php.cs.cse.dmu.ac.uk:6789/p03293858/loadVars/flash.php", myVars, "POST");

myVars.onLoad  = function (success)
{
    if (success)
    {
        _root.txt.text = id;
        _root.test.text = test;
       
        trace (" variables loaded ");
        for( var test in this )
        {
            trace (" key " + test + " = " + this[test]);
           
        }
    }
    else
    {
        trace (" Error loading variables ");
    }
}




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 02-28-2007, 07:27 PM


View Complete Forum Thread with Replies

Sponsored Links:

Passing MULTIPLE Parameters From HTML To Flash
Hi Folks

I want to have my HTML page (with my Flash ) to pass multiple(!) parameters to the flash. I know how to pass one parameter using the ...movie.swf?var1=blabla...
So is there a way to define var2 var3 and to simply acces them from inside my programm. I thought of maybe movie.swf?var1=blabla?var2=bla?var3... but that doesn't work.
I know that i could read the hole string and then slice and cut it so that i have my multiple variables... but this is not comfortable, especially for the user...
thanks in foreward

-i

View Replies !    View Related
Passing Parameters To Multiple Duplicated Movie Clips
Hello,

For an interface, I need several duplicated movieclips. My problem is how to address a function within the newly created clip in order to distinguish the clips.

Say that the code I use to make the duplicated clips is:

duplicateMovieClip (_root.template, "mc"+i, i);

how do I call the function passParameters located in the duplicated clip mc3? (the number 3 would be in a variable).

Thank you!

View Replies !    View Related
Calling A Function From An Html Link And Passing Multiple Parameters
Hi all

Okay I know how to call a function using an html link like this:


Code:
<a href="asfunction:_root.DoThis,Parameter">Click here</a>
my problem is I need to pass in several parameters but when I do this:


Code:
<a href="asfunction:_root.DoThis,Parameter1,Parameter2,Parameter3">Click here</a>
it passes one parameter with this value:

'Parameter1,Parameter2,Parameter3'

Does anyone know how I get round this?

Thanks in advance

View Replies !    View Related
Passing Parameters From PHP To Flash AS3?
I've done searches and all that comes up is Flash to PHP. (Seems to be a very hot topic.) But I haven't seen anything about PHP to Flash. How would I go about doing this?

I know that you need to use flashvars or one of those things, but nobody ever explains what you need to do very well. I need to know this for a photo gallery website (surprise, surprise) but no rush, but please do post. (I rarely get answers around here. )

View Replies !    View Related
Passing Parameters To Flash
Hi,
I need to Pass Parameter to Flash Movie.
I read this:
Step 1
Open the fla and replace the text box with a dynamic text, set the variable name to "mytext" in the property panel (note: you should set the variable name not the instance name). Then export your movie.
Step 2
Edit the page that contain the flash movie. Select the flash movie and append "?mytext=something" to the swf file name in Dreamweaver's property panel. (if you want to edit the html code manually, you need to look for the swf file name in both the <OBJECT> and <EMBED> tag.)
Step 3
Test your HTML page! You should see the movie is now showing whatever you put as "something". Test more by changing the "mytext=" parameter in the HTML page.
---
now,
in my flash file I got 10 variables named: line1 .. line10
now I tried to edit the movie.html and set those things that written in step2 to this:
<param name="movie" value="movie.swf?mytext=HELP" />
..
embed src="movie.swf?mytext=HELP" quality="h....

and than I saved the file, and run the movie.html file.
but it didnt work, it didnt change the variable line1 HELP

How to fix it?
what's the problem here?
Thanks, Gil

View Replies !    View Related
Passing Parameters Into Flash?
Hi,

Is it possible to pass parameters into a flash file from html? Therefore manipulate the way the flash file looks when it is opened.

I have a project where there are many products where each links to a US map (made in flash to make it look good). And when a user clicks on a state, it takes him/her to the vendors in that state that sell that product.

The problem is I have to create one map for each new product as I cannot pass parameters from when someone clicks a product name on the webpage and it takes you to the flash map... If I can for example pass the commodity name in to flash, then I can use one map to link to vendor information.

I don't know if I'm clear enough but it would be great to figure this out as it is a pain to go back and *** new map for every new product. Thank you.

View Replies !    View Related
Passing Parameters From JSP To Flash
Hi All,
I need to pass some parameters from JSP to the embedded flash. Please tell me the way to pass parameters to Flash and how to get the same in Flash. Say i need to pass MonitorName from flash and need to get the same in Flash.

Thanks,
Baskar.S

View Replies !    View Related
Passing Parameters From HTML To SWF (Flash CS3)
hello,

I want to pass parameters from HTML to SWF embedded in the same .html page.

plz, tell how can i do that this in Flash CS3 and can also use the passed parameter in my AS3 code

Best Regards,
Waqas Dar

View Replies !    View Related
Passing Variables/parameters Into Flash
I'm trying to pass one variable [delayRate] into my flash file with my html:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-4 44553540000"

codebase="http://download.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#ve rsion=8,0,0,0"

width="350" height="350" id="imagerot" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="imagerot.swf" />
<PARAM NAME=FlashVars VALUE="delayRate=20">
<param name="quality" value="medium" /><param name="wmode" value="transparent" /><param

name="bgcolor" value="#ffffff" />
<embed src="imagerot.swf"
FlashVars ="delayRate=20"
quality="medium" wmode="transparent" bgcolor="#ffffff" width="350" height="350" name="imagerot"

align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash"

pluginspage="http://www.macromedia.com/g o/getflashplayer" />
</object>
Any ideas what I am doing wrong?
I've tried <param name="movie" value="imagerot.swf" delayRate="20" /> also, but those didn't work.
Thanks

View Replies !    View Related
Passing Parameters To Your Flash File
I'm passing parameters into my Flash file like this.....


Code:
<param name="movie" value="../_navigation/navigation.swf?topNav=contact_us" />
In the Flash file I'm using this code to capture the variable.....


ActionScript Code:
_root.onEnterFrame = function() {
    switch (topNav) {
    case "about_us" :
        about_us.gotoAndStop(7);
        about_us.enabled = false;
        delete _root.onEnterFrame;
        break;
    case "guest_rooms" :
        guest_rooms.gotoAndStop(7);
        guest_rooms.enabled = false;
        delete _root.onEnterFrame;
        break;
             }
}

Most of the time it works but occasionally when I click on a navigation button it doesn't go to the highlighted state of the button. Is there a better implementation for ensuring that the variable is captured properly? Does anyone have any ideas why this is occuring?

View Replies !    View Related
Passing Parameters From Powerpoint To Flash
Hi

I have created a SWF that loads an external JPG. Now I would like to use this SWF in Powerpoint. I have no problems to insert it with the ActiveX control, but I dont know/understand how to pass a parameter (the name of the JPG to load) from Powerpoint to the SWF (I would like to be able to have several copies of the SWF on one page and change JPG's from time to time w/o having to code in Flash).

Is it possible to use FlashVars in any way?
Do I need to do some VisualBasic coding?
Or is there a much easier way to do it?

Been on this for a while now :-(


All help greatly appreciated!

View Replies !    View Related
Passing Parameters From HTML To SWF (Flash CS3)
hello,

I want to pass parameters from HTML to SWF embedded in the same .html page.

plz, tell how can i do that this in Flash CS3 and can also use the passed parameter in my AS3 code

Best Regards,
Waqas Dar

View Replies !    View Related
Passing Colour Parameters From Asp To Flash
Hi there
I find a lot of information to pass variable values i.e. for text from asp to Flash, but what I need is to be able to change the colour of items with a querystring. I have to handle the colour of 35 items and additionally, I need to fill in text values into these items, meaning a pretty long querystring...
THis was all working easily with SVG, but now it's time to move on, sinve SVG has now its official death certificate :-(

I would appreciate any help,
many thanks
Manfred

View Replies !    View Related
Passing Parameters From A Browser URL To Flash
Flash CS3, AS3

Is there any way to pass parameters from the URL line in a web browser to actionscript?

ie. so if you had something like the following URL link in the browser...

http://www.somedomain.com/someswf.swf?var1=10&var2=false

...it would pass var1 and var2 to someswf.swf. (Hypothetically, of course - I'm unsure as to the necessary syntax)

Is this possible? Or would I need some intermediary software?

Thanks
Rick

View Replies !    View Related
Passing Parameters Into Flash Movie
Hello, I need help passing a parameter into a flash movie. I am using Flash CS3 and AS3.

For example:

<PARAM NAME=movie VALUE="myflash.swf?para1=hello">

How can I retrieve this from within my flash movie?

Thanks,

Louis

View Replies !    View Related
URL Rewriting And Passing Parameters To Flash
Last edited by angelt : 2006-01-26 at 09:20.
























Hi,

Is there a way to hide the query string parameters you pass to a swf file? I tried the following - it seemed logical to me - but it doesn't work correctly when using url rewriting (with Apache and mod_rewrite):

1. I set up the following url rewriting rule:

RewriteEngine on
RewriteRule ^somemovie.swf$ othermovie.swf?var1=1

2. In the index.html file which loads the swf, the 'param' and 'embed' tags look like:

<param name="movie" value="somemovie.swf" />

In fact the real swf file which is on the webserver is othermovie.swf - and it is really loaded when the index.html page is requested, but the problem is that the parameter (var1=1) does not seem to be sent to the flash movie. I am trying to access it with:

_root.var1

but it outputs - "undefined".

At the same time it has a value of 1 if I include the query string directly into the 'param' and 'embed' tags of the index.html like that:

<param name="movie" value="somemovie.swf?var1=1" />

So is there really a way to pass query string parameters only by url rewriting, and if so - how can i retrieve their value within the flash movie?

Thanks in advance for your replies

View Replies !    View Related
Passing Parameters From A Hyperlink In Flash To An Oracle Report
Hi,

I created a dynamic Oracle report that accepts parameters and generates a report depending on the paramaters. I would like to be able to click on the USA map that I created in Flash (click on a state) and it will take me to results for that specific state. Everything is all set except that I don't know how to pass parameter from the hyperlink. I have the get URL action obviously but I should be able to another action to pass parameters. Is it possible? Thanks.

View Replies !    View Related
Flash Stops In The Wrong Place When Passing Parameters
Hi,

I have a Flash movie that has about 8 frames. The movie is a menu bar, where each frame shows a different menu item highlighted. Each frame has a name (label).

The .swf file is passed a paremeter in the query string called 'current_menu'. The first frame in the movie has a script which moves to the frame that has a label that matches the value of current_menu.

So if I pass 'company' in current_menu, the script will gotoAndStop('company').

But in some browsers (e.g. Firefox & ID PC), the movie stops in the first frame, even though the parameter has been passed.

It seems to work fine on the second attempt for each of the menu items. So the first time I visit the company page, the menu item is not selected, but the next time I go there (or refresh), it IS selected.

Any ideas? Is it some sort of cache problem? Would appreciate any help on this as it looks like some sort of bug?

Using Flash MX 2004.

View Replies !    View Related
Safari Not Passing Parameters To Flash Object On Page Load
Hey all!

I've a standard page set up with a flash object in the upper right corner. When the page loads, it runs a JS script, which then passes several parameters to the flash object via SetVariable.

In FF and IE, this works perfectly, however, in Safari it doesn't. It seems like Safari tries to activate the script before the actual flash object has been loaded.

If I place the script initiator on the flash objects onLoad (or actually the DIV layer it's in), it kills the functions for all 3 browsers...


Does Safari have problems with passing parameters to flash objects? Because it works sometimes on this particular page.. like 1 out of every 10 tries.

View Replies !    View Related
Can Flash Pass Multiple Parameters In A Querystring? - Please Help
Ok, I know that this works with one parameter:

PHP Code:



<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="249" HEIGHT="249" id="HolidayInvite" ALIGN="">
<PARAM NAME=movie VALUE="http://www.mycompany.com/invites/HolidayInvite.swf[b]?myURL=http://www.mycompany.com/cp/show.asp?id=60426[/b]">
<PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF>

<EMBED src="http://www.mycompany.com/invites/HolidayInvite.swf[b]?myURL=http://www.mycompany.com/cp/show.asp?id=60426[/b]" quality=high wmode=transparent

bgcolor=#FFFFFF  WIDTH="249" HEIGHT="249" NAME="HolidayInvite" ALIGN=""
TYPE="application/x-shockwave-flash"

PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>




but why not with two? ie -
?myURL=http://www.mycompany.com/cp/show.asp?id=60426&Name=Test"

The 2nd parameter (name=test) get's removed...

The code in my movie is as follows:

On a button I have:


Code:
on (press){
getURL(myURL);
}
So when the button is pressed, it will call the variable myURL
which is a URL that has 2 parameters...

What am i doing wrong?

Thanks in advance!

View Replies !    View Related
Passing Parameters?
Hi there,

is it possible to pass a parameter through the object/embed tag to the flash player? How do I read this parameter from flash?

thanx!
Dominik

View Replies !    View Related
Passing Parameters To Swf
Hi,

I'm an experienced programmer, but completely new to Flash.
I want to create a SWF that draws a guitar chord box, but I don't want to publish a different SWF for each possible chord.

My idea is by passing pre-defined custom variables, the chord shape will be drawn at run-time.

I also envisage having multiple chords on a single web page (all using the same SWF file, but being passed different variables defining the fingering etc.)

Can anyone tell me how to go about the variable passing?
All I can find so far is how to open a text file with variables, but since the name of the text file gets compiled into the SWF, it's not suited to my particular problem.

Thanks,

SadCafe

View Replies !    View Related
Passing Parameters
I have a standalone exe that must pass variables values at the end of the presentation to an exe, using the FScommand.


Code:
fscommand("exec", eventlog.exe -drawingid&scratchid&fullname&_root.selected);
fscommand("exec", logplay.exe -_root.scratchid&_root.fullname&_root.prizeArray[_root.selected][2]&_root.prizeArray[_root.selected][4]&_root.WinorLoose;
fscommand("exec", "welcome.exe");


Can someone help me?

View Replies !    View Related
Passing Parameters...
Hi,

Can someone please give me an overview of how to pass parameters between movies.

I have 4 movies, there is a car symbol which changes colour on click. I need each movie to know the current colour of car to show on load. And then on exit, to keep the new colour to the destination movie. There are also a few other variables such as radio = on/off, so i think i need to pass parameters between movies here?

View Replies !    View Related
Passing Parameters
I have a small Flash intro peice that is embedded at the start of an Authorware peice. It has a few buttons of info, a quit and a start. I want the start button to effectivley stop the Flash movie running and proceed into the rest of the Authorware timeline. The quit button will quit the whole Authorware app. I can code the Flash movie to quit etc when running stand-alone from a .swf file, but how do you pass these parameters to Authorware when it's embedded? Any ideas?

View Replies !    View Related
Passing Parameters
I have developed an opening front page in flash for my friends software but he would like to be able to change the version number on this without accessing the .FLA file. Can this be done by passing parameters to the .swf if so can anyone suggest how i go about doing this??
Thanks in advance

View Replies !    View Related
Passing Parameters ?
I know this request has something to do with passing parameters (or variables.) I know very little about either one. Please keep in mind that I am more of a designer than I am a programmer.
PROBLEM:
I am creating a world map. As you roll over each country the name of that country needs to appear in a designated box.
(Open the enclosed file to see a demo.) I was just informed by the client that it needs to be multilingual. The trick to this request is getting the country names to come from a data base so that it can be multilingual. (thus only needing to have one map) I am working with a programmer on the back end of this project but he knows nothing of flash. I presume that I need to rig the country buttons to take in a vairiable. I am just not sure how to set the whole thing up.
Currently the only country that works is South America.
I can give you more info at your request. Thanks for your help. Safe to say that I know very little about this topic.
Thank you for your help!
J

View Replies !    View Related
Passing Parameters
I'm trying to simplify my code. But I'm having a hard time with creating functions and passing parameters. Can I pass the name of a movieclip as a parameter and then control the alpha of that parameter(MC)? If I'm passing the name of an MC as a parameter, do I put the name of the MC in quotes when I'm setting the variable? Also can I call a function from a hitTest in an enterFrame event?

View Replies !    View Related
Passing Parameters
Hi..

I am trying to pass parameters to a flash movie. It passes the variables fine when on the web page. But when its loaded into another movie on the web page the parameters are not getting passed.

What should I do... should I catch the parameters in the main parent movie and make them global variable for the loaded movie... and can I even do that?

Thanks in advance,
Joe

View Replies !    View Related
Help With Passing Parameters Please....?
Hi there,

I have looked on these forums and also on the internet to try and find an answer to what I thought originally was going to be quite easy but I think that I have just confused myself so was wondering if anyone here could help with a small (I hope) problem that I am facing.

What I have is lots of .swf files that are using an FLV playback component. These FLV components link to movies stored on the server. This all works fine. What I want to be able to do is have a html page that I design that contains the html layout and also the .swf file that links to the FLV file. What I need is some way of passing in the url

(http://www.yoursite.com/video.html?v...firstVideo.swf)

so that I can just easily point to the next video .swf file by just changing the url passed to the html file.

Is this possible and if so how cross platformable will it be? The reason I need this is that I am making a site where people will be buying products and there will be video demonstrations as part of the package yet I envisage there being a lot of products and so a lot of videos and I didn't want to have to code each page seperately and seemed to remember there was a way of passing a parameter to flash through the url string.

If anyone understands what I am now probably babbling on about a bit too much and can offer any help then I would be very greatful.

Thank you in advance.

Regards,

Mark Bowen

View Replies !    View Related
[F8] Passing Parameters From URL
Hello,

I would like to create Flash movies with dynamically changing content.
There are 2 text fields for which I would like to get content from the URL.

For example, the webpage with embedded Flash movie would be:
http://domain.com/page.php?text1=hahaha&text2=hehehe
and I would like to display the 'hahaha' text in one text field of Flash movie
and 'hehehe' in the other.

Is it easily doable?

Best Regards,
prezzz

View Replies !    View Related
Passing Parameters From Swf To Swf
Got a bit of a problem here. I am trying to load up a swf file from within flash. Problem is that the swf file I am trying to load needs a flashvars parameter passed into it.

I have tried movieclip.loadMovie("url?path=paramter") format but this doesnt work.

Any idea or work arounds?


Cheers
Nick

View Replies !    View Related
Passing Parameters From SWF To SWF
Hello,

Being a total newbie to flash and actionscript in general, there is a big problem I've had for some days now and I can't seem to find a solution, so I was hoping some of you guys could spare a hand over here.

I have a big "parent" SWF which is to load several child swfs, and these have some images and texts that are to be loaded dynamically, hence I need the parent SWF to pass some parameters.
The problem is, I can't seem to figure out a way to do it in AS3. I regret that I didn't start learning AS2 first, because there are like 10 billion tutorials out there on how to do things with it, but AS3 is more new so less tutorials and they all cover the same basic stuff that I don't need.

Basically inside the parent SWF I call a PHP script and load some data from it, it works fine. For passing parameters to the child SWFs I was trying the same approach but it ain't working

If I call the child SWF in a browser like this

Code:
http://server/animations/child.swf?id=1&picture=hello.jpg
It works perfectly, the code loads the parameters passed in the GET request and it's all fine.
But why doesn't it work when loading it from within AS3?


ActionScript Code:
var path:String = 'http://server/';
{...}
       
var childArea:Shape = new Shape();
childArea.graphics.drawRect( 0 + ( width * i ), 0 + ( height * i ), width, height);
addChild( childArea );
var childLoader:Loader = new Loader();
childLoader.mask = childArea;
var childURI:String = path + 'animations/child.swf';
//var childURI:String = 'child.swf';
var childRequest:URLRequest = new URLRequest( childURI );
var childVariables:URLVariables = new URLVariables();
childVariables.id = '1';
childVariables.picture= 'hello.jpg';        childLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
childRequest.data = childVariables;
childLoader.load( childRequest );      
addChild( childLoader );

function ioErrorHandler(event:IOErrorEvent):void
{
    trace("ioErrorHandler: " + event);
}

{...}

I always get an IO error that reads

Code:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I can't debug it with the embedded debugger because I get the "nice" sandbox violation thing and I did the whole crossdomain.xml thing but it ain't working, so screw that and I just test it inside the browser. If I try to load the child locally (see the only commented piece in the code above), I get the same IO error and Im able to trace it says basically it can't find "X:/path_to_htdocs/animations/child.swf?id=1&picture=hello.jpg"

So either way it doesn't work and it'd driving me crazy. What am I doing wrong?

Thanks a lot for your time!!

View Replies !    View Related
Passing Parameters...
Hey all,

I'm working on a flash based picture gallery for a fairly specific website. The client submits text and images by way of a form into a database. PHP later renders an XML index of the paths to that data which my SWF file downloads. This works great on a broad level... but every time the player is used, it works the same.

It would be great if I could have a PHP container html file, which would be able to pass parameter or two to my SWF file right off the bat... for instance, and index number... and that would give me a way to customize the player based on it's path in the browser.

So, the question is, can the html/php container pass a parameter (or a few parameters) to an SWF file?

Sorry this was so long - I'm not sure why, but I gave a lot of context this time... :-/

later!

View Replies !    View Related
Passing Parameters
Hi all, I'm brand new here.

I'm working on something where I need to define a function on the main timeline and call it through a "enter" button on a remote that changes a channel on a tv. The first 3 number keys on the remote define variables to pass as parameters through the enter key to the function, but I can't get it to work right. My experimental attempts are only on the "3" and "enter" buttons on the remote and on the function in the main timeline. Any help would be greatly appreciated.

View Replies !    View Related
Passing Parameters
Hi board,

{Flash MX 2004 Pro}


ActionScript Code:
myMovieClip_mc.onPress = foo(true);function foo(state:Boolean) {   // Do something}

The above does not work. Infact the function is not even called.
How can I pass parameters to such functions.
I dont wanna do the following:

ActionScript Code:
myMovieClip_mc.onPress = function(true) { // Do something}


Thanks in advance,

Cruiser

View Replies !    View Related
Passing Parameters..?
Check out this code:

on (release) {
getURL("javascript:openNewWindow(My.swf',New window,'height=600,width=800,toolbar=no,scrollbars =yes,resizable=yes,fullscreen=no') ");
}

everything here is fine. It opens finely.

But...

i want to pass parameters where if i click a button in html page My.swf should open a particular scene called 'Scene 2' rather than scene 1.

i tried

on (release) {
getURL("javascript:openNewWindow(My.swf?myparams=S cene 1,'New window','height=600,width=800,toolbar=no,scrollbar s=yes,resizable=yes,fullscreen=no') ");
}

but its not working

so any idea for this or if it has to be done by you, how would you do it?

Pls Help

Thanks in advance

View Replies !    View Related
Passing Parameters
Hi, I know this is a basic question:

I've set a param name and value in the Object tag of my HTML:

<param name="oneOn" value="true">

I'd like Flash to read this and do something:

if (oneOn == "true") {
oneMC._alpha = 100;
}

When I run the movie, oneMC is still 0% alpha. Am I missing something/doing things the wrong way? How can I get Flash to recognize this parameter?

View Replies !    View Related
Passing Parameters
Hi board,

{Flash MX 2004 Pro}


ActionScript Code:
myMovieClip_mc.onPress = foo(true);function foo(state:Boolean) {   // Do something}

The above does not work. Infact the function is not even called.
How can I pass parameters to such functions.
I dont wanna do the following:

ActionScript Code:
myMovieClip_mc.onPress = function(true) { // Do something}


Thanks in advance,

Cruiser

View Replies !    View Related
Passing Parameters..?
Check out this code:

on (release) {
getURL("javascript:openNewWindow(My.swf',New window,'height=600,width=800,toolbar=no,scrollbars =yes,resizable=yes,fullscreen=no') ");
}

everything here is fine. It opens finely.

But...

i want to pass parameters where if i click a button in html page My.swf should open a particular scene called 'Scene 2' rather than scene 1.

i tried

on (release) {
getURL("javascript:openNewWindow(My.swf?myparams=S cene 1,'New window','height=600,width=800,toolbar=no,scrollbar s=yes,resizable=yes,fullscreen=no') ");
}

but its not working

so any idea for this or if it has to be done by you, how would you do it?

Pls Help

Thanks in advance

View Replies !    View Related
Passing Parameters To .exe Or .bat
Hi
Can flash MX standalone player (.exe) send parameters to an .exe or batch file ? I mean here flash alone and not with another third party software like Flash pro or Flash jester or.....
Thanx

View Replies !    View Related
Passing Parameters..?
Check out this code:

on (release) {
getURL("javascriptpenNewWindow(My.swf',New window,'height=600,width=800,toolbar=no,scrollbars =yes,resizable=yes,fullscreen=no') ");
}

everything here is fine. It opens finely.

But...

i want to pass parameters where if i click a button in html page My.swf should open a particular scene called 'Scene 2' rather than scene 1.

i tried

on (release) {
getURL("javascriptpenNewWindow(My.swf?myparams=Scene 1,'New window','height=600,width=800,toolbar=no,scrollbar s=yes,resizable=yes,fullscreen=no') ");
}

but its not working

so any idea for this or if it has to be done by you, how would you do it?

Pls Help

Thanks in advance

View Replies !    View Related
Passing Parameters From Dreamweaver
I've got a Flash navigation bar in a dreamweaver 40 page web site. I want to make the name of page that the user is on a different color, but I don't want ot make 40 different Flash files. It seems to me that I should be able to pass a variable from Dreamweaver to Flash so a simple actionscript can change the color of the button, but I can't figure out how to make it work. I thought the parameters option in Dreamweaver would do it, but Flash doesn't seem to recognize the variable.

Does anyone know how to pass variables from an HTML file to Flash, and make Flash recognize them?

View Replies !    View Related
Passing Parameters From HTML
Just wanted to know if anyone can tell me how to pass general parameters from HTML to dynamically alter the embedded .swf. Specifically, I want to be able to have the movie pick up a color parameter and use that to change the background color in the movie. This would only have to occur at initialization.

View Replies !    View Related
Passing Parameters To Functions?
hey guys
i am using this script to play a movie in reverse. my question is, how would I go about writing this function only once, and passing the movie clip name of the clip i want to play in reverse as a parameter to the function?
thanks

butt_mc.onRollOut=function(){
revinterval=setInterval(rev,50);
function rev(){
if(butt_mc._currentframe>1){
butt_mc.gotoAndStop(butt_mc._currentframe-1);
}else{
clearInterval(revinterval);
updateAfterEvent();
}
}
}

View Replies !    View Related
Function Not Passing Parameters
I have a component on my stage, within this component there is this function at the first frame of the component's timeline:
code: function ContentLoad(File:String, xFile:Number, yFile:Number) {
//Create a container for the image to load into
_root.createEmptyMovieClip("ContentLoader", _root.getNextHighestDepth());
//Load the actual image
_root.ContentLoader._x = xFile;
_root.ContentLoader._y = yFile;
loadMovie("content/location/description.swf", _root.ContentLoader);
}

Inside this same component, there are buttons, which call the function.
This is defined as follows:
code: on (release) {
ContentLoad("description.swf", 100, 100);
}

The function is called, but the parameters aren't passed.
What is wrong ???

View Replies !    View Related
Passing Parameters To A Function
Hi,

I'm new to AS3, but have written a piece of code in AS2 which I'm now trying to convert.

Basically I've got a movieclip ("grid1") and in that there are a number of instances of the same movieclip ("g1", "g2" etc) and in that is a textbox ("ans.text"). The code I worte passes the name of the movieclip click and takes the content of that textbox and passes it to a function which checks it.

on the button:


Code:
on (press){
checkAns1p(this.ans.text, this);
}


the function:


Code:
function checkAns1p(myAns, referer) {
if (myAns == sub_answer) {
//do something
}


This works fine, the problem I am finding is now that AS3 does not use "on (press)" I don't see how it's possible to pass this information.


Code:
function checkAns(event:MouseEvent):void {
selectedAns = grid1.g1.ans.text;
if (selectedAns == subAns){
trace("Correct!");
}
}


If I hard code it as above then it works, but I don't want to have to do this 32 times. Is there anyway to pass "this" across as I did in AS2?

View Replies !    View Related
Passing Parameters From An Embedded .swf?
Is it possible to retrieve a value of a parameter in flash through the asp page?

For example: Lets say I have an embedded .swf file and a read only text box on my asp page, I want the user to click button1 or button2 in the flash file and when they do, the text box fills with "One" or "Two" respectively, is this possible?

Keep in mind that the text box is not part of the .swf file, it's on the html page.

Please tell me there's a way to do this!

View Replies !    View Related
[CS3, AS2] Passing A Function (and Its Parameters)
does anyone know how to pass a function, and an unknown number of parameters, through another function? I'd like a function to behave similarly to setInterval, where you pass a function name, and every parameter after the function name, no matter how many there are, is used as a parameter for the function call.


i.e.

function aFunc(bFunc:Function, arg1, arg2, ...):Void
{
// magic code makes stuff happen!!
}

so:
aFunc(bFunc, arg1, arg2, arg3, arg4, arg5);

would give me the same thing as:
bFunc(arg1, arg2, arg3, arg4, arg5);

any ideas?

View Replies !    View Related
Passing Parameters Using FlashVar
Hi there
I want to pass parameters in html as


Code:
<param name="FlashVars" value="xmlFile=/directory/123.xml&auto=Y&redirect=
www.yourlisten.com&after=Y&pop=Y">

and i have code in flash like...


PHP Code:




var dd:Sound = new Sound();if(eval("soundfile")){    dd.loadSound(soundfile, true);    dd.stop();}xx = bar._width;orginal_width = bar._width;_root.soundbtndis._visible = false;_root.soundbtndis.disabled = true;this.onEnterFrame = function() {    t1 = int(dd.duration/1000/60);    t1 = t1+" : "+int((dd.duration/1000-(t1*60)));    ddf = int((dd.duration-dd.position)/1000/60);    elapsed_sec = int((((dd.duration-dd.position)/1000/60)-ddf)*60);    if (elapsed_sec<10) {        elapsed_sec = "0"+elapsed_sec;    }    if (ddf<10) {        ddf = "0"+ddf;    }    if (_root.stpd) {        elapsed = _root.t1;    } else {        elapsed = ddf+" : "+elapsed_sec;    }    //mo=dd.position/1000    //elapsed =      vol = dd.getVolume()+" %";    dur = dd.duration;    pos = dd.position;    per = (pos/dur)*100;    m = (pos/dur)*100;    bar._width = (m*xx)/100;    drag._x = _root.bar._width+_root.bar._x;    //drag._y = 136;    if (stpd) {        xx = 0;    } else {        xx = orginal_width;    }    // function keys    if (Key.isDown(67)) {        pauseit();    }    if (Key.isDown(88)) {        playit();    }    if (Key.isDown(86)) {        stopit();    }    //**************************************         };_root.shorba.art = "Artist :"+dd.id3.artist;_root.shorba.song = "Title :"+dd.id3.songname;_root.shorba.setMask(_root.loo7);_root.information.setMask(_root.infomask);







where and what code to be added in this script so that all above parameters will pass in html... pl. help

vimal

View Replies !    View Related
Passing Parameters To Different Scenes
Hello guys,

I wonder if it is possible to pass parameters from a scene to another. I have a couple of scenes that should be played differently according to what scene they have been called from. For example if scene Home was called from scene WIP, the movieclip should be played backwards, if it was called from Showreel, it should be played normally. Also, how can I play a movieclip backwards?

Cheers,

Marcello

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