الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

اريد عمل قوائم فرعية لملف فلاش xml

بدأه Mr.Ra7iL في 28 مايو 2012 · 6 رد · 2,048 مشاهدة · في XML و تطبيقاتها
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلاموا عليكم ورحمة الله

اعمل في تصميم اسطوانة تقديمية لشركة ديكورات

التصميم فلاش + Xml

الاستفسار:

أريد زيادة عدد الصفحات الموجودة في هذا الملف مع زيادة الشاشات المرتبطه بها في الملف الفلاشي علماً انها ActioScript وليست Xml

و أيضاً أريد عمل قوائم منسدله من اللينكات في الأسفل.

و هذه هى الأوامر الموجودة في ملف الفلاش .

function parsXML()
{
    mainGalleryNode = gallery_xml.childNodes[0].childNodes;
    path = mainGalleryNode[_root.gallerySel - 1].attributes.path;
    lenGall = mainGalleryNode[_root.gallerySel - 1].childNodes.length;
    lenCat = mainGalleryNode.length;
    for (var _loc2 = 0; _loc2 < lenGall; ++_loc2)
    {
        arrayImage[_loc2] = path + mainGalleryNode[_root.gallerySel - 1].childNodes[_loc2].attributes.pic;
        arrayThumb[_loc2] = path + mainGalleryNode[_root.gallerySel - 1].childNodes[_loc2].attributes.thumbnail;
        arrayTitle[_loc2] = mainGalleryNode[_root.gallerySel - 1].childNodes[_loc2].attributes.name;
        arrayDescription[_loc2] = mainGalleryNode[_root.gallerySel - 1].childNodes[_loc2].attributes.description;
    } // end of for
} // End of the function
function arrayThumbs()
{
    for (var _loc3 = 1; _loc3 <= lenGall; ++_loc3)
    {
        _thumbs._thumbs.attachMovie("thumb", "thumb" + _loc3, _loc3);
        var _loc2 = _thumbs._thumbs["thumb" + _loc3];
        _loc2.index = _loc3;
        _loc2._y = Math.floor(_loc2._height + 1) * (_loc3 - 1);
        _loc2._mc._txt.text = _loc2.index;
        _loc2.onRollOver = function ()
        {
            this.gotoAndPlay("over");
        };
        _loc2.onRollOut = _loc2.onReleaseOutside = function ()
        {
            this.gotoAndPlay("out");
        };
        _loc2.onRelease = function ()
        {
            caurina.transitions.Tweener.addTween(_mc1._mc, {_saturation: 1, time: 5.000000E-001});
            mcLoader.loadClip(arrayImage[this.index - 1], _mc1._mc);
            currentIndex = this.index - 1;
            getDes();
        };
    } // end of for
    counter = 1;
} // End of the function
function menuCat()
{
    for (var _loc4 = 1; _loc4 <= lenCat; ++_loc4)
    {
        _category.attachMovie("btnCat", "btnCat" + _loc4, _loc4);
        var _loc3 = _category["btnCat" + _loc4];
        var _loc6 = _category["btnCat" + (_loc4 - 1)];
        _loc3.index = _loc4;
        arrayNameGall[_loc4 - 1] = mainGalleryNode[_loc4 - 1].attributes.name;
        _loc3._mc._txt.autoSize = true;
        _category["btnCat" + _loc4]._mc._txt.text = arrayNameGall[_loc4 - 1];
        _loc3._red._width = _loc3._mc._txt.textWidth + 10;
        _loc3._red._x = _loc3._mc._txt.textWidth / 2;
        _loc3._mask._width = _loc3._mc._txt.textWidth + 10;
        _loc3._mask._x = _loc3._mc._txt.textWidth / 2;
        for (var _loc5 = 1; _loc5 <= 3; ++_loc5)
        {
            _loc3["_arr" + _loc5]._x = _loc3._mc._txt.textWidth / 2 - 5;
        } // end of for
        _loc3._mask_red._txt.text = arrayNameGall[_loc4 - 1];
        _loc3._x = Math.floor(_loc6._x + _loc6._mc._txt.textWidth + intervalCat);
        if (_loc4 < lenCat)
        {
            _category._breakers.attachMovie("breaker", "breaker" + _loc4, _loc4);
            var _loc7 = _category._breakers["breaker" + _loc4];
            _loc7._x = _loc3._x + _loc3._mc._txt.textWidth + intervalBr;
        } // end if
        _category._x = 881 - _category._width;
        _loc3.onRollOver = function ()
        {
            if (this.index != _root.gallerySel)
            {
                btnCatOver(this._red, this._arr1);
            } // end if
        };
        _loc3.onRollOut = _loc3.onReleaseOutside = function ()
        {
            if (this.index != _root.gallerySel)
            {
                btnCatOut(this._red, this._arr1);
            } // end if
        };
        _loc3.onRelease = function ()
        {
            if (this.index != _root.gallerySel)
            {
                btnCatOut(_category["btnCat" + _root.gallerySel]._red, _category["btnCat" + _root.gallerySel]._arr1);
                clearThumbs();
                caurina.transitions.Tweener.addTween(_thumbs._thumbs, {_y: 0, time: 1, transition: "easeOutCubic"});
                yPos = 0;
                _root.gallerySel = this.index;
                parsXML();
                arrayThumbs();
                getDes();
                mcLoader.loadClip(arrayImage[0], _mc1._mc);
            } // end if
        };
    } // end of for
    btnCatOver(_category.btnCat1._red, _category.btnCat1._arr1);
} // End of the function
function btnCatOver(clip1, clip2)
{
    caurina.transitions.Tweener.addTween(clip1, {_y: 17, time: 3, transition: "easeOutCubic"});
    caurina.transitions.Tweener.addTween(clip2, {_y: -6, time: 5.000000E-001, transition: "easeOutCubic"});
    var _loc1 = new Sound();
    _loc1.attachSound("bt_snd");
    _loc1.start();
} // End of the function
function btnCatOut(clip1, clip2)
{
    caurina.transitions.Tweener.addTween(clip1, {_y: -27, time: 3, transition: "easeOutCubic"});
    caurina.transitions.Tweener.addTween(clip2, {_y: -24, time: 5.000000E-001, transition: "easeOutCubic"});
} // End of the function
function clearThumbs()
{
    for (var _loc1 = 1; _loc1 <= lenGall; ++_loc1)
    {
        _thumbs._thumbs["thumb" + _loc1].removeMovieClip();
    } // end of for
} // End of the function
function getDes()
{
    var _loc2 = new Object();
    _loc2.onMouseMove = function ()
    {
        if (_mask_des.hitTest(_root._xmouse, _root._ymouse))
        {
            caurina.transitions.Tweener.addTween(_descr, {_y: 407, time: 5.000000E-001, transition: "easeOutCubic"});
        }
        else
        {
            caurina.transitions.Tweener.addTween(_descr, {_y: 467, time: 5.000000E-001, transition: "easeOutCubic"});
        } // end else if
    };
    Mouse.addListener(_loc2);
    _descr._txt.text = arrayTitle[currentIndex];
} // End of the function
_thumbs._thumbs.setMask(_thumbs._mask);
_root.gallerySel = 1;
var lenGall;
var lenCat;
var mainGalleryNode;
var path;
var arrayImage = new Array();
var arrayThumb = new Array();
var arrayTitle = new Array();
var arrayDescription = new Array();
var arrayNameGall = new Array();
var currentIndex = 0;
var descStr;
var titleStr;
var sel = false;
var counter;
var intervalCat = 54;
var intervalBr = intervalCat / 2;
var yPos = 0;
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function (ok)
{
    if (ok)
    {
        parsXML();
        arrayThumbs();
        menuCat();
        getDes();
        _mc2._mc.unloadMovie();
        mcLoader.loadClip(arrayImage[0], _mc1._mc);

    } // end if
};
gallery_xml.load("cgal.xml");
btnTop.onRollOver = btnBottom.onRollOver = function ()
{
    this.gotoAndPlay("over");
};
btnTop.onRollOut = btnBottom.onRollOut = function ()
{
    this.gotoAndPlay("out");
};
btnBottom.onRelease = function ()
{
    if (_thumbs._thumbs._height > _thumbs._mask._height)
    {
        if (Math.abs(_thumbs._thumbs._y) < _thumbs._thumbs._height - _thumbs._mask._height && caurina.transitions.Tweener.isTweening(_thumbs._thumbs) != true)
        {
            yPos = yPos - (_thumbs._thumbs.thumb1._height + 1);
            caurina.transitions.Tweener.addTween(_thumbs._thumbs, {_y: yPos, time: 5.000000E-001, transition: "easeOutCubic"});
        } // end if
    } // end if
};
btnTop.onRelease = function ()
{
    if (_thumbs._thumbs._height > _thumbs._mask._height)
    {
        if (Math.abs(_thumbs._thumbs._y) > 0 && caurina.transitions.Tweener.isTweening(_thumbs._thumbs) != true)
        {
            yPos = yPos + (_thumbs._thumbs.thumb1._height + 1);
            caurina.transitions.Tweener.addTween(_thumbs._thumbs, {_y: yPos, time: 5.000000E-001, transition: "easeOutCubic"});
        } // end if
    } // end if
};
caurina.transitions.properties.ColorShortcuts.init();
_descr._btn_color.onRollOver = function ()
{
    caurina.transitions.Tweener.addTween(_mc2._mc, {_saturation: 1, time: 2});
};
_descr._btn_color.onRollOut = function ()
{
    caurina.transitions.Tweener.addTween(_mc2._mc, {_saturation: 0, time: 2});
};
var mcLoader = new MovieClipLoader();
var loadListener = new Object();
loadListener.onLoadStart = function (mcTarget)
{
    _root.loadImBig = true;
    _root._content.pages.page1.page1.attachMovie("mcPercents", "mcPercents", this.getNextHighestDepth());
    _root._content.pages.page1.page1.mcPercents._x = _mask_des._width / 2 - 10;
    _root._content.pages.page1.page1.mcPercents._y = _mask_des._height / 2 - 25;
};
loadListener.onLoadProgress = function (mcTarget, bytesLoaded, bytesTotal)
{
    var _loc2 = Math.ceil(bytesLoaded / bytesTotal * 100);
    _root._content.pages.page1.page1.mcPercents.txtPercents.text = _loc2 + "%";
};
loadListener.onLoadComplete = function (mcTarget)
{
    _root._content.pages.page1.page1.mcPercents.mcLoading.removeMovieClip();
    _root._content.pages.page1.page1.mcPercents.removeMovieClip();
};
loadListener.onLoadInit = function (mcTarget)
{
    caurina.transitions.Tweener.addTween(_mc2._mc, {_saturation: 0, time: 5.000000E-001});
    mask_mc.gotoAndPlay(2);
    _white.gotoAndPlay(2);
};
mcLoader.addListener(loadListener);

وهذه الأوامر الموجوده في ملف Xml الملحق مع ملفات الفلاش

<?xml version="1.0" encoding="UTF-8"?>
<albums>

<gallery name="Advertising" path="gallery/Advertising/">
<item name="Photo #Advertising" thumbnail="thumb1.png" pic="im1.jpg" description="text1"/>
<item name="Photo #Advertising" thumbnail="thumb2.png" pic="im2.jpg" description="text2"/>
<item name="Photo #Advertising" thumbnail="thumb3.png" pic="im3.jpg" description="text3"/>
<item name="Photo #Advertising" thumbnail="thumb4.png" pic="im4.jpg" description="text4"/>
<item name="Photo #Advertising" thumbnail="thumb5.png" pic="im5.jpg" description="text5"/>
<item name="Photo #Advertising" thumbnail="thumb6.png" pic="im6.jpg" description="text6"/>
<item name="Photo #Advertising" thumbnail="thumb7.png" pic="im7.jpg" description="text7"/>
<item name="Photo #Advertising" thumbnail="thumb8.png" pic="im8.jpg" description="text8"/>
</gallery>

<gallery name="Marketing" path="gallery/Marketing/">
<item name="Photo #1 Marketing" thumbnail="thumb1.png" pic="im1.jpg" description="text1"/>
<item name="Photo #2 Marketing" thumbnail="thumb2.png" pic="im2.jpg" description="text2"/>
<item name="Photo #3 Marketing" thumbnail="thumb3.png" pic="im3.jpg" description="text3"/>
<item name="Photo #4 Marketing" thumbnail="thumb4.png" pic="im4.jpg" description="text4"/>
<item name="Photo #5 Marketing" thumbnail="thumb5.png" pic="im5.jpg" description="text5"/>
<item name="Photo #6 Marketing" thumbnail="thumb6.png" pic="im6.jpg" description="text6"/>
<item name="Photo #7 Marketing" thumbnail="thumb7.png" pic="im7.jpg" description="text7"/>
<item name="Photo #8 Marketing" thumbnail="thumb8.png" pic="im8.jpg" description="text8"/>
</gallery>

<gallery name="Exhabit" path="gallery/Exhabit/">
<item name="Photo #1 Exhabit" thumbnail="thumb1.png" pic="im1.jpg" description="text1"/>
<item name="Photo #2 Exhabit" thumbnail="thumb2.png" pic="im2.jpg" description="text2"/>
<item name="Photo #3 Exhabit" thumbnail="thumb3.png" pic="im3.jpg" description="text3"/>
<item name="Photo #4 Exhabit" thumbnail="thumb4.png" pic="im4.jpg" description="text4"/>
<item name="Photo #5 Exhabit" thumbnail="thumb5.png" pic="im1.jpg" description="text5"/>
<item name="Photo #6 Exhabit" thumbnail="thumb6.png" pic="im2.jpg" description="text6"/>
<item name="Photo #7 Exhabit" thumbnail="thumb7.png" pic="im3.jpg" description="text7"/>
<item name="Photo #8 Exhabit" thumbnail="thumb8.png" pic="im4.jpg" description="text8"/>
</gallery>

<gallery name="Decoration" path="gallery/Decoration/">
<item name="Photo #1 Decoration" thumbnail="thumb1.png" pic="im1.jpg" description="text1"/>
<item name="Photo #2 Decoration" thumbnail="thumb2.png" pic="im2.jpg" description="text2"/>
<item name="Photo #3 Decoration" thumbnail="thumb3.png" pic="im3.jpg" description="text3"/>
<item name="Photo #4 Decoration" thumbnail="thumb4.png" pic="im4.jpg" description="text4"/>
<item name="Photo #5 Decoration" thumbnail="thumb5.png" pic="im5.jpg" description="text5"/>
<item name="Photo #6 Decoration" thumbnail="thumb6.png" pic="im6.jpg" description="text6"/>
<item name="Photo #7 Decoration" thumbnail="thumb7.png" pic="im7.jpg" description="text7"/>
<item name="Photo #8 Decoration" thumbnail="thumb8.png" pic="im8.jpg" description="text8"/>
</gallery>


</albums>

وهذه هى صورة الملف الفلاشى المطلوب التعديل في الأكواد الخاصه به.

urt07054.jpg

...ملفات المشروع...

ملفات المشروع

تم تعديل هذه المشاركة بواسطة Mr.Ra7iL في 29 مايو 2012 في 13:56

#2

ممكن ترفق ملف swf للمثال الي وضعته عشان توضح فكرتك اكثر !!

M.B.O

Mohamed Bin Othman

إبن المكلا

يابني البشر ماذا فعلتم بالبشر !!

إسـألـنـي

#3
M.B.O كتب:

ممكن ترفق ملف swf للمثال الي وضعته عشان توضح فكرتك اكثر !!

مشكور أخى على ردك وتم وضع ملفات المشروع للتوضيح أكثر

جزاك الله خيراً

تم تعديل هذه المشاركة بواسطة Mr.Ra7iL في 29 مايو 2012 في 13:58

#4

تم حل أول جزء من طلبي و هو كيفية زيادة عدد الصفحات الجانبيه لمعرض الصور .

ويبقى الجزء الثاني و هو عمل قوائم منسدله من اللينكات التى في الأسفل حيث كل لينك يفتح على صفحة منفصله .

أرجو الرد على طلبي في أسرع وقت ممكن .

تحياتي

#5

ثلاثة أيام من طرحى للسؤال ولا يوجد رد حتى الأن...هل المشكلة ليست لها حل.أم لن يرى الموضوع سوى 30 شخص فقط . أم لا أحد يتظر الى هذا القسم

#6

من الواضح انى غلطت جدا جدا جدا لما فكرت اشترك في المنتدى و اكتب فيه مشكلتى..مع ان علمى عن المنتدى من سنين انه متخصص في البرمجة و الشبكات

أكرر اسفى لإشتراكي هنا و انى اخدت فكرة غلط عن المنتدى

واقدم شكرى لكل من قرأ رسالتى....عدد مشاهدة الموضوع اكتر من 100 مشاهدة

تحياتي

#7

مرت أيام كثيره جدا و حتى الأن لم أجد حل لمشكلتى في المنتدى و القسم المتخصصيين في لغة Xml

ألا يوجد حل لهذه المشكله .

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…