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








XML Url Not Passing To Movie


My flash movie loads XML from the <param name="FlashVars" value="contentXML=.....

All my data is passing to my movie correctly.
I can not figure out why the URL is not passing to the button.

Please find my website here.

VIEW EXAMPLE - the link is the small text to the right of the headline







Attach Code

class DetailBlockLink extends MovieClip
{
var overBlock, hitArea, innerText, isOver, destination, getURL, onReleaseOutside, onEnterFrame;
function DetailBlockLink()
{
super();
_global.DetailBlockLink = this;
hitArea = overBlock;
overBlock._alpha = 0;
innerText.autoSize = true;
innerText.multiline = false;
innerText.wordWrap = false;
innerText.embedFonts = true;
innerText.html = true;
function onRollOver()
{
isOver = true;
} // End of the function
function onRollOut()
{
isOver = false;
} // End of the function
function onRelease()
{
} // End of the function
onReleaseOutside = onRelease;
} // End of the function
function setLink(textContent, url)
{
innerText.htmlText = textContent;
destination = url;
onEnterFrame = fadeStates;
} // End of the function
function fadeStates()
{
var _loc2 = overBlock._alpha;
if (isOver)
{
if (_loc2 < 100)
{
_loc2 = _loc2 + 20;
} // end if
}
else if (_loc2 > 0)
{
_loc2 = _loc2 - 20;
} // end else if
if (_loc2 < 1)
{
_loc2 = 0;
overBlock._visible = false;
}
else
{
overBlock._visible = true;
} // end else if
overBlock._alpha = _loc2;
} // End of the function
} // End of Class

























Edited: 12/20/2006 at 10:38:27 PM by ultima design group




Adobe > ActionScript 1 and 2
Posted on: 12/20/2006 10:35:29 PM


View Complete Forum Thread with Replies

Sponsored Links:

Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:

loadMovieNum(path, 0);

This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.

I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:

c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

this successfully loads banner.swf in place of c.swf, with the following correct querystring appended

banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

If I try:

c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable

this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):

banner.swf?clicktag=http://www.myurl.com&another=variable

what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...

Even URL-encoding the URL doesn't change this

For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----

<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>








Attach Code

----c.swf----

var queryString:String = "";

for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}

if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}

























Edited: 10/01/2008 at 10:40:48 AM by Inzoum

View Replies !    View Related
Passing Variables From Movie Clip To Loaded Movie
I've got a movie clip which contains a button in it. This movie clip contains a few dynamic text fields and is duplicated 20 times. When clicked the button loads a movie into a specified target. Is there a way to send the movie clip's variables to the loaded movie?
Thanks very much.
-Mike

View Replies !    View Related
Passing Variables From Movie To Movie
I have a page which send a Variable to a flash page. This flash page gets the varialbe fine and this page is used to determine if the user has flash or not.

Im going to use the following line to determine the flash the only problem is I can not get Variable Jackpot to hold its numeric value to the page called alert.

getURL ("Alert.asp?Name=Jackpot", "_self");

If I send varialbe using get then the Var "Name" is equal to "Name=10" all I want it to be is "10" Is this possible

View Replies !    View Related
Passing Variables From Movie To Movie
Hi,

I have a game with three separate parts. What I need is put variables in the first part for name and score, and passing them as I go from part to part. At the end I have to make a "HALL OF FAME" with the name and score writen on a page.

How do I put and pass a variables from one .swf to another?

Thanks

View Replies !    View Related
Passing Variables From Movie To Movie
Hi Guys

This may seem a realy silly question but how can I pass variables from one flash movie to another?

I am working on a site which requires a shopping trolley. As a visitor views the site they can add information to a basket. This is one flash movie. Then there is an enquirey form. This is a second flash movie. The variables from the first needs to be passed to the second.

These two movies are controlled via a flash menu (third flash movie).

all movies are on a framed site which has a top frome (top) and a bottom frame (info) the menu is always visible in top and I need to control flash movies one and two in the bottom frame (info).

Thanks in advance fro any help with this.

rangerover

View Replies !    View Related
Passing On Variables From One Movie To The Other
Hi there,

I would like to load a movie into
my main.swf (no problem here)

I need to enter stuff into a variable
based in the loaded movie

loaded movie unloads and we return to main.swf

At the end of the main.swf I would like to display
the value of the variable in the loaded movie


Thanks

View Replies !    View Related
Passing Url Variables To A Movie
hi,
was wondering if it was possible to pass variables to a movie by attaching them to the page url?
i have a main movie that loads smaller clips and its these clip names i want to pass on

View Replies !    View Related
Passing Variables From One Movie To Another
If I have a main movie (movie1) that calls other movies (movie2, movie3) within it, how do I send a variable from one to another embeded movie?

For example send a variable from movie2 to movie3. Should I store the variable into the main movie first then movie3 can call thre variable from there?

like this?
movie2
------
_root.id = "10";

main movie
----------
loadMovie("movie3", 1); // loads movie3 directly onto same level as movie2 was.

movie3
------
id = _root.id;

This doesn't seem to work? Am I close to the answer?

View Replies !    View Related
Passing Var. From 1 Movie To Another In A Different Page?
Hi,
Just wanted to know if it is at all possible to pass variables from one movie in a html page to another movie in a different html page?????? I can'T seem to find info on this subject. Can anyone help????? Thanks a million.

View Replies !    View Related
Passing A Value To A Flash Movie
could you find out what you need to do to read in the value that I pass to the flash movie.
In the HTML page that holds the movie there is this line in the code:

<PARAM NAME=movie VALUE="debug.swf?src=gotit">

I need you to be able to read the value of the variable 'src', which in this instance is 'gotit',
and have that appear as one of the values when your form submits.

View Replies !    View Related
Passing Variables To Another Movie
Hi Gang,

I need to send the variables from the flash form in my movie form.swf (in form.html )and then pass that to another movie which is called end.swf a (in end.html)

... basically how do you do that?

Cheers

Planet House

View Replies !    View Related
Passing RGB Value Into Attached Movie,,?
well , guys i am making a paint application....(not tht coool , HUh)

my problem is tht i am painting through a single script and by attaching objects from the library..on a fly..

some colors are there ....i wanna have the RGB value of those color buttons in my attached movie clips...??

so wht should i write as a scripts...??


CAN ANT ONE ....????


REGARDS

View Replies !    View Related
Passing Symbols(?) To A Movie
Hi,

I have a movie of a pair of running legs. SO far so good. I also have a movie symbol (although it could be a graphic I suppose) of a single Text Character which I sit on top of the legs to make it look like the letter is running. (Ok very cheesy!)

Question: Clearly the character symbol is one letter. I know how to duplicate a movie but how do I then change the "letter" that is running. ie I need to pass a different instance of the Text Character Symbol to each duplication. Have I started in the right way and if so what next? In not, then what is the best way to go about it?

Hope I've been clear and Thanks in advance!

Cheers,

Ig

View Replies !    View Related
Passing Up The Load Movie
Hello everyone, I need some help. I am using flash 5 by the way.

My problem is this, I have made a small logo movie that will accent a current site I am working on.

The movie loads up fine, I do have the movie in and include file called head.asp, did this to save time.

The problem is that everytime somone goes to a differnt page it will reload head.asp and that also reloads the logo movie, for a slplit second or two you see that loadng movie with the loading bar then you see the logo come in.

What I am trying to do is pass up the loading movie if the movie has been loaded and go to the logo coming in.
I also want to be able to load the movie with the loading bar and then show the logo coming in as well.

It seemed to be working but the loading movie is not showing up once I clear my cache file, it does load but no loading bar.

Here is the script broken down in the three frames,


Frame 1:

wein = _root.getBytesLoaded();
if (wein = 0) {
gotoAndPlay (2);
trace ("we need to load");
} else {
gotoAndPlay ("3logo", 1);
trace ("already loaded");
}

---------------------------------------------------

Frame 2:

btload = _root.getBytesLoaded();
totbt = _root.getBytesTotal();
sclbar = btload*100/totbt;
sclbar = Math.round(sclbar);
setProperty (_root.orangebar, _xscale, sclbar);
barwid = getProperty(_root.orangebar, _width)
barwid = barwid + getProperty(_root.orangebar, _x)
setProperty (_root.ldper, _x, barwid);
//setProperty (this.ldbar, _xscale, sclbar);
//trace (sclbar);
// trace(bytloaded);

---------------------------------------------------

Frame 3:

if (btload>=totbt) {
gotoAndPlay ("3logo", 1);
trace ("loading complete");
} else {
gotoAndPlay (2);
trace ("we need to load");
}

---------------------------------------------------

If any one has the time to help I could return that favor to help you if needed.

Thanks guys.

View Replies !    View Related
Variable Passing From One Movie To The Other?
Hi, I am completely stumped as to how to do this.

I have a main movie (nav.swf)
and movies A and B

nav.swf loads movie A into level 1 in the first frame (no problem there)

There is a button in Movie A that I want to:
On release, define a variable (say x)
then load movie B in level 1

I would like X to be used by Movie B.

I seem to get everything working actually except this variable. I've looked through my books, and in the Flash help files. I have so far been able to find all the answers I have needed using those. But it's late, maybe I am blind If anyone can give me a hand as to how I can accomplish this it would greatly appreciated.

View Replies !    View Related
Passing Variables To A Movie
This is probably something really simple, but I can't seem to get it to work. At the end of a presentation, i am having the user enter their name in a text field on the main timeline where var=name. Then hitting a print button that has the action to print a movie with an instance name of 'cert'. The movie contains a certificate of completion. I have it in a movie because i would rather not have teh viewer see it (it is off the stage and prints fine).

I am trying to get the name from the main time line to show up in the certificate. I've tried just about everything I can think of. For the var in the 'cert' movie, I'v tried '_level0.name' and I've tried '_root.name' and a million other combinations, but I just can't get the name to show up in the movie. Any suggestions?

View Replies !    View Related
Passing Data From 1 Movie To Another
Theoretically I think this is undoable, but flash kit has proved me wrong in the past.

Example, say I have 2 swf's in 2 seperate html pages, is it possible to pass variables, or even string literals from one to the other?

Thanks in advance

mr mooch

View Replies !    View Related
Passing Variable From A Movie To Another
hello all.

i've got a movie, let's call it "chat". this is the main movie

in this movie, i generate on the fly buttons with datas coming from a db, with php. these buttons are duplicated from the MC "button"

these buttons have value, that i would like to send to the main movie when clicked. (there is a script in the main movie, that look like this:

randomNumber = Math.random(100000);
loadVariablesNum("messages.php?dest=" + randomnumber(), 0, "POST");

this code is used to retrieve some other datas from the db. what i would like would be to determine the value of "dest", so the php page will load only datas refered to the value of dest...and if u understood, i need to have this information sent by the button in my other MC, which contains this value in a textfield.

by the way here is the code used to create my buttons:

randomNumber = Math.random(100000);
loadVariablesNum("connected_flash.php?" +randomNumber , 0, "POST");
var $data = connected.split(",");
for (var $i in $data) {
_root.attachMovie("myButton","myButton" + $i,$i,{_x:416, _y:15*$i});
_root["myButton" + $i].texto.text = $data[$i];
trace ($dest[$i]);
}

thx for your help

View Replies !    View Related
Passing Values To A Movie
Is it possible to pass values to a movie clip as it loads.

I want to pass some text in to the movie and do some text effects on it.

Using flash 5

Thanks

View Replies !    View Related
Passing Backward A Movie
Hello.

I'm traying to run backward a movie. I write this in the last frame:

_root.gotoAndPlay(_currentframe-1);

and I hoped the playhead jump backward frames one after one. That doesn't occur.

Someone have an idea to accomplish this?.

Thanks Friends!.

View Replies !    View Related
Passing Variable From One Movie To Another
Hi,

I have a series of thumbnail image buttons. When clicked these should load a large version of the image. Rather than hold each of the larger images in individual swf files, I've put e.g. 10 large images in an swf, and hope to navigate to the correct place on the timeline according to a variable passed in by the thumbnail button.

The code I have on the thumbnail buttons is as follows:


Code:
on (release) {
loadMovie("images_home.swf?intImage=7",1);
}


The 'intImage' variable changes, depending on the thumbnail clicked.

The images_home file contains this code on the first frame:


Code:
switch (intImage) {
case(1):
gotoAndStop("1");
break;
case(2):
gotoAndStop("2");
break;
case(3):
gotoAndStop("3");
break;
case(4):
gotoAndStop("4");
break;
case(5):
gotoAndStop("5");
break;
case(6):
gotoAndStop("6");
break;
case(7):
gotoAndStop("7");
break;
}
stop();


I'm trying to navigate to frame label "7" when the intImage value is 7 etc etc. This isn't working though, can anyone see why?

View Replies !    View Related
Passing Variables Within A Movie
Hi,

I have a few questions regarding to the passing of variables in a flash movie.

Currently my flash movie calls a MYSQL server using PHP. I was wondering if the data returned from that PHP when stored (I use $userid in the group of frames) can be called later on in another group of frames (on the same layer in the same file).

If it isn't able to be called, how would i go about passing the variable from the frame with the variable to another frame which I need the variable for?

Another question is when MYSQL returns to PHP an array of results (representing all the rows from a column (lets say user_id's)), can we pass this entire array to the flash movie? If so, how is this done?

Lets assume the array of results in php is called $row = mysql_fetch_array(etc etc), am I able to use 'print "results = $row" to return it to flash?

Also if it is able to be done, how (in flash) can I call each of the elements (in C it's array[0] and so on)?

Help would be greatly appreciated

View Replies !    View Related
Passing Variables Within The Same Movie
Hi,

I have a few questions regarding to the passing of variables in a flash movie.

Currently my flash movie calls a MYSQL server using PHP. I was wondering if the data returned from that PHP when stored (I use $userid in the group of frames) can be called later on in another group of frames (on the same layer in the same file).

If it isn't able to be called, how would i go about passing the variable from the frame with the variable to another frame which I need the variable for?

Another question is when MYSQL returns to PHP an array of results (representing all the rows from a column (lets say user_id's)), can we pass this entire array to the flash movie? If so, how is this done?

Lets assume the array of results in php is called $row = mysql_fetch_array(etc etc), am I able to use 'print "results = $row" to return it to flash?

Also if it is able to be done, how (in flash) can I call each of the elements (in C it's array[0] and so on)?

Help would be greatly appreciated

View Replies !    View Related
Passing Variables From On Movie To Another
I have 6 text boxes in one movie that I need to send those variables to another movie. How would I do this? I am using flash 8.

Thanks in advance for any and all help!

View Replies !    View Related
[AS2]- Passing A Variable Into A Movie
What is the easiest/best way to send a variable into a movieclip?
example:


Code:
function dewEeet (aNumber, aString){
new_mc = _root.attachMovie("MC2", "MC2", 100);
new_mc._x = 225;
new_mc._y = 200;
trace("Master Vars = " +aNumber +"," +aString);
}

dewEeet(102, "FooText");
Then in the movieclip MC2 i have 2 dynamic text boxes- txtBox1 and txtBox2...


Code:
txtBox1.text = aNumber;
txtBox2.text = aString;
trace("MC2 Vars = " +aNumber +"," +aString
i can see MC2 on the stage, but my dynamic text boxes are "undefined"... meaning i am wrong somewhere.
any suggestions?

View Replies !    View Related
Passing Value To Movie Clip
Hi,

I have a carosel type user interface on the main timeline of my flash document. Each carosel item is an instance of the same movie clip but each obviously have their own onRelease functions. All i want to know is how i can pass a value from actionscript in my main timeline to a function in a seperate movie clip. Can anyone help me on this?

Damien

View Replies !    View Related
Passing 2 Variables To Movie Via ASP...
Alright....here goes.

I am passing two variables (buttonTitle and buttonLink) to my flash movie via query in the flash movie's EMBED and OBJECT tags on my ASP page.

So the query will return the 2 variables to the movie and I have a dynamic text box named "buttonText" that gets populated with the buttonText variable passed in.

The problem I have is that I can't figure out how to make the "link" variable attach to the button and actually work like it's supposed to!!

I know they are both getting into the movie properly, I just don't know how to get the link to work??

Any help is SOOOOOO greatly appreciated!

Thnx.

View Replies !    View Related
Passing A Value Into Flash Movie.
hi,

Can any body tell me how to pass a value into a flash movie using <Param name="username" value="praveen"> and retrive that in the flash movie. I need to disply the user logged in.

thanks in advance

View Replies !    View Related
Passing Varialbe To Another Movie
I have a main movie with an mc called content, into which another movie is loaded. Once this movie completes, another is loaded into content, then when that completes, another loads...

The first loaded in movie has a login page which passes the vars to php then to mysql. My problem is that I need to use the login data in the 3rd movie (without making the user login again) but this gets wiped out when the 2nd movie is loaded.

Is there a way I can pass the vars I need from the first movie to the 3rd one? Or should I put the login page in the main movie, so that the other 3 are only loaded when the login is successful? Would this affect access to vars?

Thanks

View Replies !    View Related
Passing A Variable To A Director Movie
Hi folks. I've got a flash file embedded within a director movie, but I'm having a few problems with sound synchronisation during playback on older machines. I'm wondering if it's possible to pass a variable from my flash timeline to the parent director movie to act as a cue point? Is this do-able? If so can anyone tell me what form the script should take? I've previously used a 'get url' command with a line of lingo in it (just to unload the flash file), but i'm not sure if this would do the trick in this case.

Thanks in advance.

View Replies !    View Related
Passing A Variable To A Movie Clip
I give, I give!!!1
I have a movie clip that contains a textbox. The textbox is a dynamic textbox with the variable named texbox.

I then use duplicateMovieClip to duplicate the move and my question is how can I change the variable "textbox" to anything like "M1"

This is on a line graph and I want the numbers to showup on the chart.

I would send the code but I just dumped it.

Thank you for any help

Marc

View Replies !    View Related
Passing Variables From Parent Movie
I have a parent movie in which I load sequentially a number of other movies.
On my parent movie I have a variable (language).
I want my child movies to "read" the value of that variable when loaded.
Can anyone help me do it?

Thanx...

xxx/X.

View Replies !    View Related
Passing Variables From One Flash Movie To Another.
I'm sorry if this question has been asked before - I need to send 5 variables set in one flash movie, to another flash movie that will be viewed after it. Could someone point me to a tutorial or start me in the right direction to get this done?

Thanks much!
adam
http://www.thebadlans.net

View Replies !    View Related
Passing A Variable Into A Movie Clip?
I have a movie that contains a movie clip. A variable has been passed to the movie and I need the movie clip to acknowledge that variable so it can run some logic. I have two other movies that don't use movie clips and they work fine.

Is there anything special I need to do?

View Replies !    View Related
Passing A Variable From A Movie Clip
Hey whats up? I cant seem to get a movie clip to pass a variable to a INPUT textfield on a different timeline.

Is this possible ?

Thanks

View Replies !    View Related
HELP With Passing Input Text To Another Movie.
Heres my problem, i havnt had anything to do with text fields yet and i cant find much on this so here we go.

I have a login for my site that when the member inputs there details it opens p an external movie for them to view.

What i want is for the new movie to display the name of the person who is logged in, ie, Welcome JOHN.

I am not using any cgi script or anything cos it doesnt need to be that secure so its just done through flash.
Also the login box is an external movie which loads then u enter your details which i want to pass to the new external movie.
Please can someone help cos i kknow this isnt very difficult.

View Replies !    View Related
HELP With Passing Input Text To Another Movie
Heres my problem, i havnt had anything to do with text fields yet and i cant find much on this so here we go.

I have a login for my site that when the member inputs there details it opens p an external movie for them to view.

What i want is for the new movie to display the name of the person who is logged in, ie, Welcome JOHN.

I am not using any cgi script or anything cos it doesnt need to be that secure so its just done through flash.
Also the login box is an external movie which loads then u enter your details which i want to pass to the new external movie.
Please can someone help cos i kknow this isnt very difficult.

View Replies !    View Related
Passing Variables Form One Movie To An Other
I have a Flash-movie with a variable. I want to load this variable into another movie. How can i do this in Flash 4?

View Replies !    View Related
Passing Variables Between Movie Clips
I have tried and tried and can't get it right. Could someone please show me some code on how I can pass a variable from one movie clip to another, or maybe call for the variable from another movie clip. Bascally I am have a movie clip with several stops on the timeline. I put an "if" statement on each of the stops checking to see if the variable "pause" is a 1 or 0. If pause = 1, then stop. Now I need to set the variable from a button, off the root, buried several movie clips deep.

If anyone can help me, I would greatly appreciate it.

Thanks

View Replies !    View Related
Passing Variables To Loaded Movie
I have Movie1 & Movie2 which contains a MC inside it buttons coded with:

on (release) {
_parent.loadMovie("Moviea.swf");
}

till the last button coded with:

on (release) {
_parent.loadMovie("Movied.swf");
}

so i want to pass a variable with this trigger as i want to put in the Movies from Movie a to Movie z a back button to go back to Movie1 or Movie2, depends on from where they loaded Movie1 or Movie2.

i wish you understand what i mean,
ask me if you didn't.

Thanks

View Replies !    View Related
Passing Parameteres Into A Flash Movie
I'm trying to pass parameters into a flash movie(a link in the movie), so that the link can be changed without editing it each time. I'm doing this so i can personalize the links, by adding information from a database that will pre-pop fields in a form once they click the link in the flash movie. Is this possible?? Any suggestions would help. Thnx

View Replies !    View Related
Passing Var Into Flash Movie Queston
Hello,

I have the need to pass a number of different varaibles into a flash movie located on a differnt frame. I have the code to pass one variable, which is java script:

function set_broker(test) {
//alert(test);
document.side.SetVariable("broker_name", test);
}

***it workds fine,but I can only pass on variable in with the above code. how can I make it where I pass 5 variables???


Thanks,

View Replies !    View Related
Passing Variables To A Loaded Movie
I'm loading a movie using loadMovie() method. How can I pass variables to it from the movie that is loading it?

Thanks.

View Replies !    View Related
Passing PHP Variables Into Flash Movie?
I created a mysql database which stores page content.
Then created a php page for a user to change that page content.

My next step is to get that page content from the database into a textarea of a Flash movie (page)

So I have a php page that reads the database and takes an array passing the data into a variable.

I need to pass the variable into my flash movie now and have the textarea display its string content.

Any help would be greatly appriciated.

Patrick

View Replies !    View Related
Passing Variable Value Between Two Movie Clips
Okay I'm pretty much at the end of my rope here, so I need some help. I've searched through over 6000 threads for the Flash MX board here on the site and finally gave up. So anyhow...

In the movieclip called Flik, instance name "wf":

Code:
onClipEvent (load) {
//bullet fire
_root.bullet._visible = false;
bulletCounter = 1;
//initial Flik mc
moveSpeed = 5;
this.attachMovie("walk_down", "wd", 1);
clipToDelete = "wd";
}
onClipEvent (enterFrame) {
//for Flik to walk
if (Key.isDown(97)) {
dPad = 1;
//walk down left
if (clipToDelete != "wdl") {
//test if Flik is already walking in this direction
removeMovieClip(clipToDelete);
//If not, remove the current mc
this.attachMovie("walk_downleft", "wdl", 0);
//attach the clip to walk in direction pressed
clipToDelete = "wdl";
//reset the varible clipToDelete for the next test
} else {
this._y += moveSpeed;
}
this._x -= moveSpeed;
wdl.nextFrame();
} else if (Key.isDown(98)) {
dPad = 2;
//walk down
if (clipToDelete != "wd") {
removeMovieClip(clipToDelete);
this.attachMovie("walk_down", "wd", 0);
clipToDelete = "wd";
} else {
this._y += moveSpeed;
}
wd.nextFrame();
} else if (Key.isDown(99)) {
dPad = 3;
... all the way to dPad=9 and then:
//for bullet fire
if (Key.isDown(Key.CONTROL)) {
bulletCounter++;
_root.bullet.duplicateMovieClip("bullet"+bulletCounter, bulletCounter);
_root["bullet"+bulletCounter]._visible = true;
if (bulletCounter>25) {
bulletCounter=1
}
}

note the dPad = 1, 2, and 3 in bold...

And in my movieclip called bulletfire, instance name "bullet":

Code:
onClipEvent (load) {
bulletSpeed = 35;
this._y = _root.wf._y;
this._x = _root.wf._x;
}
onClipEvent (enterFrame) {
Ref = _root.wf.dPad;
if (Ref=1) {
this._x -= bulletSpeed;
this._y += bulletSpeed;
} else if (Ref=2) {
this._y += bulletSpeed;
} else if (Ref=3) {
this._x += bulletSpeed;
this._y += bulletSpeed;
}
...


Ok, so here's what happens... I have eight different movie clips for a walk animation, capable of letting the character walk in eight different directions (1-4 & 6-9 on the Num Pad). What should happen is bullet calls the dPad variable in wf and depending on what number it is, increments the x & y of the bullet so that when you face left, you shoot left, face right, shoot right, etc.

If it isn't clear enough just ask and I'll try to be more clear... sorry if it is I've been trying to settle this problem for almost 7 hours now...

*Edit* I originally wanted to use the clipToDelete variable you see in the wf mc but since I was having problems I changed it. If it is possible to use the string for each direction, let me know because it would be one less variable and a lot less code.

View Replies !    View Related
Passing Vars Reloads Movie
I'm trying to pass a variable to a flash movie, like this
src="main.swf?link=1"
The only problem is that even if the main.swf movie has been loaded before, when I pass the variable it reloads it. It kind of thinks that it is a new movie.
Is this sypposed to happen?

Thanks in advance.

View Replies !    View Related
Passing Variables Between Movie Clips
ActionScript 3.0 question...

The answer should be pretty easy to find, but I'm kinda stumped. I'm creating an asteroids clone for a practice project, and I'm instantiating all the objects dynamically from the library. I need a way to tell one movie clip (the ship) to pass a couple of variables (x and y rotation) to another movie clip (the shot), so that the shot can know the rotation of the ship which is needed to calculate the shot direction. I was under the impression you could just do:

myClip.var1 = var2;

but that doesn't seem to work.

Thanks in advance for any help.

View Replies !    View Related
Passing Variable From Loaded Movie, Twice
How do I pass a variable say on frame 1 from a loaded swf into the main timeline, then change the variable once the loaded swf makes it to another specified frame?

View Replies !    View Related
Passing Commands To A Loaded Movie
I have a movie loaded on level 1. This movie have a button to jump to another movie that will replace it on level 1. However, I also need for the movie to be loaded in its place to go to a specific frame. How can I make it happen?

Thanx

View Replies !    View Related
Passing Parameters To Loaded Movie
HI ALL

I have loaded swf in my fla file using load movie but i need to pass a parameter to the loaded swf i have to pass parameter dataUrl=data.xml as parameter i tried to load the movie using

loadMovie("chart.swf?dataUrl=data.xml") but i got error.


Can any body help me to slove the above problem.

The above the swf worked fine when i loaded swf in html using object ,embed tag in html and i passed the parameters to the swf as

chart.swf?dataUrl=data.xml

Please help me slove te problem

Kiran

View Replies !    View Related
Passing Variables To A Loaded Movie
I have a navigation bar that I have loaded into level3 of my main movie. When the user clicks one of the navigation buttons they should be taken to a specific point on the timeline of a movie that I have loaded into level2 of my main movie. Currently it will only go to the specified frame if the button is pressed a second time.

Here is the action I have for the buttons...

on (release) {
frame = "af"; // this value is different for each button
unloadMovieNum (2);
loadMovieNum ("globes.swf", 2, "GET");
}

On the first frame of my level2 movie (globes.swf), I have the following action to check for the value of "frame" and then take the appropriate action

if (frame != "") {
gotoAndPlay(frame);
} else {
gotoAndPlay("rotate");
}

I am really puzzled on how to accomplish this.
Any help is greatly appreciated.

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