Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
am i crazy or what!? (flash)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash
View previous topic :: View next topic  
Author Message
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 30.12.2005 17:39    Post subject: am i crazy or what!? (flash) Add user to your forum ignore list Reply with quote

radi se o f8 i as2

1)
uvezi xml-a i f8....load-am xml, kad se load-a (onLoad event, trigger, wtf) idem si prigrabit sto mi treba... xmlnode.nodeValue ne radi (siguran sam da je sve dobro proteklo jer xmld.nodeName uredno vraca imena nodova tj. tagova...) e i znam da to ima veze s nodeType ali ne kuzim te ELEMENT_NODE i TEXT_NODE koja je razlika ... i kako da ucitam te podatke ako se radi o ELEMENT_NODE !?!?

2)
imam clip i u njem u frame 1 (layer1:) neke varijable npr. var supersam:Number=10; i sad zelim njima pristupit iz root-a s _root.clip.supersam ..... i nece!? :) ovo stvarno ne kuzim :)

hvala ;)

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 31.12.2005 11:47    Post subject: Add user to your forum ignore list Reply with quote

waaa, daj sempl xml-a i semlp AS-a, vjerojatno si nesto ukaro

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 31.12.2005 12:31    Post subject: Add user to your forum ignore list Reply with quote

carr wrote:
waaa, daj sempl xml-a i semlp AS-a, vjerojatno si nesto ukaro

ma nisam Smile al evo...
Code:
var mojxml:XML=new XML();
mojxml.ignoreWhite = true
mojxml.onLoad=function(success:Boolean){
      if(success){
         var nodes:Array=mojxml.firstChild.childNodes;
         for(k=0;k<nodes.length;k++) trace("nodeName: "+nodes[k].nodeName+" nodeValue: "+nodes[k].nodeValue+" nodeType: "+nodes[k].nodeType);
      }else{
         trace("pica mu njeogova gordonska")
      }
}
mojxml.load("test.xml");

Code:
<?xml version="1.0"?>
<nodonja>
   <child1>brrrr</child1>
   <child2>buah</child2>
   <djetenekotrece>mama!</djetenekotrece2>
</nodonja>

Code:
//TRACE OUTPUT:
//nodeName: child1 nodeValue: null nodeType: 1
//nodeName: child2 nodeValue: null nodeType: 1
//nodeName: djetenekotrece nodeValue: null nodeType: 1

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 31.12.2005 12:32    Post subject: Add user to your forum ignore list Reply with quote

a ovo drugo!? to me stvarno zbunjuje :)

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
Moebius



Joined: 26 Jan 2004
Posts: 245
Location: zagreb

PostPosted: 31.12.2005 14:08    Post subject: Add user to your forum ignore list Reply with quote

zar ti ovdje ne fali jedan "{" iza pocetka for petlje:

Code:
         for(k=0;k<nodes.length;k++) trace("nodeName: "+nodes[k].nodeName+" nodeValue: "+nodes[k].nodeValue+" nodeType: "+nodes[k].nodeType);
      }else{
         trace("pica mu njeogova gordonska")
      }


znaci da bude ovako:

Code:
         for(k=0;k<nodes.length;k++)
{
trace("nodeName: "+nodes[k].nodeName+" nodeValue: "+nodes[k].nodeValue+" nodeType: "+nodes[k].nodeType);
      }else{
         trace("pica mu njeogova gordonska")
      }



mozda je samo copy&paste greska.
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 31.12.2005 15:03    Post subject: Add user to your forum ignore list Reply with quote

ne fali nista, krivo si nesta pogledao....

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 31.12.2005 17:18    Post subject: Add user to your forum ignore list Reply with quote

umjesto
Code:
nodes[k].nodeValue

koristi
Code:
nodes[k].firstChild.nodeValue

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 31.12.2005 17:47    Post subject: Add user to your forum ignore list Reply with quote

BRAVO! Smile weeee
sam zaš je to tak, glupo :/ hm ?


sad me jos prosvjetlite za problem #2

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
sarma



Joined: 02 Nov 2004
Posts: 99
Location: Osijek/ZG, Croatia

PostPosted: 04.01.2006 10:04    Post subject: Add user to your forum ignore list Reply with quote

-- postoji mogućnost da ti varijable nakon 'kruga' actionscripta prestanu biti postojane, drugim riječima ako baš moraš tamo smjestiti vars onda probaj sa _global.supersam;
-- to će ti napraviti globalnu varijablu širokog scope-a, tj. dostupnu iz bilo kojeg 'dijela' filma.....
probaj pa vidi....

_________________
-- 45th generation Roman --
Back to top
View user's profile Send private message
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 04.01.2006 11:10    Post subject: Add user to your forum ignore list Reply with quote

sarma wrote:
-- postoji mogućnost da ti varijable nakon 'kruga' actionscripta prestanu biti postojane, drugim riječima ako baš moraš tamo smjestiti vars onda probaj sa _global.supersam;
-- to će ti napraviti globalnu varijablu širokog scope-a, tj. dostupnu iz bilo kojeg 'dijela' filma.....
probaj pa vidi....

ma znam za to globals i to... ali svaka varijabla u svakoj 'instanci' je jedinstvena .... Sad

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
sarma



Joined: 02 Nov 2004
Posts: 99
Location: Osijek/ZG, Croatia

PostPosted: 04.01.2006 13:41    Post subject: Add user to your forum ignore list Reply with quote

-- ma znam to, nije stvar u jedinstvenosti varijable, nego u njezinoj dostupnosti u kodu, as is _local || _global, čuj probaj sa global riješenjem vjerujem da bi to moglo uspijeti.

Edit: -- uostalom, na tom mjestu u kodu u kojem potražuješ var, provjeri njezinu dostupnost s trace(supersam);

_________________
-- 45th generation Roman --
Back to top
View user's profile Send private message
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 04.01.2006 15:09    Post subject: Add user to your forum ignore list Reply with quote

pa global ce ju ucinit vidljivu svima tj. svi ce joj moc pristupit s npr. slon a ne mc.slon !?!?!?mislim da da

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 05.01.2006 16:09    Post subject: Add user to your forum ignore list Reply with quote

Problem broj 3

3)
Napravim prazni clip kontenjer...loadam u njega neku veliku (dimenzije) sliku i kad traceam kontener._width i ispadne 0, kad ga promjenim ništa se ne vidi (inače loada dobro i sve...)

evo kod...
Code:
_root.createEmptyMovieClip("kontenjer",1);
var clipLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
clipLoader.addListener(listener);
listener.onLoadStart = function(tmc:MovieClip):Void{
      trace("Loading..." + tmc);
};
listener.onLoadProgress = function(tmc:MovieClip,loaded:Number,total:Number){
//...
}
listener.onLoadComplete = function(tmc:MovieClip,stat:Number){
      trace("Loaded!!");         
      kontenjer._x=0;
      kontenjer._y=0;
      trace(kontenjer._width)
}
clipLoader.loadClip("movies/"+movieAddr,kontenjer);

trace output:
Loading..._level0.kontenjer
Loaded!!
0


hvala!

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group