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
 

Következő oldal/Next page
 
 


Böngészó cache kikerülése - Fontnézegető - Tooltip - Képgaléria - Popup ablak képmérethez igazítása - Szöveg formázása CSS segítségével - Táblázat dinamikus szövegmezőben - Tartalom betöltése egy frame-be - Jobb klikkes menü elemeinek tiltása - Sávszélesség detektálása - Dinamikus szövegmezőbe külső kép ( vagy swf) fájl linkelése - Egy movieclip oda-vissza lejátszása - Fájlnevek - Előtöltő - LoadVars osztály - Nap tippje (2004.08.04.) - Nap tippje (2004.08.03.) - Idegen életforma - Meteoreső - Egy "régi" XML vezérelt tábla komponens

Avoid browser caching - Fontviewer - Tooltip - Picture gallery - Resize a Popup to fit an image's size - CSS formatted text - Table in dynamic textfield - Load content into a frame - Disable the right-click context menu - Bandwidth detector - Linking external jpeg (or swf) to a dynamic textfield - Play a movieclip back and forth - Filenames - Preloader - LoadVars Class - Tip of the day (2004.08.04.) - Tip of the day (2004.08.03.) - Alien lifeform - Meteor shower - An "old" XML driven table component

 
 


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 :)

 
 




#20.
Böngészó cache kikerülése
Avoid browser caching
(Flash MX)

Adatok/fájlok betöltése PHP segítségével, ez gyakori tartalom frissüléskor hasznos, mert így elkerülhető a régebbi adatok/fájlok cache-elése.

To avoid the browser caching, we will load the external files throught PHP, it's helpful, when we often rerfresh the contents/datas.


Forrás - Source (4K)

2005.05.24.
version: MX


 
 




#19.
Fontnézegető
Fontviewer
(Flash MX)

A saját gépünkre feltelepített összes font tekinthető meg vele.

You can view with this all of your installed font.


Forrás - Soxurce (12K)

2005.04.18.
version: MX


 
 




#18.
Tooltip
Tooltip
(Flash MX)

Egy roppant egyszerű tooltip, a megjegyzések a forrásban találhatóak.

It's a very simple tooltip, all the notes are in the source.


Forrás - Source (5K)

2005.03.27.
version: MX


 
 




#17.
Képgaléria
Picture gallery
(Flash MX 2004)

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.

Forrás - Source (241K)

2005.03.10.
version: MX 2004


 
 




#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.


JavaScript:
<script language="JavaScript" type="text/JavaScript">
function popupPicts(pictName){
theURL = "new_win.html?"+pictName;
new_win = window.open(theURL, '_blank', 'width=1, height=1, location=no, menubar=no, scrollbars=no, resizable=no, toolbar=no, statusbar=no');
return;
};
</script>

Forrás - Source (264K)

2005.02.08.
version: MX


 
 




#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


Forrás - Source (6K)

2005.01.22.
version: MX 2004


 
 




#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

Forrás - Source (4K)

2004.12.21.
version: MX


 
 




#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");
}


2004.11.23.
version: MX 2004


 
 




#11.
Sávszélesség detektálása
Bandwidth detector
(Flash MX)

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


Forrás - Source (210K)

2004.11.12.
version: MX


 
 




#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.


Forrás - Source (21K)

2004.11.09.
version: MX 2004


 
 




#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.


Forrás - Source (20K)

2004.10.23.
version: MX


 
 




#8.
Fájlnevek
Filenames
(Flash MX)

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)


Forrás - Source (9K)

2004.10.12.
version: MX


 
 




#7.
Előtöltő
Preloader
(Flash MX)

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.


Forrás - Source (6K)

2004.08.26.
version: MX


 
 




#5.
Nap tippje (kedvencem):
Tip of the day (favourite):
(Flash MX)

- Hogyan tüntessük el a jobb klikkes menü elemeit?
Helyezd el ezt a kódrészletet az első frame-n:
Stage.showMenu = false;

- How to hide the elements of rigthclick menu?
Place this script to the first frame:
Stage.showMenu = false;

2004.08.04.
version: MX


 
 




#4.
Nap tippje:
Tip of the day:

Ne használj egynél több Scene-t :)
Do not use more than one Scene :)

2004.08.03.
version: MX


 
 




#3.
Idegen életforma
Alien lifeform
(Flash MX)

- Beállítható rajta, hogy az egeret kövesse, avagy véletlenszerűen mozogjon.
Érdekesség: minden kódből van létrehozva, dinamikusan.

- You can set that, follow the cursor or move randomly.
Curiosity: all created from code, dynamically.


Forrás - Source (12K)

2004.07.28.
version: MX


 
 




#2.
Meteoreső
Meteor shower
(Flash MX)

- 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.


Forrás - Source (18K)

2004.07.28.


 
 




#1.
Egy "régi" XML vezérelt tábla komponens
An "old" XML driven table component
(Flash MX)



Forrás - Source (10K)

2004.07.27.


 
 

Következő oldal/Next page

 
 

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.