Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /chroot/home/girunahu/giruna.hu/html/blog/_php_/set_statistics_blog.php on line 48
Warning: mysql_result() expects parameter 1 to be resource, boolean given in /chroot/home/girunahu/giruna.hu/html/blog/_php_/set_statistics_blog.php on line 54
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /chroot/home/girunahu/giruna.hu/html/blog/_php_/set_statistics_blog.php on line 64
Blog jelleggel - Like a blog. Azt írok ide, amit akarok és,
akkor frissítem, amikor akarom :)
I write here anything I want, and refresh anytime I want :)
Ez egy egyszerű képgaléria komponens, előtöltővel és előre-hátra
navigációval, melyhez a #8-ban található
PHP-s fájlnév visszaadót is felhasználjuk. A PHP fájlnak azonos könyvtárban
kell lennie az swf-fel, és a képeket 480x360 maximális méretre kell vágni.
A komponens pathToImages paraméterével
lehet megadni, hogy hol helyezkednek el a betöltendő képek.
It's a simple picture gallery component with preloader and forward-back
navigation, we will use for it the filenames receiver at
the #8. The PHP file must be in the same directory as the swf and
you have to crop the images to 480x360 maximal size. You can set where
are the images to load with the component's pathToImages
parameter.
#16. Popup ablak képmérethez igazítása Resize a Popup to fit an image's
size (Flash MX)
Flash-ből JavaScript segítségével egy popup ablakot fogunk
nyitni, aminek a méretét hozzáigazítjuk a benne lévő képéhez, ez például
képgalériáknál jöhet jól. Ebben a dologban igazából nem is a Flash játszik
lényeges szerepet (mert szinte egy getURL()-en
kívűl semmi mást nem használunk), hanem a JavaScript
A lentebb található Javascript-et kell elhelyezni majd abba a HTML-be
(annak is a body tag-jébe), amelyikbe
az swf van beágyazva, ez fogja a Flash
kérésére a popupot megnyitni. Az ablak hozzáigazítását a megjelenő képhez,
az új megnyíló popup (new_win.html) saját
maga fogja elvégezni, abban is lesz egy - picit bonyolultabb - JavaScript,
ez a letölthető forrásban megtalálható.
We will open popup from Flash with help of JavaScript, which will be resize
to the picture's size, when making a picture gallery it might be helpful.
In this solution we won't use too much ActionScript (an getURL()
will be), but the relevant is the JavaScript
Below you can see a Javascript, that you have to put into your HTML
(at the body tag), which contains your
embed swf file, that will be open the
popup at the request of Flash. The new opened popup (new_win.html)
will be adjust the window to the picture, it's contains a little bit difficult
JavaScript, which located in the downloadable source.
#15. Szöveg formázása CSS segítségével
CSS formatted text (Flash MX 2004)
A következő példa egy a Flash-be kívülről betöltött szöveget
fog, egy szintén külső CSS fájl segítségével
megformázni. Ezt az MX 2004-ben megjelent TextField.StyleSheet
osztálysegítségével fogjuk elérni, így a mozinkat is Flash 7 player alá
kell publisholnunk.
És itt egy hasznos link a Flash által támogatott
CSS tulajdonságokról.
In the next example a text, what is loaded into Flash will be formatting
by an external CSS file. So we wil use
the TextField.StyleSheet class, debuted
in MX 2004 and we have to publish our movie into Flash
7 format
And here a helpful link to the Supported
CSS properties of Flash
#14. Táblázat dinamikus szövegmezőben
Table in dynamic textfield (Flash MX)
Gyakran előforduló probléma: hogyan rakjunk dinamikus szövegmezőbe
táblázatot, mint HTML esetén, erre itt van egy elég jó megoldás - a Text
format tag-et (<textformat>) fogjuk
felhasználni és a tabstops attribútumát:
És itt egy hasznos link a Flash által támogatott
HTML tag-ekről
A tipical problem is: How do I put table into a dynamic textfiled, like
in HTML. Here a most good solution of this - we will use the Text format
tag (<textformat>) and its tabstops
attribute:
And here a helpful link to the Supported
HTML tags of Flash
#13. Tartalom betöltése egy frame-be
Load content into a frame (Flash 2)
2004.12.08.
version: 2
#12. Jobb klikkes menü elemeinek tiltása és saját menüelem hozzáadása Disable the right-click context menu and add
an own menuitem (Flash MX 2004)
A gyakran felmerülő kérdésre: "hogyan tüntessem el
a jobb klikkes menüt", már volt egy egyszerű megoldás a #5-ben.
De mi van akkor, ha új elemeket is szeretnénk hozzáadni? Ekkor használjuk
fel az MX 2004-ben megjelent ContextMenu osztályt.
One of the frequently asked question is: "How do I disable the right-click
context menu". There was a solution of this in
the #5. But what if, when we
want to add new elements to the menu? In this case we use the ContextMenu
class, debuted in MX 2004.
var my_cm:ContextMenu
= new ContextMenu(); // elrejti az összes beépített menüelemet
(kivéve a Settings-t)
// hides all built-in menu items (except Settings)
my_cm.hideBuiltInItems(); // hozzáad egy saját elemet - add an own
item var menuItem_cmi:ContextMenuItem
= new ContextMenuItem("By
Giruna", getMyPage);
my_cm.customItems.push(menuItem_cmi); this.menu
= my_cm; function getMyPage
() { getURL("http://www.giruna.hu",
"_blank");
}
Az aktuális sávszélesség detektálásához jól jön ez a kis
programocska. Ebből az egyszerű képletből indulunk ki: V
= s/t
For detecting the current bandwidth use this tiny program. We will use
this simply formula to start: V = s/t
#10. Dinamikus szövegmezőbe külső kép ( vagy swf) fájl linkelése Linking external jpeg (or swf) to a dynamic
textfield (Flash MX 2004)
Az img tag-et fogjuk felhasználni,
amit a Flash 7 player már tud értelmezni, és magát a Flash mozinkat is
7-es player alá kell publisholnunk (File/Publish
Settings vagy CTRL + SHIFT + F12, itt a Flash fül alatt a Version-nál
legyen Flash Player 7, alapállapotban ez van megjelölve)
Természetesen a szövegfájlt UTF-8 kódolással mentsük el.
For this we will use the img tag, what
the Flash 7 player can explain, and we have to publish our movie into
Flash 7 format (File/Publish Settings
vagy CTRL + SHIFT + F12, here under the Flash ear the Version will be
Flash Player 7 - this is the default)
Certainly the text file will be saved in UTF-8 encoding.
#9. Egy movieclip oda-vissza lejátszása
Play a movieclip back and forth (Flash MX)
Felmerülhet a kérdés, hogyan lehet egy animációt visszafelé
is lejátszani, hogy finom legyen a mozgás (főleg menük esetében)? Az alábbi
kis példa pont ezt mutatja meg.
Sometimes we need to play reverse a movieclip, because the movements will
be softer (mostly in case of creating menus) This will be shown by the
next example.
Fájlnevek lekérdezése egy adott könyvtárból PHP segítségével.
A PHP-n belül a $handle tartalmazza az
adott könyvtárhoz az elérési útvonalat, ami tetszés szerint megváltoztatható.
A Flash-en belül egy LoadVars objektum (FileNamesLV)
fogadja az adatokat,majd egy tömbbe (FileNamesArray)
szórja át őket.
Use this to receive filenames from a directory with PHP. In the PHP, the
$handle contains the path to the directory,
if you want another, you can change this simply. In the Flash a LoadVars
object (FileNamesLV) receive the datas,
and put them into an Array (FileNamesArray)
Egy külső swf vagy jpg fájl betöltése, script-ből létrehozott
előtöltő segítségével.
Load an external swf or jpg with a script based preloader.
/* In the first keyframe of the external file
have to contain a stop(); command and must be empty.
this script usable from Flash Player 6
A betöltendő fájl első kulcskockája legyen üres és tartalmazzon egy stop();
utasítást
- Flash 6-os player-től használható
*/ stop(); _root.currentDepth
= 0; // Előtöltő csík tulajdonságai // Properties of the LoaderBar loaderBarFrameColor = 0xFFFFD5; // Szín - Color
loaderBarBodyColor = 0xD21C02; // Koordináták, szélesség, magasság -
coordinates, width, height
loaderBarX = 10;
loaderBarY = 20;
loaderBarW = 140;
loaderBarH = 10; // A százalék kijelző tulajdonságai
// Properties of the percent display tfX = 10;
tfY = 32;
tfW = 200;
tfH = 78; // A külső fájlod neve/elérési útvonallal
// Name of the your external file with path
targetContent = "anything.swf"; // A betöltő függvény meghívása - call
the loader function
loadContent (targetContent); function loadContent (targetC) { //
Megnézi, hogy létezik-e már a mc - check for existing mc if
(this.content_mc) { this.content_mc.unloadMovie();
setVisi (); //
Különben szükség lesz egy új üres mc-re - need a new empty mc & textField }
else { this.createEmptyMovieClip("content_mc",
++_root.currentDepth); //
Megtudod változtatni a szövegmező tulajdonságait, ha akarod. // You can change
the textField's text properties, if you need. this.createTextField("tfCounter",
++_root.currentDepth,
tfX, tfY ,tfW, tfH); //
Az előtöltő csík megrajzolása - draw the loaderBar's body this.createEmptyMovieClip("barFront",
++_root.currentDepth); with
(this.barFront){
beginFill (loaderBarBodyColor,
100); //lineStyle
(0, 0x320EC7f, 100);
moveTo (0, 0);
lineTo (0+1, 0);
lineTo (0+1, loaderBarH);
lineTo (0, loaderBarH);
lineTo (0, 0);
endFill(); _x
= loaderBarX; _y
= loaderBarY;
} //
Keret rajzolása hozzá - draw the loaderBar's Frame this.createEmptyMovieClip("barFrame",
++_root.currentDepth); with
(this.barFrame){
lineStyle (0, loaderBarFrameColor,
100);
moveTo (0, 0);
lineTo (loaderBarW,
0);
lineTo (loaderBarW,
loaderBarH);
lineTo (0, loaderBarH);
lineTo (0, 0);
_x = loaderBarX;
_y = loaderBarY;
}
} this.content_mc.loadMovie(targetC); //
A betöltődés állapotának folyamatos figyelése //
Continuous observe of downloading this.onEnterFrame
= function () {
if (this.content_mc.getBytesTotal()>0)
{ this.percent
= int( ( this.content_mc.getBytesLoaded()/this.content_mc.getBytesTotal()
)*100); this.barFront._width
= int(this.percent*(loaderBarW/100)); this.tfCounter.text
= "Loaded "+this.percent+"
%";
}
if ( (this.percent
== 100) && (this.content_mc.getBytesTotal()>0)
) { this.content_mc.play(); delete(this.onEnterFrame);
setVisi ();
}
}
} // Láthatóságok állítása // Set the visibility function
setVisi () { this.barFront._visible
= !this.barFront._visible; this.barFrame._visible
= !this.barFrame._visible; this.tfCounter._visible
= !this.tfCounter._visible;
}
2004.09.03.
version: MX
#6. LoadVars osztály
LoadVars Class (Flash MX)
Hogyan töltsünk be a Flash-be adatok egy egyszerű PHP script
segítségével. Megjegyzés: UTF-8
kódolással kell betölteni az adatokat a Flash-be, mert az úgy várja.
How to pass datas to Flash, from an simple PHP script. Note: you must load the datas into Flash
with UTF-8 encoding format.
- Egyszerű meteoreső effektus, mint az eső, hóesés, stb.
A meteorok haladási irányát a nyilak segítségével lehet változtatni, persze
előszőr kattints bele a moziba :) Érdekesség: minden kódből van létrehozva,
dinamikusan.
- Simply meteor shower effect, like rain, snowfall. You can change meteor's
direction with the arrow keys, but first click on the movie :). Curiosity: all created from code, dynamically.
By
Giruna Az oldalon található összes forrás és
kód szabadon terjeszthető, felhasználható és megváltoztatható.
All sources and codes in this page are freely to spread, use and reuse.