Jump to content

Obi1-Cannabis

Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by Obi1-Cannabis

  1. in that case... Happy New Year!!!stay cool
  2. i found the problem with my code... i was using _root, so it gave me problems, all i needed was to assign specific objects to it to work.i'm going to try your loader, tough, just to see how it really works.big up!
  3. see, scale is my problem. yes i scaled it successfuly (when i play it outside the other file) but when i import it or load it, the scale doesn't work. i didn't used the loader, though... i used the MovieClipLoader that you reminded me when you first talked about loader...tell me something about that loader, if i want to use it in only in frame 100 for example and it's for use inside an movieclip and not in the root, how can i acomplish that?
  4. huf.. i've finally made it now i have another huge problem. when i call this .swf that i created inside another .fla, the properties that i've been working on, don't work, but if i open the swf alone it's perfect...man... i'm going crazy with this...
  5. that seems fine but _width and _height properties doesn't seem to work with the Loader, how am i suposed to set this?
  6. heya smiles!if by loader you mean a MovieClipLoader, i tryed your idea right now and it does load the images, but it doesn't enter the onLoadComplete nor onLoadInit... i'am breaking myu head here...a=0;vazio = false;xx = 139;while(!vazio){ if(foto[a] != null){ b=5-a; vazio = false; this.img = "img"+a; var loadlistner:Object = new Object; loadlistner.onLoadComplete = function(){ trace("algo aconteceu"); } loadlistner.onLoadInit = function(){ trace("antes ou depois?"); } var mcLoader:MovieClipLoader = new MovieClipLoader();mcLoader.addListener(loadlistener);this[val].createEmptyMovieClip (this.img, b);mcLoader.loadClip("http://cgseguros/imagem.php?id="+foto[a], this[val][img]); xx+= 101;a++;}else{vazio = true;}}
  7. hey!it's not that i don't want to use _xscale or _height ... but _xscale is not what i need because it works in percentage and i want fixed values, and since i have an image inside the movieclip if i try to use _height or _width it simply doesn't show up... is there any other way to resize a movieclip?please... i've been looking for this and i can't seem to find it...big up everyone!
  8. Nevermind it, i figured it out:i=0;while(i<10){this.val = "mc"+i;this.createEmptyMovieClip(this.val, this.getNextHighestDepth());this[val].createTextField("data_txt", 8, 1, 20, 140, 20);this[val].data_txt.text=data_n;i++; what i needed was something similar to this, of course data_n also gets changed inside the while.
  9. i'am trying to make a news engine using mysql, php, xml, flash... until the flash part everything is ok, but now i have a problem.i'am using a for that gets the information from each new of the xml and it's suposed to creat a new textfield for each one also, but i can't figure out how to make this last one happen i've tryied something like: cont += "<font size='12' color='#006600'><b>"+titulo+"</b> -"+date+"</font><br><b>"+bdesc+"</b><br>"+desc+"<br><br>";this.createTextField("txt"+[i], 999, 20, txt[i-1]+20, 300, 200);txt[i].html=true;txt[i].htmlText=cont; but it doesn't work... can anyone help me with this???
  10. didn't get it... the idea is not return two values...i made it work adding an extra field with the value of zero and now its working ok... but still i would like to know why is array_rand ignoring the last field, wasn't it suposed to return a random field of the intire array?
  11. Obi1-Cannabis

    array_rand

    i have an four fields array: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) . and i'm trying to get arandom value from this array using $key = array_rand($arr);and it is working but the last value, however, is allways ignored. in this case the value 4 of field 3 is never selected but if i insert a new field 4 with a value 5. the field 3 works but not the field 4... why is this happenig?
  12. is it possible to have a object property where the name of the property contais a variable?i don't know if i waas explicit i'll show some code to see if you get the idea: while($image==null){$num = rand(1,6);$image=$row->foto($num);} or something that makes this possible...
  13. the difference is that 'elseif' is faster because the parser considers that you're still inside the same 'if' block, only with another condition, while using 'else if' the parser will have to think if that 'if' is still inside the other one or if it's a new one inside the 'else'. Or so i was told...
  14. i guess that was a stupid idea, because it still wouldn't respond if server was downso it woulndt refresh.Solved it using: <body onload="setTimeout('location.reload(true)',25000)"> i think that's fine...
  15. it doesn't refresh if i put it into a <div>, though it refreshes when i give de id='ref' to the <body> ... but the content simply desapears instead of randomise it again...see, i had this working using just the meta tag with no ajax in this, but this specific page of this site is to be used also as some kind of presentation that's allways working on a shop's show window... and so if something happened (like server going down or something) the refresh would simply stop working and this stops working until someone refreshes it manualy, so the idea is to use ajax because script keeps working...but i'm not even sure if the setTimeout() works as i'm thinking.
  16. nevermind, the problem wasn't where i was looking for it. but now i have a new problem and this is bigger(i think), what i'm trying to do is using a setTimeout() that every x seconds uses ajax to refresh my page. and i thought it might work using the tag i was asking about before and in my php file i just put <? echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL="my.php\">";?> you think it's possible and i'am doing something wrong or it's just not possible?sorry for the previous post and thanks in advance.
  17. i have a <div id="ref"> and am trying to do document.getElementById("ref").innerHTML=xmlHttp.responseText, witch is in my .js file, i recieve an error message sayin: and i can't find out what seems to be the problem .
  18. yes i guess you were correct, the problem was my server configuration, to think i almost hit my head against the table...thanks
  19. i got it to work, the only problem now is that it returns all the php tags such as 'echo' and so on... in the example i gave before its returning inside the job field...this isn't suposed to happen right? so what can be wrong?
  20. There isn't any information on how to use classes on w3schools PHP tutorials and i think thats an essenssial part of this language because it's very helpfull when you have too many files and you want to alter something that works equal for all of them. And also because classes can be used in more than one project that have similar funcionalities instead of developing it all again.Also you could include something, even if just some references to some pratical libraries like ADOdb, Smarty,...just my thoughts
  21. i'am trying just a simple test to see how to work with AJAXthis is my code:HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="login.js"></script> </head><body><table width='250'> <tr><td align='right'> <fieldset> <legend> Detect </legend> <form action='post'> <p> NAME: <input type='text' name='ident' id='ident' onblur="checkid()"/> </p> <p> JOB: <input type='text' name='pass' id='pass'/> </p> </form> </fieldset> </td></tr></table></body></html> JScript var url = "getPass?id="; // The server-side scriptfunction handleHttpResponse() { if (http.readyState == 4) { document.getElementById('pass').value = results; }}function checkid(){ var id = document.getElementById("ident").value; http.open("GET", url + escape(id), true); http.onreadystatechange = handleHttpResponse; http.send(null);}function getHTTPObject() { var xmlhttp; @cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp;}var http = getHTTPObject(); PHP <?php echo "Painter"; ?> but it gives an error on page saying i have an invalid character on line 33. i don't get it.
  22. check this link http://livedocs.macromedia.com/labs/as3pre...e=00000169.html hope it's helpfull
×
×
  • Create New...