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
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-25-2005, 05:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
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 ");
}
}
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
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
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!
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.
Passing Parameters Through .swf Object In Html
you can pass data to a .swf file just like you can with asp in the url bar. formatted like this [ myfile.swf?VAR1=this&VAR2=that ]. but I need to pass a string and im having trouble, can this be done? It only captures up to the first space.
basically I want to pass [ myfile.swf?VAR1=this&var2=some string with spaces ]
any help really appreciated
.:AlphaOne:.
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. )
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
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.
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
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
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?
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!
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
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
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
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
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.
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.
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.
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!
Parameters From HTML To Flash...
I think this must be a simple question, but nobody has answered it at any forum i've posted:
I just wanted to pass some parameters to a movie, from the HTML page, not using any txt file, nor using the URL.
I don't know if I can use the <param...> or the <embed...> and how to receive it from the movie.
Please, can anyone help?
Parameters HTML -> Flash
Hi,
I wonder if there is a way to send parameter from HTML to the
Flash movie?
I need a feature similar to a href's #, where i can forward to
a specific frame when a movie load, depending on a parameter
The solution i have now is by controlling the flash movie through
javascript in the html document, but it doesn't work in all browsers.
How can this be done?
Thanks
Reading Parameters From Html In Flash
I have a banner made, and I want to be able to change the URL it redirects to when clicked by getting the info from an HTML file.
For example, the code below should cause the attached banner to open http://
www.google.com when it's placed into a .html file in the same directory:
<object width="468" height="60">
<param name=FlashVars value="url=http://www.google.com"/>
<param name="movie" value="./linen-fullbanner5.swf"/>
<embed FlashVars="url=http://www.google.com" src="linen-
fullbanner5.swf" width="468" height="60">
</embed>
</object>
Can someone help me out here? I read the stuff over at
http://www.adobe.com/cfusion/knowled...fm?id=tn_16417
But I am still stumped - and slowly going insane lol
Any help would be greatly appreciated.
Reading Parameters From Html In Flash
I have a banner made, and I want to be able to change the URL it redirects to when clicked by getting the info from an HTML file.
For example, the code below should cause the attached banner to open http://
www.google.com when it's placed into a .html file in the same directory:
<object width="468" height="60">
<param name=FlashVars value="url=http://www.google.com"/>
<param name="movie" value="./linen-fullbanner5.swf"/>
<embed FlashVars="url=http://www.google.com" src="linen-
fullbanner5.swf" width="468" height="60">
</embed>
</object>
Can someone help me out here? I read the stuff over at
http://www.adobe.com/cfusion/knowle...cfm?id=tn_16417
But I am still stumped - and slowly going insane lol
Any help would be greatly appreciated.
Here is the banner: http://www.naturaltalent.cc/linen-fullbanner5.fla
Sending Parameters To Flash From Html(asp) Page
Hello:
I have a project where I need to keep track of where the user is at a certain point of a flash training orientation.
Flash application needs to accept a parameter which contains a unique ID for the user running the flash application. This ID needs to be stored throughout the session of the flash application, from page to page. Once a user travels from page-X to page-X in the Flash, the next button needs to call an aspx page in order to send that ID and the page position so the aspx can write to an XML file this information. If the user does not finish the flash, once they return, the aspx needs to read the correct XML file and send 2 parameters to the flash application. These 2 parameters will be the user's ID and the page the user was on the flash can load the correct page. Instead of passing 2 parameters so the flash can dynamically load the correct section, the aspx can call the correct flash file (i.e. flash_file2.swf) but still pass the user's ID as a parameter.
this is how i feel at this point. lol
any help will be greatly appreciated
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
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
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?
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?
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?
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
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
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?
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
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
[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
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
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!!
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!
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.
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
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
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?
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
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
Passing Parameters
I need to pass a parameter to a movie clip that I am loading.
I think my options are probably
this.loadMovie("myMovie.swf?myVar=22")
or in onLoadInit setting the variable directly there
_mc.myVar = 22;
Which method is best ?
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
|