Op deze website gebruiken we cookies om content en advertenties te personaliseren, om functies voor social media te bieden en om ons websiteverkeer te analyseren. Ook delen we informatie over uw gebruik van onze site met onze partners voor social media, adverteren en analyse. Deze partners kunnen deze gegevens combineren met andere informatie die u aan ze heeft verstrekt of die ze hebben verzameld op basis van uw gebruik van hun services. Meer informatie.

Akkoord

Vraag & Antwoord

Webdesign (HTML, CSS, Flash)

[Flash] Dynamische sleepoefening

Hallo, Is er iemand die mij met het volgende kan helpen? Het onderstaande screenshot betreft een sleepoefening waarbij het de bedoeling is om woorden naar de gekoppelde omschrijving te slepen. Alle gegevens worden via PHP/een querystring binnengehaald. Via een CMS is het mogelijk om (eindeloos) woorden en omschrijvingen toe te voegen, vandaar dat de items dynamisch worden gegenereerd. Op zich werkt dit nu prima, alleen is het nu zo dat om een of andere reden alle items dezelfde waarde krijgen, i.p.v. elk een eigen/verschillende. En ik snap niet helemaal hoe dit kan, of in elk geval hoe ik dit moet oplossen. Iemand een idee? [img:4115344fef]http://www.gomotion.nl/sloef.gif[/img:4115344fef] Even de code erbij: [code:1:4115344fef] var wordMCName; var list1 = new Array(wordCount); var list2 = new Array(wordCount); var globalSound = new Sound(); dragword._visible = false; fixedword._visible = false; robot.swapDepths(40); drop.swapDepths(500); for (n=0; n<wordCount; n++) { list1[n] = 0; list2[n] = 0; } // end of for for (w=0; w<wordCount; w++) { word1 = this["wrd"+w]; //Volgende woord uit de Querystring word2 = this["oms"+w]; //Volgende omschrijving uit de Querystring wordMCName = "dragword"+w; duplicateMovieClip("dragword", wordMCName, 16384+(wordCount+w)); var word1MC = eval(wordMCName); var taken = false; var rPos; do { rPos = Math.floor(Math.random()*10); taken = list1[rPos] != 0; } while (taken); list1[rPos] = 1; with (word1MC) { _x = 450; _y = 70+rPos*28; wordText1 = word1; // Tekstvariabele WOORD } // End of with wordMCName = "fixedword"+w; duplicateMovieClip("fixedword", wordMCName, 16384+(16384+w)); var word2MC = eval(wordMCName); taken = false; do { rPos = Math.floor(Math.random()*10); taken = list2[rPos] != 0; } while (taken); list2[rPos] = 1; with (word2MC) { _x = 190; _y = 70+rPos*28; wordText = word2; // Tekstvariabele OMSCHRIJVING } // End of with word1MC.relatedMC = word2MC; } // end of for stop(); [/code:1:4115344fef] Dit is wat ze als output geeft in de debugger overigens: [code:1:4115344fef] Level #0: Variable _level0.$version = "WIN 6,0,21,0" Variable _level0._accProps = [object #1, class 'Object'] { silent:false } Variable _level0.loadMessage1 = "Bezig met inlezen van thema's,\reen ogenblikje a.u.b." Variable _level0.size = 6559 Variable _level0.loaded = 6559 Variable _level0.percent = 100 Variable _level0.type = "3" Variable _level0.maxwords = "10" Variable _level0.wrd0 = "Djurre" Variable _level0.oms0 = "Match Djurre" Variable _level0.wrd1 = "Marvin" Variable _level0.oms1 = "Match Marvin" Variable _level0.wrd2 = "Michiel" Variable _level0.oms2 = "Match Michiel" Variable _level0.wrd3 = "Monsieur Paul" Variable _level0.oms3 = "Match Monsieur Paul" Variable _level0.wrd4 = "Woord" Variable _level0.oms4 = "Match Woord" Variable _level0.wrd5 = "Woord'nMatch" Variable _level0.oms5 = "Match Woordn'Match" Variable _level0.wrd6 = "Woord(1)" Variable _level0.oms6 = "Omschrijving Woord(1)&" Variable _level0.wrd7 = "Wouter" Variable _level0.oms7 = "Match Wouter" Variable _level0.wrd8 = "Yarka" Variable _level0.oms8 = "Matchomschrijving Yarka" Variable _level0.wrd9 = "Yori" Variable _level0.oms9 = "Match Yori\r\n" Variable _level0.loadMessage2 = "Bezig met inlezen van woorden,\reen ogenblikje a.u.b." Variable _level0.gameOver = false Variable _level0.wordCount = "10" Variable _level0.correct = 0 Variable _level0.wordMCName = "fixedword9" Variable _level0.list1 = [object #2, class 'Array'] [ 0:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1 ] Variable _level0.list2 = [object #3, class 'Array'] [ 0:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1 ] Variable _level0.globalSound = [object #4, class 'Sound'] {} Variable _level0.n = 10 Variable _level0.w = 10 Variable _level0.word1 = "Yori" Variable _level0.word2 = "Match Yori\r\n" Variable _level0.word1MC = [movieclip:_level0.dragword9] Variable _level0.taken = false Variable _level0.rPos = 9 Variable _level0.wordText1 = "Yori" Variable _level0.word2MC = [movieclip:_level0.fixedword9] Variable _level0.wordText = "Match Yori\r\n" Movie Clip: Target="_level0.dragword" Variable _level0.dragword.dropped = false Edit Text: Target="_level0.dragword.instance5" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword.instance6" Variable _level0.dragword.instance6.tabIndex = [getter/setter] undefined Edit Text: Target="_level0.instance7" variable = "/:wordCount", text = "10", htmlText = "10", html = false, textWidth = 18, textHeight = 16, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0x000000, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = true, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 2, tabIndex = undefined, autoSize = "none", condenseWhite = false Edit Text: Target="_level0.instance8" variable = null, text = "Aantal woorden:", htmlText = "Aantal woorden:", html = false, textWidth = 109, textHeight = 16, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0x000000, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = true, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 15, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword" Edit Text: Target="_level0.fixedword.instance9" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword0" Edit Text: Target="_level0.fixedword0.instance12" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword1" Edit Text: Target="_level0.fixedword1.instance15" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword2" Edit Text: Target="_level0.fixedword2.instance18" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword3" Edit Text: Target="_level0.fixedword3.instance21" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword4" Edit Text: Target="_level0.fixedword4.instance24" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword5" Edit Text: Target="_level0.fixedword5.instance27" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword6" Edit Text: Target="_level0.fixedword6.instance30" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword7" Edit Text: Target="_level0.fixedword7.instance33" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword8" Edit Text: Target="_level0.fixedword8.instance36" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.fixedword9" Edit Text: Target="_level0.fixedword9.instance39" variable = "/:wordText", text = "Match Yori\r\r", htmlText = "Match Yori\r\r", html = false, textWidth = 321, textHeight = 34, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 2, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 12, tabIndex = undefined, autoSize = "none", condenseWhite = false Movie Clip: Target="_level0.dragword0" Variable _level0.dragword0.relatedMC = [movieclip:_level0.fixedword0] Variable _level0.dragword0.dropped = false Edit Text: Target="_level0.dragword0.instance10" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword0.instance11" Variable _level0.dragword0.instance11.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword1" Variable _level0.dragword1.relatedMC = [movieclip:_level0.fixedword1] Variable _level0.dragword1.dropped = false Edit Text: Target="_level0.dragword1.instance13" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword1.instance14" Variable _level0.dragword1.instance14.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword2" Variable _level0.dragword2.relatedMC = [movieclip:_level0.fixedword2] Variable _level0.dragword2.dropped = false Edit Text: Target="_level0.dragword2.instance16" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword2.instance17" Variable _level0.dragword2.instance17.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword3" Variable _level0.dragword3.relatedMC = [movieclip:_level0.fixedword3] Variable _level0.dragword3.dropped = false Edit Text: Target="_level0.dragword3.instance19" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword3.instance20" Variable _level0.dragword3.instance20.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword4" Variable _level0.dragword4.relatedMC = [movieclip:_level0.fixedword4] Variable _level0.dragword4.dropped = false Edit Text: Target="_level0.dragword4.instance22" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword4.instance23" Variable _level0.dragword4.instance23.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword5" Variable _level0.dragword5.relatedMC = [movieclip:_level0.fixedword5] Variable _level0.dragword5.dropped = false Edit Text: Target="_level0.dragword5.instance25" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword5.instance26" Variable _level0.dragword5.instance26.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword6" Variable _level0.dragword6.relatedMC = [movieclip:_level0.fixedword6] Variable _level0.dragword6.dropped = false Edit Text: Target="_level0.dragword6.instance28" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword6.instance29" Variable _level0.dragword6.instance29.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword7" Variable _level0.dragword7.relatedMC = [movieclip:_level0.fixedword7] Variable _level0.dragword7.dropped = false Edit Text: Target="_level0.dragword7.instance31" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword7.instance32" Variable _level0.dragword7.instance32.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword8" Variable _level0.dragword8.relatedMC = [movieclip:_level0.fixedword8] Variable _level0.dragword8.dropped = false Edit Text: Target="_level0.dragword8.instance34" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword8.instance35" Variable _level0.dragword8.instance35.tabIndex = [getter/setter] undefined Movie Clip: Target="_level0.dragword9" Variable _level0.dragword9.relatedMC = [movieclip:_level0.fixedword9] Variable _level0.dragword9.dropped = false Edit Text: Target="_level0.dragword9.instance37" variable = "/:wordText1", text = "Yori", htmlText = "Yori", html = false, textWidth = 22, textHeight = 17, maxChars = null, borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0xFFFFFF, border = false, background = false, wordWrap = false, password = false, multiline = false, selectable = false, scroll = 1, hscroll = 0, maxscroll = 1, maxhscroll = 0, bottomScroll = 1, type = "dynamic", embedFonts = false, restrict = null, length = 4, tabIndex = undefined, autoSize = "none", condenseWhite = false Button: Target="_level0.dragword9.instance38" Variable _level0.dragword9.instance38.tabIndex = [getter/setter] undefined [/code:1:4115344fef] Bedankt :)

de_paashaas