So in previous post with made drupal custom block now lets make custom block with flash banner where data to banner is passed from node that has CCK fields.Make content type with 4 cck text fields, or just use one field, even body can do and then you can manauly manipulate string with PHP, just have some separator in your input. In this example we will use 4 cck fields.So in the block template, block-block-4.tpl.php we add this code
<?php $nid='51';$node = node_load(array("nid" => $nid));?>
so that we load the Node and can use its variables. If you are not shure how are variables called, you can export your data to screen with
<pre><?php print_r ($node); ?></pre>.
Then you should add flash object file and fill variables with drupal node conent like this
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" />
<param name="movie" value="/files/brijuni.swf?val1=<?php print $node->field_linija1[0]['value'];?>&val2=<?php print $node->field_linija2[0]['value'];?>&val3=<?php print $node->field_linija3[0]['value'];?>&val4=<?php print $node->field_linija4[0]['value'];?>" />
<embed pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="/files/brijuni.swf?val1=<?php print $node->field_linija1[0]['value'];?>&val2=<?php print $node->field_linija2[0]['value'];?>&val3=<?php print $node->field_linija3[0]['value'];?>&val4=<?php print $node->field_linija4[0]['value'];?>" type="application/x-shockwave-flash">
</embed>
</object>
were we added php output of node variables to fill the root of flash file with val1-val4 variables. (this is simple way to pass variables to flash file). In flash file on first frame we have this code
_root.linija1.tekst.text = _root.val1;
_root.linija2.tekst.text = _root.val2;
_root.linija3.tekst.text = _root.val3;
_root.linija4.tekst.text = _root.val4;
and with this we have flash banner with data from drupal node. Download php block below to have complete code.