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
xml + flash problemi

 
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 -> Client-side
View previous topic :: View next topic  
Author Message
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 17.07.2004 11:47    Post subject: xml + flash problemi Add user to your forum ignore list Reply with quote

code wrote:
var noPage = 1;

if (getTimer() < 6000)
{
xml1 = new XML();
xml1.onLoad = myOnLoad;
xml1.load("consule.xml");
}

function myOnLoad (success) {
if (success)
{
about_text = "";
loadTxtBox(noPage);
}
}

function loadTxtBox(no)
{
var i = 0;
var j = 0;
while (i < xml1.firstChild.childNodes.length)
{

if ((xml1.firstChild.childNodes[i].attributes.no) == no)
{
j = 0;
while (j < xml1.firstChild.childNodes[i].childNodes.length)
{
if (xml1.firstChild.childNodes[i].childNodes[j].nodeName != null)
{
about_text += xml1.firstChild.childNodes[i].childNodes[j].toString();
about_text += chr(13) add chr(13);
}
j ++;
}
break;
}

i ++;
}
}


ovak mi izgleda kod u flashu... u text polju se ispisuje uredno.
ima jedan problem.

scroller mi se ne prikaze, kao da nezna kolko je dugo, pa je scroller disablean.
ipak... kada otidjem na drugi frejm i vratim se, scroll radi uredno.
netko zna kako rijesiti problem?

btw, niti nemogu css povezati s tim xmlom
probao sam onako, samo zakeljiti css na doticni textbox ali to ne funkcionira....

bio bi vrlo zahvalan, fala
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 17.07.2004 13:34    Post subject: Re: xml + flash problemi Add user to your forum ignore list Reply with quote

myCSS.load(cssURL);
myCSS.onLoad = function(success) {
if (success) {
myText.styleSheet = myCSS;
}
};


ne zaboravi staviti textfield kao HTML field...

a za skrol probaj provjeriti sto flash misli koliko teksta ima... u funkciji loadTxtBox na kraju (tamo gdje je vec loadan XML) stavi:

trace(ImeTextFielda.maxscroll)

pa pogledaj sto ispise...


i jos nesto.. Smile koristi "+" umjesto "add" .. ako to jos radi u sljedecim verzijama flasha nece Smile
Back to top
View user's profile Send private message MSN Messenger
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 17.07.2004 14:02    Post subject: Add user to your forum ignore list Reply with quote

ovo sa cssom jednostavno ne radi, to sam probao vec prije, sada opet, nece i nece

trace scroll izbacuje "1"
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 17.07.2004 14:36    Post subject: Add user to your forum ignore list Reply with quote

blackduke wrote:
ovo sa cssom jednostavno ne radi, to sam probao vec prije, sada opet, nece i nece

trace scroll izbacuje "1"



jsi loadao CSS prije teksta?


ako je maxscroll 1, znaci nema skrola... ne znam zasto to radi.. mozda da izvedes glupost tipa:

spremas sve u neku pomocnu varijablu i onda na kraju stavis:

about_text = PomocnaVarijabla


zasto koristis getTimer()?
Back to top
View user's profile Send private message MSN Messenger
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 17.07.2004 14:41    Post subject: Add user to your forum ignore list Reply with quote

trenutni kod

Quote:
var noPage = 1;

xml1 = new XML();
xml1.onLoad = myOnLoad;
xml1.ignoreWhite = true;
xml1.load("consule.xml");

function myOnLoad (success) {
if (success)
{
//css
myCSS.load("consule.css");
myCSS.onLoad = function(success) {
if (success) {
InstanceName_0.styleSheet = myCSS;
}
};
///css
about_text = "";
loadTxtBox(noPage);

}
}




function loadTxtBox(no)
{
var i = 0;
var j = 0;
//trace dodan
trace(InstanceName_0.maxscroll);
while (i < xml1.firstChild.childNodes.length)
{

if ((xml1.firstChild.childNodes[i].attributes.no) == no)
{
j = 0;
while (j < xml1.firstChild.childNodes[i].childNodes.length)
{
if (xml1.firstChild.childNodes[i].childNodes[j].nodeName != null)
{
about_text += xml1.firstChild.childNodes[i].childNodes[j].toString();
about_text += chr(13) + chr(13);
}
j ++;
}
break;
}

i ++;
}
}



vise ne koristim gettimer
takodjer, ovo sa pomocnom varijablom ne funkcionira
a css jos uvijek ne prepoznaje

mozda sam nesto krivo definirao

unutar xmla imam

Quote:
<text class="headline">TEXT NASLOVA</text>


i unutar cssa imam headline stil.
nis jos nismo fixali :(

ajd na icq na minutu ak imas vremena? 100651579
Back to top
View user's profile Send private message Visit poster's website Twitter profile
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 17.07.2004 14:54    Post subject: Add user to your forum ignore list Reply with quote

a i glupo je kaj prvi put kad dodjem scroll ne radi, ali kada se vratim, scroll RADI
to me jebe najvise!....

njaah
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 17.07.2004 19:46    Post subject: Add user to your forum ignore list Reply with quote

blackduke wrote:
a i glupo je kaj prvi put kad dodjem scroll ne radi, ali kada se vratim, scroll RADI
to me jebe najvise!....

njaah



ajde ako ti nije tesko postaj FLA sa XMLom.. mozes samo taj dio sa textfieldom...
Back to top
View user's profile Send private message MSN Messenger
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 17.07.2004 20:04    Post subject: Add user to your forum ignore list Reply with quote

skuzili decki sa YH problem

jedna linija koda 8 sati :)) weeeeeee

Quote:
FScrollBar.setScrollTarget(TextField);

znaci samo se 'update' scroll nakon kaj se text ubaci, i onda scroll radi

hvala lijepa, dovidjenja :)

platy, tnx na pomoci, appreciated
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 18.07.2004 23:16    Post subject: Add user to your forum ignore list Reply with quote

ja sam danas imao slican problem Laughing

cini se da flash pogleda koliko ima za skrolati nakon sto mu napises:

FScrollBar.setScrollTarget(TextField);
ili
nesto.setScrollContent("nesto2");


.. ako se slucajno nakon toga nesto promijeni on ne kuzi da treba manje/vise skrolati..
Back to top
View user's profile Send private message MSN Messenger
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 18.07.2004 23:28    Post subject: Add user to your forum ignore list Reply with quote

ma meni sad ovo sve radi

stavio sam i da onak, ako ima vise texta nego sto stane, da enable scroll, inace da nije visible
i stavio sam da ga makne odmah, dok se ne ucita text, pa onda da postavi scroll ili ne (jer inace scroll ostane, pa se ucita text, pa se onda makne, a to je glupo)

uglavnom, radi

css nisam uspio rijestiti ali imam varijante u xmlu tima <font color="#333333">

btw

niit <bold> niti <strong> nece napraviti bold text
sve ostali kodovi rade, tipa, color, font, br, p, blah..

ako neko zna kako boldat text, fala :)
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 18.07.2004 23:38    Post subject: Add user to your forum ignore list Reply with quote

meni radi ako stavim <b>tekst</b>

npr:

textField.htmlText = "bla bla <b>bla</b>";
Back to top
View user's profile Send private message MSN Messenger
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 18.07.2004 23:42    Post subject: Add user to your forum ignore list Reply with quote

Platypus wrote:
textField.htmlText = "bla bla <b>bla</b>";

mah, kad ga upisujem direktno u ASu preko toga, onda radi i css
mislim da ga ovaj xml malo zeza?

neznam...
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 18.07.2004 23:49    Post subject: Add user to your forum ignore list Reply with quote

blackduke wrote:

mislim da ga ovaj xml malo zeza?



moguce, ali ne kuzim zasto bi ga zezao.. ipak je i to samo tekst sto se tog textfielda tice..
Back to top
View user's profile Send private message MSN Messenger
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 -> Client-side 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