-
Fo Shizzle
Please Help w/ Simple Action
i have a newsletter.
i have a button with this code.
Code:
on(release){
message = "submitting...";
this.loadVariables("newsletter.php","post");
}
i have an mc w/ this:
Code:
onClipEvent(load) {
this.gotoAndStop(1);
}
on(rollOver) {
this.gotoAndPlay("s1")
}
on(rollOut) {
this.gotoAndPlay("s2");
}
on (release) {
message = "submitting...";
this.loadVariables("newsletter.php","post");
}
the button w/ the code works (submits email for newsletter subscription) but not the mc.
can someone please help and explain to me why?
thanks in advance
-
Fo Shizzle
i've also tried:
Code:
submit_news.onRelease = function(){
message = "Sending...";
this.loadVariables("newsletter.php","post");
};
submit_news.onRollOver = function() {
this.gotoAndPlay("s1")
};
submit_news.onRollOut = function() {
this.gotoAndPlay("s2")
};
this too does not work.
please help
-
lemon juice hurts your eyes
Could you post the .fla? I will have a look at it.
Florian Vanthuyne
WAR AGAINST SOLVED THREADS
mark yours as Resolved under Thread Tools!
-
Fo Shizzle
i do not have the fla file with me.
it is in school.
the scene is very very simple.
i have three layers:
layer 1: textbox (for subscribing to the newsletter)
layer 2: button which is comprised of this:
Code:
on(release){
message = "submitting...";
this.loadVariables("newsletter.php","post");
}
layer 3: mc w/ button action
on one i have a textbox
the button on layer 2 executes properly.
but the mc on layer (which is what i want to use for this purpose) doesn't work.
which is comprised of this:
Code:
onClipEvent(load) {
this.gotoAndStop(1);
}
on(rollOver) {
this.gotoAndPlay("s1")
}
on(rollOut) {
this.gotoAndPlay("s2");
}
on (release) {
message = "submitting...";
this.loadVariables("newsletter.php","post");
}
-
Hey Timmy!!!
Howdy,
With your problem your correct on the onCLipEvent but the others are only used on buttons. Meaning that they only work with button symbols. If you want to use the button type actions on a movie you should put them on the maintime. First make a new layer called actions. An then inside of it put this,
code: _root.onEnterFrame =function(){
mc name.onRollOver = function() {
mc name.gotoAndPlay("s1")
}
mc name.onRollOut = function() {
mc name.gotoAndPlay("s2");
}
mc name.onRelease = function() {
message = "submitting...";
this.loadVariables("newsletter.php","post");
}
}
-
On what Scope do the variable to be posted exist? "this.loadVariables" on your submit_news MC assumes that all the variables exist on it's scope like submit_news.var1 = "email", submit_news.var2 = "address" etc.
If the vars do not exist in the MovieClip Object, your code will appear to be broken, but what is happening is that you are not sending any data to the PHP script.
-
Fo Shizzle
sorry for the late reply.
i was able to get it top work by doing this:
Code:
on (release) {
message = "Sending...";
this._parent.loadVariables("newsletter.php","post");
}
i do appreciate all of your help.
thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|