Jump to content

Obi1-Cannabis

Members
  • Posts

    146
  • Joined

  • Last visited

Posts posted by Obi1-Cannabis

  1. you scale it successful ?
    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? :)
  2. 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... :)

  3. this.createClassObject(mx.controls.Loader, "my_loader", 1);my_loader.contentPath = "http://.....";

    ...The Loader with specify width and height will scale your movie clip or image suitably !!!

    that seems fine but _width and _height properties doesn't seem to work with the Loader, how am i suposed to set this?
  4. My advise is using loader to load your movie clip, using CreateEmptyMovieClip() usually gets some error about size, position ...The loader will help you better if you notice the background of your movie clip, it should be the same with the background that the loader is put on !!!
    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;}}

  5. 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!

  6. I 'm still confused with your post, could you be more clearly :)
    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.

  7. 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???

  8. Thats depends on loginc of array_rand()instead of that you can make ur own user define function..or array_rand($arr,2) so U'll get probably that..
    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?
  9. 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?

  10. 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...

  11. I have a question that start bugging me, maybe it's a stupid question but hey! I'll survive :) What is the difference between "elseif" and "else if"?To me it does the same thing but I'm sure there is a difference between both of them. In few book of php they write "else if" and some other book (and in w3schools) they write "elseif"!Is one is newer or deprecated?What is the best one to stick with it?
    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... :)
  12. 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.

  13. 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.

  14. 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:

    Error:'document.getElemtById(...)' is null or not an object.
    and i can't find out what seems to be the problem :) .
  15. Does the page render correctly when you type in the URL into your address bar rather than accessing it using AJAX? Try visiting "getPass?id=someid", if it still shows the PHP code, then you don't seem to have your server configured correctly to handle PHP without the .php extension.
    yes i guess you were correct, the problem was my server configuration, to think i almost hit my head against the table...thanks
  16. 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

    <?php echo "Painter"; ?>
    inside the job field...this isn't suposed to happen right? so what can be wrong?
  17. 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

  18. 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.

  19. :) Only the flash logo came up???
    The ActionScript to print a basic page through Flash Player requires four major statements in sequence: new PrintJob()--Creates a new print job instance of the name you specify. PrintJob.start()--Initiates the printing process for the operating system, invoking the print dialog box for the user, and populates the read-only properties of the print job. PrintJob.addPage()--Contains the details about the print job contents, including the Sprite object (and any children it contains), the size of the print area, and whether the printer should print the image as a vector or bitmap. You can use successive calls to addPage() to print multiple sprites over several pages. PrintJob.send()--Sends the pages to the operating system's printer. So, for example, a very simple print job script may look like the following (including import and class statements for compiling):
    import flash.printing.PrintJob;public class BasicPrintExample extends Sprite {	var myPrintJob:PrintJob = new PrintJob();	myPrintJob.start();	myPrintJob.addPage(mySprite);	myPrintJob.send();}

×
×
  • Create New...