77 Forum Posts by "edus60"
Hi, I have a function inside a set of dynamically created movieclips. 'i', being the index for each new instance of mc. The problem is I'm not sure how to call that function.
I have a loop, but this failed to work but didn't throw any errors,
_root.mc[i].addColour("some value each movieclip will have");
Any ideas?
ah fixed it to fill the blanks. Thanks again.
Add an else {
// get the hexadecimal string (must be 6 chars length)
// so add the missing chars if needed
$hex = "ffffff";
while(strlen($hex) < 6){
$hex = "0" . $hex;
}
// convert value from HEX to RGB
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
$b = hexdec(substr($hex, 4, 2));
// allocate the new color
// N.B. teorically if a color was already allocated
// we dont need to allocate another time
// but this is only an example
$test = imagecolorallocate($img, $r, $g, $b);
// and paste that color into the image
// at the correct position
}
Thank you for the reponse.
Inside the php;
// now fill the image with blank color
// do you remember i wont pass the 0xFFFFFF pixels
// from flash?
imagefill($img, 0, 0, 0xffffff);
I assume this would indeed fix that very issue, but it doesn't.
Hi there,
I'm having certain issues with this tutorial.
http://www.sephiroth.it/tutorials/fl...e n/page002.php
It works for the most part, the image is correctly exported. However the background gets messed up.
The exported image looks like;
http://yourimg.in/i/mzn34c5j.jpg
The original is;
http://yourimg.in/i/tf3ixg5w.jpg
PHP has enough resources, 64MB max post and max_excution_time is set to 210.
I'd be grateful if someone could help / advise to what might be causing this.
Well I got my red knight to level 13, turned on my xbox today and all my saves have be lost quite annoying considering I've go to go back and do it all again, then fear losing all my game saves. I wish more work had been done on testing. The game itself is great, but there are clearly lots of issues that need to be ironed out probably should have been before its release.
Hey there,
I'm trying to add an image button onto a jpanel, the button shows up just the image doesn't which leads me to believe it cant find the image;
ImageIcon cpp = new ImageIcon("icon.gif");
JButton button = new JButton(cpp);
p.add(button);
The icon image is located in the same folder as the java and the class files so I'm abit clueless at the moment, and any guidence would be appreciated.
Thanks everyone who posted, got it working.
though I'm now having an issue with reading in a set of strings from a file. There are 10 strings in a file which are seperate by a space.
example example example
I'm using the following code
for(i=0;i<10; i++)
fscanf(in_file,"%s ",names[i]);
but its only reading in the last string into every element of the array. Any ideas?
ya I already have string.h included sorry for leaving that out.
My fault, it is using j, pasted an old version here by mistake. It just prints out 10 of the last string entered.
also sorry about that, the last line should be
printf("%s\n", names[k]);
Hey there, perhaps you guys can help me. Basically I'm getting a user to enter a set of names, then outputting them. The problem is when it loops out the names it only shows the last name entered anyone any idea why?
Please go easy on me, I'm very new to C.
int main(){
char *peoplesnames[10]; //using a ragged array
enternames(peoplesnames);
return 0;
}
void enternames(char *names[]){
int i,j;
for(i=0; i<10; i++){
printf("Please enter a name (%d/10 Remaining): ",j+i);
scanf("%s", names[i]);
printf("\nLast name entered was: %s", names[i]);
}
//all names entered
for(j=0; j<10; j++){
printf("%s\n", placenames[k],k);
}
}
if(empty(myt))
How do I check it, does it return a boolean?, my2 in a 2d array, when I run it I get undefined reference to empty.
Thanks again for any help.
Is there a method or something I can call in C to see if an array in empty?
hi
I have two variables, both are strings, str1, and str2, how would I go about linking them together to create a new variable i.e str3
thanks for any help
hi,
is there anyway to check an images height and width as its being uploaded as part of some validation.? i tried using getimagesize but I got alot of errors saying it doesnt exist,
any ideas?
Is there and API or method in java to convert a 24 hour two digit time value into a 12 hour value
ie./
24 hour value
15
3
//3 o clock etc?
- Thanks for any help.
Hello there,
I was wondering if anyone could help me.
I have a folder with test.php in, is there anyway to place a htaccess file in this folder to only allow access to this folder / script via this domain its currently hosted on, and restricted access from any other domain?
Hi I've asked this before but I got no reply is there anyway to globally clear all timers?
Hello I have a text field with some text in, is there any actionscript out there so when the text field is click on the text disappears, I was wondering if there is a Onclick event for such a task.
Is there anyway to globally clear all timers?
var rg = Math.ceil(Math.random()*1000);
loadVariables("variables.php&="+rg, "GET");
I'm trying to stop caching by adding a random number to every request but I keep getting errors so I guess my placements off of where I've stuff the variable any ideas?
Hello there, I have a movie clip called, test_mc inside which is another movie clip called, char_mc
How would I go about making char_mc not visable via actionscript? {I'm placing the actionscript outside of the movieclips}
I've tried;
_root.char_mc._visible = false;
test_mc.char_mc._visible = false;
neither worked, any ideas?
Thanks, I've already seen that is there anything small scale which I can port into my own code?
I've wrote a flash viewer with javascript, doc writes out the code needed to view the swf, I thought this might cure the dotted / active x problem in ie. Is there any simple addon I can add to my code, I know there are other flash writers out there, but the flash viewer I wrote caters for what I need, I just need a fix for the problem in ie.
I've got the following
boom = new Sound(this);
boom.attachSound("exp");
boom.start();
Is there any easy way to change the volume of only this sound with actionscript so I can make it quiter / louder?
Hello is there anyway to call a function in javascript to make a form element read only or disabled? if so how would it be done?
- Many thanks for any help.
So this should be timeit=setTimeout("showalert("+ prev +");",2000);
Prev is called on a onchange event when I type in a text box i.e
<input type="text" onchange="test('example');">
just it keep's saying its undefined on my alert so I assume my quotes are wrong on this line
So this should be timeit=setTimeout("showalert("+ prev +");",2000);
var timeit;
function test(prev)
{
timeit=setTimeout("showprev("+ prev +");",2000);
}
function showalert(prev){
clearTimeout(timeit);
alert(prev);
}
I keep getting undefined, when trying to pass the prev variable to showalert so I assume its something wrong on this line timeit=setTimeout("showprev("+ prev +");",2000); is it my quotes?
Hi
Is there any simple way with PHP I can show the lastest file added to my directory called work, and display its filesize?
function test () {
//blah code to run
var timego = setTimeout('test()', 4*1000);
}
function stoptest ()
{
clearTimeout(timego);
}
Is there anyway to stop a timer by calling it from another function the above doesnt seem to work.

