Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

XML and HTML

This is a discussion on XML and HTML within the CSS | HTML forums, part of the Flash CS3 e Actionscript 3.0 category; Salve ragazzi ho una piccola questione che non sono ancora riuscito a risolvere. Sto progettando un sito in HTML e ...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > CSS | HTML

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 30-06-08, 15:04
Blusquare's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Rome
Posts: 22
Rep Power: 0
Blusquare is on a distinguished road
Send a message via MSN to Blusquare
XML and HTML

Salve ragazzi ho una piccola questione che non sono ancora riuscito a risolvere.

Sto progettando un sito in HTML e CSS e fin qui nessun problema ho effettuato alla perfezione l'inserimento dei miei filmati in flash tramite lo script SEFObject.

Ora io ho fatto un piccolo menu rotatorio dove si muovono delle icone che quando l'utente andra' a cliccarci sopra la pagina si sposta nell'ancora stabilita.

Ed e' proprio questo il punto non riesco a far scorrere la pagina all'ancora e sinceramente non so se l'ancora va messa nel file XML oppure nel codice AS del filmato in flash.

Per la pagina che si deve aprire sulla stessa ho messo la tag _self nel navigate to URL pero per l'ancora non sono riuscito a fare nulla non so dove modificare i parametri.

Sapete darmi una mano?
Seno il menu rotatorio sarebbe inutile per ora ci sono 10 icone e possono sempre aumentare ed e' per questo che mi servirebbe il menu con l'ancora cossiche la pagina slitta sulla cosa da vedere direttamente.

Spero in una vostra mano grazie a tutti quanti
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 30-06-08, 18:49
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,012
Rep Power: 3
Onsitus is on a distinguished road
Re: XML and HTML

Ciao,

non sono sicura avere capito bene....

Dare un nome id nel html e richiamare quel id???
Esempio nel html
HTML Code:
<div id="myId">
e l'url da richiamare sarebbe solo #myId o del tipo http://www.mySite.it/index.html#myId
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 01-07-08, 00:13
Blusquare's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Rome
Posts: 22
Rep Power: 0
Blusquare is on a distinguished road
Send a message via MSN to Blusquare
Re: XML and HTML

no non e' che non hai capito bene forse sono io che mi sono espresso male...

Io ho un menu rotatorio dove ci sono delle icone che girano queste icone vengono prese da un file XML
che ha loro volta se vengono cliccate mi portano nella pagina desiderata.

Siccome questo menu lo sto implementando in una gallery a scorrimento verticale vorrei che tramite il click sull'icona la pagina mi slitta all'ancora del file HTML.

In poche parole e' possibile richiamare da il file xml un ancora che c'e' in un file HTML? cosicche il mio menu ha uno scopo seno mi e' tutto inutile...

volevo sapere se c'e' un modo nel file XML di richiamare un ancora che e' scritta nel codice della pagina HTML...so che con Action Script si puo fare ossia in Flash richiamare un'ancora di un file HTML e pensavo che ci fosse anche una specie di tag per XML

Questo e' il semplice codice XML come si fa ad implementare una data ancora?

HTML Code:
<icons>

<icon image="icon1.png" tooltip="Resident" link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm"/>

<icon image="icon2.png" tooltip="Oriental" link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm"/>

<icon image="icon3.png" tooltip="Barbossa" link=""/>

<icon image="icon4.png" tooltip="Android" link=""/>

<icon image="icon5.png" tooltip="Bio Marines" link=""/>

<icon image="icon6.png" tooltip="Luthor" link=""/>

<icon image="icon7.png" tooltip="Wicked" link=""/>

<icon image="icon8.png" tooltip="Nature" link=""/>

<icon image="icon9.png" tooltip="Orphanage" link=""/>

<icon image="icon10.png" tooltip="Red Cap" link=""/>

</icons>
Spero che mi darai un a mano tu o qualsiasi altra buon anima
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 01-07-08, 14:37
Blusquare's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Rome
Posts: 22
Rep Power: 0
Blusquare is on a distinguished road
Send a message via MSN to Blusquare
Re: XML and HTML

SI piu meno rileggendo hai ragione tu ma il problema e' che non slitta questo e' una piccola parte del codice html
HTML Code:
<!-- ORIENTAL CHILD -->
<div class="featureTop">
    <div class="featureHolder"><a name="Oriental Child" id="Oriental Child"></a><img src="_include/images/oriental_child.jpg" alt="Oriental Child" />
      <div class="divider"></div>
     <h1 class="horiental"><span>Oriental Child</span></h1>
     <div class="leftchannel">  
     <p><strong>Author:</strong> Cardinal - Lino Masciulli </p>
     <p><strong>Post Production:</strong> Cardinal - Lino Masciulli </p>
     <p><strong>Comment:</strong> Text.....</p>
    <!-- 
     <p><strong>Modeling:</strong> Text.....</p>
     <p><strong>Texturing:</strong> Text.....</p>
     <p><strong>Lighting and Rendering:</strong> Text.....</p>
     <p><strong>Post Production:</strong> Text.....</p>
     -->
     </div>
     <div class="rightchannel">
     <p><strong>Software:</strong>    Cinema 4D</p>
     <p><strong>Texture:</strong>    BodyPaint - Photoshop</p>
     <p><strong>Rendering:</strong> Advanced Render</p>
     <p><strong>Post Production:</strong>    Photoshop</p>
     <p><strong>Full Res:</strong> <a href="_include/full_images/oriental_child/oriental_full.jpg" rel="lightbox[Oriental_Child]" title="Oriental Child">Oriental Child </a> </p>
     <a href="_include/full_images/oriental_child/oriental_wire.jpg" rel="lightbox[Oriental_Child]" title="Oriental Child Wire"> </a>
      </div>
     <div class="clear maginBot20"></div>
    </div>
  </div>  
ma niente anche se richiamo con il cancelletto sul file xml non slitta la pagina la ricarica solo non e' che il problema risiede nel file action script?

Pero nel file AS i link sono implementati sul file xml l'unica regola che c'e' e che posso mettere unio dei tag html _self _blank e via dicendo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 01-07-08, 15:51
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,012
Rep Power: 3
Onsitus is on a distinguished road
Re: XML and HTML

Id o name va pure bene.

Pero qui hai un nome composto name="Oriental Child" id="Oriental Child">

Nella parte Flash, dal fla, potrebbe fare un trace per vedere il output ottenuto se necessario!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #6 (permalink)  
Old 01-07-08, 20:44
Blusquare's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Rome
Posts: 22
Rep Power: 0
Blusquare is on a distinguished road
Send a message via MSN to Blusquare
Re: XML and HTML

Questo e il codice del fla e' in AS 2.0

HTML Code:
import mx.utils.Delegate;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 80;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 0;
var home:MovieClip = this;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i
    {
        var t = home.attachMovie("item","item"+i,i+1);
        t.angle = i * ((Math.PI*2)/numOfItems);
        t.onEnterFrame = mover;
        t.toolText = nodes[i].attributes.tooltip;
        t.link = nodes[i].attributes.link;
        t.icon.inner.loadMovie(nodes[i].attributes.image);
        t.r.inner.loadMovie(nodes[i].attributes.image);
        t.icon.onRollOver = over;
        t.icon.onRollOut = out;
        t.icon.onRelease = released;
    }
}

function over()
{
    home.tooltip.tipText.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
    home.tooltip._alpha = 100;
}

function out()
{
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
}

function released()
{
    //implementato il link esterno dal file xml
    getURL(this._parent.link,"_self");
    //
    trace(this._parent.toolText);
}

function moveTip()
{
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) /(centerY+radiusY-perspective);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
    speed = (this._xmouse-centerX)/2500;
}
Anche se non metto un nome composto e metto soltanto " Oriental" mi ricarica la pagina soltanto senza andare nell'ancora stabilita nel file xml ossia

HTML Code:
<icons>

<icon image="icon1.png" tooltip="Resident" link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm" id="#Resident"/>

<icon image="icon2.png" tooltip="Oriental" link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm#Oriental"/>

<icon image="icon3.png" tooltip="Barbossa" link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm"/>

<icon image="icon4.png" tooltip="Android" link=""/>

<icon image="icon5.png" tooltip="Bio Marines" link=""/>

<icon image="icon6.png" tooltip="Luthor" link=""/>

<icon image="icon7.png" tooltip="Wicked" link=""/>

<icon image="icon8.png" tooltip="Nature" link=""/>

<icon image="icon9.png" tooltip="Orphanage" link=""/>

<icon image="icon10.png" tooltip="Red Cap" link=""/>

</icons>

Anche se nel file HTML c'e' il name o id " Oriental " ossia :
HTML Code:
<!-- ORIENTAL CHILD -->
<div class="featureTop">
    <div class="featureHolder"><a name="Oriental" id="Oriental"></a><img src="_include/images/oriental_child.jpg" alt="Oriental Child" />
      <div class="divider"></div>
     <h1 class="horiental"><span>Oriental Child</span></h1>
     <div class="leftchannel">  
     <p><strong>Author:</strong> Cardinal - Lino Masciulli </p>
     <p><strong>Post Production:</strong> Cardinal - Lino Masciulli </p>
     <p><strong>Comment:</strong> Text.....</p>
    <!-- 
     <p><strong>Modeling:</strong> Text.....</p>
     <p><strong>Texturing:</strong> Text.....</p>
     <p><strong>Lighting and Rendering:</strong> Text.....</p>
     <p><strong>Post Production:</strong> Text.....</p>
     -->
     </div>
     <div class="rightchannel">
     <p><strong>Software:</strong>    Cinema 4D</p>
     <p><strong>Texture:</strong>    BodyPaint - Photoshop</p>
     <p><strong>Rendering:</strong> Advanced Render</p>
     <p><strong>Post Production:</strong>    Photoshop</p>
     <p><strong>Full Res:</strong> <a href="_include/full_images/oriental_child/oriental_full.jpg" rel="lightbox[Oriental_Child]" title="Oriental Child">Oriental Child </a> </p>
     <a href="_include/full_images/oriental_child/oriental_wire.jpg" rel="lightbox[Oriental_Child]" title="Oriental Child Wire"> </a>
      </div>
     <div class="clear maginBot20"></div>
    </div>
  </div>  
quindi non so dove sbaglio o cosa devo modificare allorche' questa cosa mi slitta anche se mi ricarica la pagina...spero che saprai indicarmi una via d'uscita

Last edited by Blusquare; 01-07-08 at 20:48..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 01-07-08, 21:10
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,012
Rep Power: 3
Onsitus is on a distinguished road
Re: XML and HTML

1. In Flash, aggiunge un trace nel loop for per vedere che ti restituisci come risultato per t.link.
2. La prima riga nel xml con id="#Resident" è sicuramente sbagliata
3. provato il tutto online??? Posta il link se c'è.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 01-07-08, 23:13
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,012
Rep Power: 3
Onsitus is on a distinguished road
Re: XML and HTML

Quote:
Originally Posted by Blusquare View Post
No ancora non ho provato online anche perche' il cliente mi deve dare il nome e pass del suo server
ho rimodificato tutto il file html mettendo non nomi composti ossia cosi

""

poi nel file XML ho modificato tutti i link cosi:
"link="C:/Documents and Settings/Blux/Desktop/Site/www.cardinal3d.com/portfolio.htm#Resident" "

Nel fla mi da l'output e mi restituisce il valore nel file XML ossia questa stringa:

"tooltip="Angelica" " ossia l'output esce in base a quale icona clicco ma non mi sposta la pagina la ricarica solo come mai?

forse c'e' un errore su questa stringa di codice AS ossia che dice che deve solo ricaricare la pagina e non di cercare l'ancora corrispondente?

function released()
{
//implementato il link esterno dal file xml
getURL(this._parent.link,"_self");
//
trace(this._parent.toolText);

Eppure mi sembra strano
E normale che ti da come output "Angelica" se li fai il trace per this._parent.toolText. Prova con this._parent.link invece.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 01-07-08, 23:21
Blusquare's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Rome
Posts: 22
Rep Power: 0
Blusquare is on a distinguished road
Send a message via MSN to Blusquare
Re: XML and HTML

Ho provato come hai detto tu pero' la cosa strana che se testo il filmato da flash l'ancora funziona
pero se lo pubblico con file html l'ancora non funziona piu come mai???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Actionscript 2 url html in flash ROBY94 Flash CS3 generale 7 11-11-08 18:53
Actionscript 3 import html and css jamiewa advanced Actionscript 3.0 1 13-09-08 14:43
Flash CS3 Audio HTML kaos Actionscript 3.0 base 0 12-07-08 23:11
AIR su HTML kikk Actionscript 3.0 base 2 01-04-08 13:11
Html in Flash storrisi Flash CS3 generale 3 21-11-07 15:22


All times are GMT. The time now is 17:09.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406