"CLICK TO ACTIVATE THIS CONTROL" - This Is Driving Me Insane
Why is there a blue square and activation request appearing on my splash page flash swf?
FlashKit > Flash Help > Flash Newbies
Posted on: 10-22-2006, 09:41 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Click To Activate This Control.. WTF?
Whats this about?
Anything in flash now, i have to click once before i can use it?
Is this from software i've installed, or is this a new dumbass windows update thats just as fooking stupid as the "IE has blocked this popup because i can"
Sites with flash menus have become a pain in the arrse.
If it is a windows update, they should ask people what they fooking want before doing stuff like this!
If its just some software i've installed. im an idiot.
Cheers all.
Click To Activate And Use This Control ?
I have noticed this coming up on websites I have.
"Click to activate and use this control"
It's something to do with plug-ins 'Eolas' and microsoft but basically i want to know the easiest way around it.
help?
shaf
? Click To Activate And Use This Control ?
When I uploaded my web page which has a ".swf" file in it, the rollover effects in my Flash movie won't work.
Instead, a tool tip appears saying "Click to activate and use this control."
How do I get the .swf movie to load with all controls (objects with rollover affects) enabled from the start?
Thanks for your help.
Tony
www.tonytraveis.com
Click To Activate And Use This Control
hi flashkit,
can anyone tell me why when i mouseover on a flash movie it gives me this message tooltip:
click to activate and use this control
It never used to do this before but i was making some pages with javascript and this suddenly happened. I've scanned for a virus but i'm not infected.
Tks for your reply.
Intan
Click Here To Activate And Use This Control?
While using Internet Explorer (PC, version 6.0.2900.2180) on some computers, and hovering the mouse over any Flash element, I get a small balloon message next to the cursor that says:
"Click here to activate and use this control." On those same computers, it also takes two clicks to make the flash button or whatever, run. And, while the cursor is over the element, the element gets a thin highlighting border around it (even if hovering a non-link portion of the flash movie).
I also noticed that, while using other pc computers-also running the same version of I.E. and Windows XP-the message doesn't appear and only requires a single click to activate any button on that flash element.
I notice this on many, many other sites, so it's not my server. On some other sites, it doesn't happen.
This doesn't happen in Firefox or anything else. I haven't been able to test this on Macs.
Does anyone recognize this? The site I'm working on is:
http://www.xmanpuzzles.com.
Any help is appreciated.
Thanks.
Waizen
Click To Activate Control
Hi,
i placed my first ever swf within the PHP page and when i access to webpage via my browser, it asks me to click on the control to activate it.
basically this is disturbing as my buttons/links available in my flash animation are not active and this is the only way to activate them (basically to make the hand pointer mouse visible...if not, a standard mouse pointer is visible).
how can i do to avoid such issue ? i mean to avoid user to click on the flash, to make the flash animation react normaly.
thanks a lot,
A
Click To Activate Control
Why do I get a popup upon arriving at my page that says " Click to activate control". It doesn't allow the button that is designed with a rollover effect to work until I first click somewhee on the page. This is making me have to double click every button to get the action I am asking for from it to work.
I am using explorer version 6. However, when I use another users firefox brouser I do not see this message " Click to activate control", it works as I intended it to.
Can anybody tell me what I am doing wrong?
'Click To Activate And Use This Control'
I've only completed an 8 week evening introductory course to Flash so please forgive my ignorance.
When I import .swf files into my Website they are all showing the message 'Click to activate and use this control' even when there is no interactivity built into the file. How do I prevent this from happening?
Also the buttons all require two clicks to navigate to the hyperlink which some people are associating with the buttons not working - how do I resolve this problem?
Many thanks
Rockin Amoeba
Click To Activate And Use This Control
hi,
I have problem, when i run my .swf in browser i am getting one message that " Click to activate and use this control"...is there any solution to enable this message(alt tag)..
Click To Activate This Control
when i mouse over my movie in a browser a dashed box appears around it and a text box comes up saying click to activate this control. how do i stop this?
Click To Activate And Use This Control?
when i create a swf online people will have to click once to activate it, how do i disable it?
i believe it is not a browser setting because some other website i go to doesn't have this function, must be something with my settings.
can anyone teach me how to disable it?
thanks
Click To Activate And Use This Control
Hi,
When I create a Flash site and open it in a browser, I get first need to click the movie to activate it and be able to use it (the famous "click to activate and use this control"). However, I noticed that some (a lot?) Flash sites don't need to be activated. How can this be done?
Thnx in advance,
Grenouille
'click To Activate And Use This Control'
Hi...
Microsoft released an update to Explorer in February 2006 that causes a Flash movie embedded on a HTML page to show a box around it and a popup text that reads 'click to activate and use this control'.
I've looked at the tech notes from Microsoft and Adobe, and also downloaded the latest fixes / updates for Flash and Dreamweaver that are supposed to fix this, but I am still struggling to implement this on all the other websites.
Does anyone know a quick plain speaking fix that doesn't go around the swings and roundabouts, but just works?
Thanks in advance...
Click Here To Activate This Control?
Has anyone else noticed this? A few days ago I did a Windows update and ever since all flash embedded in html pages looks like this in Internet Explorer...
I now have to click the flash object to activate it, and until I do it has a wierd blurry line around it when I mouse over.
Anyone got a work around for this yet? It looks dreadful.
Click To Activate And Use This Control
Hi
Does anyone knows how to deactivate the new Internet Explorer's problem: the one that appears in the swf files viewed on Internet Explorer?:
Click to activate and use this control... For example:
http://www.fordvehicles.com
P.D. Just in case... you need to view it on Internet Explorer.
EASY FIX For Click To Activate This Control
There are three parts to fix:
1. An external JavaScript file
2. An onload Function
3. A document.write for those using a script to determine if the browser can play flash.
If you are using a browser/flash sniffer script, place this after the closing object tag:document.write('<script type="text/javascript" src="ieflshupdt.js"></script>');This is the JavaScript for the external script 'ieflshupdt.js' :function fixFlash() {
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}
}Place this in the body tag:onload="fixFlash();"This is by far the easiest and most painless of the fixes and works with any browser using the microsoft ie engine.
Click To Activate And Use This Control Message
Does anyone know why i keep getting this and how to get rid of it? it started when i upgraded from IE 6 to IE 7. Any help would be appreciated. i must add that i'm not a web developer and every help out there seems to be for web developing. I just want an overall universal fix.
Edited: 05/02/2007 at 10:38:10 AM by bamahusker1969
Click To Activate And Use This Control - Message In IE
GET THE FIX HERE
There is another explanation here, which also offers the downloads for the fix. It also contains some background information on the problem and politics regarding IE.
http://capitalhead.com/articles/clic...-kb912812.aspx
Flash Detect - Click To Activate And Use This Control
Ok Ive been scratching my head on this problem for a while, well its really not a problem I guess its just what method works best.
Ive been reading about how flash 8 has a better method of detecting flash versions and flash in general. I have downloaded the flash detection kit from adobe im not really happy with all the code you need to inject, so Ive been using a script from http://blog.deconcept.com/flashobject/ seems to do everything i need but I was just wondering what others are using, I view many high end flash websites from some very highend compaines but it seems that you still need to double click on the flash in order for it function, thanks to Microsoft!!! Just wondering why so many websites are still not removing this restriction in thier flash?
Click To Activate & Use This Control , Every Time A Window Is Opened
Every time I load a page with IE6 on which there is a flash movie , as I drag the mouse onto the movie , all the movie area behaves as a hit area button , even movies which have no button.
Then the following message comes up : Click to activate and to use this control ;
As nothing has been changed by my will it can only have been changed by itself ?!
How to solve this ?
anyone to help me out , thanks
This Is Driving Me Insane
I have a movie I am trying to do a preloader for but nothing is working..no matter what I do..nothing will play until everything is loaded.. I put a new scene in before my main scene and just typed a number..but that won't even show up until the entire movie is loaded...everything works fine once the movie is loaded... what are some possible reasons for the file doing this. Shouldn't scene 1 play and load before scene 2(I took out the preloader script just to check and same thing..the m,ovie doesn't start until everything is loaded) I need some suggestions before I pull out all of my hair
thanks,
Jeff
Driving Me Insane
Hello everyone...
I'm building a very long flash movie that jumps to different 'scenes' (really just frame numbers and labels along one timeline).
I want the entire movie to load, and then jump to a specific frame. I'm using this code on frame 1, my loading frame:
Quote:
fFrameLoaded (3992) {; gotoAndPlay("INTRO");}
'INTRO' is actually on frame 2611... miles away!
The thing is, if I preview this in HTML, FROM FLASH, the code works... But if I publish it online or run it from my desktop, it doesn't work!
I've tried labelling my frames differently, or using goto frame number rather than frame label... But to no avail.
You can peep my movie here:
http://www.mysteriousal.com/spookhouse/new_teaser.html
I've also uploaded the fla if anyones interested:
http://www.mysteriousal.com/spookhouse/new_teaser.fla
If anyone can shed some light on this problem I'd be very much in your debt...!
I'm using Flash 8, by the way.
Thanks...
Driving Me INSANE
I am REALLY losing my mind !!
I have duplicated movie clips so many times but this time it got to me ,HELP !!
I am trying to duplicate a movieclip that is one level above me (_parent)
and trying to create it also one level above me , OR should it be in the nested one i`m trying to do it from ?
Secondly the movieclip i`m duplucating is a COMPONENT and the default value for _enabled = true;
Now when i run this code in the nested clip , it sorta does duplicate it but , the trace gives me undefined for _enabled (which default should be true???)
HELP!!!
ActionScript Code:
trace("NUMBER BLUE" + _parent.no_blue_covers);
duplicateMovieClip(_parent.blue_cover, "blue_cover" + _parent.no_blue_covers, this.getNextHighestDepth());
trace("Enabled = " + _parent["blue_cover" + _parent.no_blue_covers]._enabled);
_parent.no_blue_covers++;
Telltarget Driving Me Insane
I'm simply trying to use a button in my main movie to telltarget a movie 2 subdirectories down to play frame 2.
Here's the code:
on (release) {
tellTarget ("sidebar.corpage") {
gotoAndPlay (2);
}
}
and here's the message from the output window:
Target not found: Target="sidebar.corpage" Base="_level0"
GetTimer Is Driving Me Insane
OK - Heres the Magic Dillema:
I jump to frame 10 w/ a stop function.
frame 10: On Mouseover jump to frame 20
Simple!! - I know -thats not my problem
if flash must wait for 10 seconds on frame 10 for the person to mouseover, then jump to frame 30.
thats it! I cannot figure out how to use the getimer() function or if I should be using something else.
For you gurus who want to answer this please be kind in your EXPLAINATION of the answer. I may not understand.
Thanx - thanx - Thanx,
Atreau
This Switch Is Driving Me Insane Please Help
I honestly can't figure why this won't work. Its been bugging me for a week and i think im going to cry lol
here is my code, assuming all instance names/symbols correctly named:
Please note: body is defined above as "blue" on load. The drag works fine cos i tested it with another event, it must be the damn switch!
---------
brush_mc.onPress = function () {
startDrag(this);
};
brush_mc.onRelease = function() {
stopDrag();
if (brush_mc.hitTest(car_mc)){
switch(body) {
case "blue":
body_mc.attachMovie("bodyYellow", "newBody");
body = "yellow";
break;
case "yellow":
body_mc.attachMovie("bodyRed", "newBody");
body = "red";
break;
case "red":
body_mc.attachMovie("bodyGreen", "newBody");
body = "green";
break;
case "green":
body_mc.attachMovie("bodyBlue", "newBody");
body = "blue";
}
}
};
-----
Any ideas? oh yeah and body_mc is located within car_mc. also this script is written on the main timeline. flash finds no errors. ive played about with names, _root. etc. please help me
Buttons Driving Me Insane
OK, I'm sure it's something simple.....
I have an animated menu 'button'
I have it as a movie clip but I want to control it like a button.
I'm sure this is done with actionscript, but I can't figure out the code (or at least the right syntax)
here's what I want:
idle state: (works fine as is, the MC sits on the 1st fram with a simple stop() command set inside it)
on rollover: (I want it to move past the stop command to fram 2 where it plays an opening animation)
on press: (don't worry about this for now, but if you could note where the code for the button action should be placed, I'd appreciate it)
on rollout: (I want it to go past the stop command set for the end of the rollover animation, similar to how rollover is done)
any help on this would be greatly appreciated
-RivenZ
CD Rom Problem Please Help As It Is Driving Me Insane
I am building a CDrom in Flash MX (macOSX)
It all works like a dream - BUT! the external .swfs that get loaded in, though they work, take about 30 secs to load in - this is due to the heavy weight size of them - some are about 90MB! These external movies have been put through Sorenson Squeeze and are about 15 mins in duration each - hence their file size.
Now liek I say it all works fine - but the load in time is because the CD has to spin up again, find the file and load in the file to the standalone player. That much I can work out.
IS there a way to load all these 4 .swfs into frame 1 ahead of the conent so they are kind of cached? but to have them not play
for example
frame 1 says
loadMovie("videos/welcome.swf", "_root.video1holder");
thats cool! but I then want it to stop straight away and not actually play until called for
if on the next frame 2 i put
tellTarget ("_root.video1holder") {
gotoAndStop(1);
}
Well this doesn't stop it from playing? - can a frame action not do a tell target command?
In an ideal world I want to load the following
loadMovie("videos/welcome.swf", "_root.video1holder");
loadMovie("videos/dream.swf", "_root.video2holder");
loadMovie("videos/attraction.swf", "_root.video3holder");
loadMovie("videos/buying.swf", "_root.video4holder");
and I want these .swfs that are loaded to not play or produce sound and to not even show themselves until called for by buttons later on in the file/timeline.
Please help as it is driving me insane!
I can send someone the fla if need be - I won't send you the external .swfs as they are too heavy weight.
My reason for trying to load them all in is that the CD wont have to spin up again and load it each time - it'll all be self contained. In advance you might say, well "add actions to the external swfs that you are loading in...but I can't as for some weird sorenson reason I can not re import them to flash and add actions to them such as a stop on frame 1 and shift every thing down a frame so it will start from frame 2
Any help would be so so so so so welcome
Thanks in advance
Julian
DuplicateMovieClip Is Driving Me Insane
sorry to bother you people about another duplicateMovieClip question. i have tried looking at other people's code, downloaded flas, but i cant see what i'm doing wrong.
i am making my first game in an attempt to get better at AS. it is a sidescrolling space shooter.
here is the code for the ship:
if (Key.isDown(Key.SPACE)) {
_root.shot.duplicateMovieClip("bullet"+i, i);
setProperty("bullet"+i, _x, _root.ship._x);
setProperty("bullet"+i, _y, _root.ship._y);
i++
}
this is inside a onClipEvent handler. shot is the instance name of the bullet movie clip.
thanks for your help
LocalToGlobal, DRIVING ME INSANE
This is in a movie clip:
PHP Code:
onClipEvent (enterFrame) {
_x += (_parent._xmouse-_x)/(10);
var point = new Object();
point.x = _x;
point.y = _y;
localToGlobal(point);
//trace("frame current x,y: "+_x+", "+_y);
//trace("frame toGlobal x,y: "+point.x+", "+point.y);
}
Then in root frame I've got another mc:
PHP Code:
onClipEvent (mouseDown) {
_parent.attachMovie("explode", "explode", 1);
_parent.explode._x = _root.plane.dap.point.x;
trace(_root.plane.dap.point.x);
//trace(_parent.explode._x-_root.plane.dap._x);
_parent.explode._y = 352;
}
My code is messy, but it still doesn't work! Why don't they just let you do _x = localToGlobal(mc._x)?
Thanks in advance,
Danny
'this' Oddity Which Is Driving Me Insane
i made the following code to dynamically retrieve info from a php script which got the info from mysql. (i have made some changes to test it and figure out what my problem with it was)
Code:
var tunesArray:Array = new Array();
function getDetails() {
tunes_box.tune_box_0.name_txt.text = tunesArray[0][0];
tunes_box.tune_box_0.format_txt.text = tunesArray[0][1];
tunes_box.tune_box_0.comment_txt.text = tunesArray[0][2];
}
function doAfterLoad() {
if (this.numRows>0) {
for (i=0; i<this.numRows; i++) {
tunesArray.splice(i, 0, [this["tunename"+i], this["tuneformat"+i], this["tunecomment"+i]]);
}
}
getDetails();
}
var tunesLoadVars:LoadVars = new LoadVars();
tunesLoadVars.onLoad = doAfterLoad;
tunesLoadVars.load("php/tunes.php");
this code worked fine in a movie of its own. It gets info from a php script which gets it from mysql and then displays the info in a text box ( i removed the dynamic stuff in 'getDetails' to test this script after i found it didn't work anymore).
to cut a long story short, after a lot of frustration i figured out that if i changed the two instances where it says 'this.numRows' to a variable which i created previously it worked fine (e.g. i created 'rows = 4;' and then used 'rows' in place of 'this.numRows') but only if i also changed the input data from the 'splice'. i changed the first part of input data from the splice from 'this["tunename"+i]' to ' "funky" '. if i used 'this.numRows' then funky didn't show up in the 1st text box, but if i used the var 'rows' which i created, then funky did show up in the 1st text box. in neither situation did the other 2 pieces of data show up in the text box.
Therefore i think the problem is with the use of 'this' in the script.
In the original movie when i made this code to test it, the actionscript was on the main timeline in a layer called 'actions'. In the new movie where i am trying to use the code, it is also in a layer called 'actions' on the main timeline.
I can't figure out why 'this' suddenly stops working even though all of the conditions are the same. I tried '_root' and also just removed the first part altogether to show 'numRows' or '["tunename"+i]' in the splice but they didn't work.
As the code shows, 'numRows' is stored in a loadVars variable. I have tried different ways of representing it that way, 'tunesLoadVars.numRows' and 'tunesLoadVars[numRows]' but nothing works.
can anyone explain this oddity to me? it might be really simple but i am about to start going insane trying to figure this out. can i just use the variable from the loadVars object instead of using 'this'?
cheers
[F8] LoadMovie ... Driving Me Insane
hello im trying to load my thumbnails into a movie clip called holder and then into a dynamically created mc called container 1/2/3/etc using the following method. it creates the mc fine but i don't really understand the movieclip prototype function to load the jpeg into it. could someone point me to where im going wrong?... im really really really scratching my head with this
i would really appreciate any help.
Charlie
Code:
function LoadThumbs() {
for (i=0; i<total; i++) {
_root.Holder.createEmptyMovieClip("container"+i, i);
test = "container"+i;
trace("container"+i);
//Problem Here :)
MovieClip.prototype.Holder.test = function() {
this.loadMovie(thumb[i]);
_level0.onEnterFrame = function() {
var total = Math.round(test.getBytesTotal()/1024);
var loaded = Math.round(test.getBytesLoaded()/1024);
if (total != 0 && loaded>=total) {
// Here im going to get the width and height of the loaded picture so i can space them out
var w = test._width+space;
var h = test._height+space;
delete this.onEnterFrame;
}
};
};
}
}
my xml load just in case
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
//declare image and description as array
image = [];
description = [];
thumb = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
//image[i] will store value from the inner tag <image>XXXX</image>
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
//description[i] will store value from the inner tag <caption>XXXX</caption>
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
//thumb[i] will store value from the inner tag <caption>XXXX</caption>
thumb[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
firstImage();
LoadThumbs();
} else {
content.text = "file not loaded!";
}
}
xmlAlbum = new XML();
xmlAlbum.ignoreWhite = true;
xmlAlbum.onLoad = loadXML;
xmlAlbum.load("album.xml");
my old practice code that loads pics in
i had been using this but for what i wan to achieve in the end its not really suitable i.e. preload and space images. (i think?) i couldnt work out to get the width and height so this is why im trying another method
Code:
for (i=0; i<total; i++) {
//trace (thumb[i]);
_root.Spacer += 160;
//previous image
p=i;
p--;
trace ("Current Image = "+ thumb[i] +" | "+"Previous image = "+thumb[p]);
_root.Holder.createEmptyMovieClip("container"+i, i);
eval("_root.Holder.container"+i)._y = 0;
eval("_root.Holder.container"+i)._x = _root.Spacer;
eval("_root.Holder.container"+i).loadMovie(thumb[i]);
trace ("Previous image width= " + eval("_root.Holder.container"+p)._width);
}
Actionscript Is Driving Me Insane
I'm not entirely new to Flash, but it's been awhile since I've used it.
Anyhow, I'm making a short flash movie with bonuses and previews and such, so naturally, I had to include a menu of some sort, so what I've done is include a movie clip with the buttons inside of them. I'm trying to get some of the buttons like "Play Movie" to switch the scene in the main timeline so that it will play the movie, but it doesn't work. I've already tried using _root, _level0 and _parent, frame labels, and even tellTarget (_root), etc. but they all don't work.
The code in the button looks something like this:
on(Press) {
_root.gotoandStop("movie");
}
I'm using Actionscript 2.0 on Flash MX Professional 2004.
I've only attached part of the entire movie to save space. I figured if it works here it should work in the entire thing as well.
[F8] SetInterval Is Driving Me Insane
Allright, Im certain I am doing just ONE thing wrong here thats making flash crash everytime I test this and not making setInterval work properly, if anyone could point it out it would be great. I need it for a website for a client and I've been racking my brains out trying to figure out what I am doing incorrectly. Everything works out ok except when I try to incorporate setInterval into my code, then I run into issues again.
Code:
on (rollOver) {
var myInt:Number;
var playIt:Number;
var i:Number = 45;
var i = 45;
myInt = setInterval(playIt, 3);
function playIt() {
while (i>0) {
var scroller = scroller+1;
gotoAndStop(scroller);
var i = i-1;
}
}
}
Anyway, thanks in advance for the help. Im still new to actionscript so I am trying my best at this.
FlashVars Driving Me INSANE
Okay...
Here's the html
Code:
<param name=FlashVars value="var1=testLoad">
<embed src="/images/content.swf" FlashVars="var1=testLoad" ...
Here's the AS
[code]
trace(var1);
var var1:String;
_root.imagePath = "/images/";
loadMovie(imagePath + var1 + ".jpg", "_root.loadedClip");
output = imagePath + var1+".jpg";
FlashVars Driving Me INSANE
Okay...
Here's the html
Code:
<param name=FlashVars value="var1=testLoad">
<embed src="/images/content.swf" FlashVars="var1=testLoad" ...
Here's the AS
Code:
trace(var1);
var var1:String;
_root.imagePath = "/images/";
loadMovie(imagePath + var1 + ".jpg", "_root.loadedClip");
output = imagePath + var1+".jpg";
I've looked at a TON of FlashVars pages... what am I doing wrong?!?!?!?!
I'm dying, I tell ya... just dyin'. Help me, puuulease!
Thanks.
ARGH Bug Is Driving Me Insane
Right, I have code that works in the developing/authoring mode, but dies when I just open the swf in windows (if you get me)
my Code:
ActionScript Code:
// I have an array like this:
myMP3s = new Array("Glitches.mp3","Bass.mp3","Percussion.mp3");
//
//
//
// Now Our MP3 Loader;
M = 0;
function nextSound() {
Notes += "Attempting to load: "+myMP3s[M]+"
";
mySound = _root["myMusic"+M]=new Sound();
mySound.setVolume(5);
//
mySound.onLoad = function(success:Boolean) {
if (success) {
// Now Load the Next:
if (M<(myMP3s.length-1)) {
Notes += "Successfully loaded: "+myMP3s[M]+"
";
M++;
nextSound();
} else {
// All done:
play();
// Cleanup:
delete T;
delete M;
delete mySound;
}
} else {
Notes += "There was a problem Loading: "+myMP3s[M]+"
";
}
};
//
mySound.loadSound(myMP3s[M], false);
}
nextSound();
Problem is, in dev mode, it loads them all, tideis up, then onto the next frame...
BUT opened as a swf, it dies on the last mp3...
if someone could paste that code into a fla file and try it (obviously you will need some mp3's loose next to it) and see if its my build or my player or what, I'm going crackers here!
Oh, you need to add a dynamic text box with a varialbe of 'Notes' to see the shizzle
PS I have Flash 8 player installed, but right click says "About Flash Player 7", so not sure if this is my problem...
[MX] Flash Poll Driving Me Insane
Hi all...I already found another discussion in this forum about this same flash poll tutorial but so far I dont know if the guy who started it came to a solution in the end...so I'm posting my case...maybe someone can help to to work this out...
I downloaded a flash poll tutorial from this URL...
http://www.actionscript.org/resource...SQL/Page1.html
the tutorial author is unavailable for any kind of support...but his code was pretty messed up...so far I advanced to the point where I can finally connect to the mysql database but now I can't get the results of the vote displayed in my swf movie....
The fla has 2 keyframe one named "choose" and the other one named "results"
this is the actionscript code I got so far for the 2 keyframes (it is changed from the original version since that didn't worked at all)
on the "choose" keyframe:
Code:
stop();
submit_btn.enabled = false;
var loadVars_in:LoadVars = new LoadVars();
var loadVars_out:LoadVars = new LoadVars();
loadVars_in.onLoad = function(success) {
if (success) {
//If the values are in goto results
gotoAndStop("result");
} else {
//notify of failure
}
};
// Does the user wants to vote?
listenerObject = new Object();
listenerObject.click = function(eventObject) {
submit_btn.enabled = true;
};
radioGroup.addEventListener("click", listenerObject);
//Vote
submit_btn.onRelease = function() {
var selectedNum:Number = radioGroup.selectedData;
loadVars_out.choice = selectedNum;
loadVars_out.sendAndLoad("http://www.napcon-communications.com/load_var/vote2.php",loadVars_in,"POST");
};
and on the "results" keyframe:
Code:
//How many votes in total?
var totalVotes:Number = Number(loadVars_in.totalVotes);
var end:String;
for(i=1;i<=4;i++){
vote = loadVars_in["vote" + i + "total"]
percent = Math.round(( vote / totalVotes) * 100);
if(votes==1){
end = "Vote";
} else {
end = "Votes";
}
_root["graph"+i+"_mc"].bar_mc._xscale = percent;
_root["graph"+i+"_mc"].procent.text = percent + " % - " + vote + end;
}
the vote.php file has the following code:
Code:
<?
$choice =$_POST['choice'];
$user="xxxxxxx";
$password="xxxxxxx";
$database="xxxxxxx";
$server="xxxxxxx";
$table="votesystem";
mysql_connect($server,$user,$password);
@mysql_select_db($database) or die( "Unable to connect to database");
// what choice did the user choose in flash?
if($choice == 1){
$query="UPDATE votesystem SET vote1=vote1+1";
}
if($choice == 2){
$query="UPDATE votesystem SET vote2=vote2+1";
}
if($choice == 3){
$query="UPDATE votesystem SET vote3=vote3+1";
}
if($choice == 4){
$query="UPDATE votesystem SET vote4=vote4+1";
}
mysql_query($query);
//Get values from the database
$query="SELECT * FROM $table";
$result=mysql_query($query);
mysql_close();
//What are the values from the database?
$vote1_out=mysql_result($result,0,"vote1");
$vote2_out=mysql_result($result,0,"vote2");
$vote3_out=mysql_result($result,0,"vote3");
$vote4_out=mysql_result($result,0,"vote4");
//Votes in total
$total=$vote1_out+$vote2_out+$vote3_out+$vote4_out;
//Info to send back to flash:
$values="&totalVotes=$total&vote1total=$vote1_out&vote2total=$vote2_out&vote3total=$vote3_out&vote4total=$vote4_out";
echo "$values";
?>
a friend was suggesting me to go through ALL the variables and verify what variable type each one is supposed to be: string or number
let me know if you can help me out...
Stupid Question That Is Driving Me Insane.
Driving me insane because i should know it and do not under stand want i am doing wrong...
On frame 249 i want the "theme/background" music to stop due to an explosion in the short flash movie and i can't friggin remember how to stop the sound in the one layer. I havn't done flash for a while and i can't remember how.... HELP!!!
Loadvars From A Textfile Driving Me Insane
hi there,
i am trying to load vars from a text file into a load vars object.
var kitchentext = new LoadVars();
kitchentext.load('moccastext.txt');
Once in the object, i thought i could reference them like so
kitchentext.name
kitchentext.style
but i am having trouble doing this.
i have a textbox called displytext.
_root.displaytext.text = kitchentext.name;
doesnt work
any ideas, its driving me crazy!!
jamo
Stupid Question That Is Driving Me Insane.
Driving me insane because i should know it and do not under stand want i am doing wrong...
On frame 249 i want the "theme/background" music to stop due to an explosion in the short flash movie and i can't friggin remember how to stop the sound in the one layer. I havn't done flash for a while and i can't remember how.... HELP!!!
Loadvars From A Textfile Driving Me Insane
hi there,
i am trying to load vars from a text file into a load vars object.
var kitchentext = new LoadVars();
kitchentext.load('moccastext.txt');
Once in the object, i thought i could reference them like so
kitchentext.name
kitchentext.style
but i am having trouble doing this.
i have a textbox called displytext.
_root.displaytext.text = kitchentext.name;
doesnt work
any ideas, its driving me crazy!!
jamo
Where Is The Sound Coming From? Driving Me Insane
Okay here's the problem.
I have a flash file i'm working on that was developed by a 3rd party. I'm customizing it.
In the flash there are navigational links, however these links are individual movie symbols instead of button symbols.
Upon mouse roll over, the navigational links animate and play a sound. It also plays a sound when clicked.
I found the action script that causes the animation but for the life of me I can not find out how the sound plays. Both the sound when you rollover and the sound when you click it.
I checked the movie properties and actionscript, and it only shows how the animation works.. nothing relating to sound.
How can i find out the answer, it's driving me insane!!!!! lol ahhhhh
Thank you in advance for your replies.
|